diff options
author | René Korthaus <[email protected]> | 2016-07-15 09:30:30 +0200 |
---|---|---|
committer | René Korthaus <[email protected]> | 2016-07-15 14:39:45 +0200 |
commit | ad4af449f017058b414f0344f18b5e47e591e8ad (patch) | |
tree | da928437814d10c2184d70e5da36dd04b322c536 /src | |
parent | b3bc80dfdb28aee0900b6ed92dff5ba8c5e4daf9 (diff) |
Add test vectors for KDF1/ISO18033
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp | 2 | ||||
-rw-r--r-- | src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h | 4 | ||||
-rw-r--r-- | src/tests/data/kdf/kdf1_iso18033.vec | 24 |
3 files changed, 27 insertions, 3 deletions
diff --git a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp index b40fe55cc..7beca0862 100644 --- a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp +++ b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.cpp @@ -1,5 +1,5 @@ /* -* KDF1 from ISO 18033 +* KDF1 from ISO 18033-2 * (C) 2016 Philipp Weber * * Botan is released under the Simplified BSD License (see license.txt) diff --git a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h index d6ce851ae..f61864d1f 100644 --- a/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h +++ b/src/lib/kdf/kdf1_iso18033/kdf1_iso18033.h @@ -1,5 +1,5 @@ /* -* KDF1 from ISO 18033 +* KDF1 from ISO 18033-2 * (C) 2016 Philipp Weber * * Botan is released under the Simplified BSD License (see license.txt) @@ -14,7 +14,7 @@ namespace Botan { /** -* KDF1, from IEEE 1363 +* KDF1, from ISO 18033-2 */ class BOTAN_DLL KDF1_18033 : public KDF { diff --git a/src/tests/data/kdf/kdf1_iso18033.vec b/src/tests/data/kdf/kdf1_iso18033.vec new file mode 100644 index 000000000..389ae9b0b --- /dev/null +++ b/src/tests/data/kdf/kdf1_iso18033.vec @@ -0,0 +1,24 @@ + +# Test vectors from ISO 18033-2 + +# C.5.1 + +[KDF1-18033(SHA-1)] +Secret = D6E168C5F256A2DCFF7EF12FACD390F393C7A88D +OutputLen = 107 +Output = C325EBBB41A82551D5D0AD4834870A05EF3918C8CAAE38873F07DCA43127A4DEE36A6CA5970F6C06926037DE7DF79C4915D83FF705821D2C46A1FA7BB81B73E27176FEB7FD3A45E40B843F1AAEBCCB1EF4FA7EE3B9B491A342F43EAAA435EFDED41E0A3A6EC2EFF1F2ED95 + +Secret = B711F58766B5D696513538F03036F30E0FC11CE1CAAE38873F07DCA43127A4DEE36A6CA5970F6C06926037DE7DF79C4915D83FF705821D2C46A1FA7BB81B73E27176FEB7FD3A45E40B843F1AAEBCCB1FD4AE168ACA94F8D062951EDEC1469BFEB97B79490FA58AD1D3CCB4 +OutputLen = 20 +Output = 281D7CB2D7D5531ED1F9382152D9BE9A89A1DF09 + +# C.5.3 + +[KDF1-18033(SHA-256)] +Secret = D6E168C5F256A2DCFF7EF12FACD390F393C7A88D +OutputLen = 20 +Output = 0742BA966813AF75536BB6149CC44FC256FD6406 + +Secret = 09248DA92DCF5CA8360AE7F18533A19C6BA8E99ADF79665BC31DC5A62F70535E52C53015B9D37D412FF3C1193439599E1B628774C50D9CCB78D82C425E4521EE47B8C36A4BCFFE8B8112A89312FC04432A6DB6F05118F9946C80230CD9222E0146F2CBD5251CC388A62359 +OutputLen = 20 +Output = 6F0195F38EED2417AA6EB7A365245073E58711DB
\ No newline at end of file |