diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-27 14:36:23 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-27 14:36:23 -0800 |
commit | e62829e8bf52bdfc8b482c71fc245a64d53a7be6 (patch) | |
tree | 0d50f126b794adcc89f160665f4143bde4b0da44 | |
parent | 904cd21bb5bff75b358d0fd7605acd374a2ad341 (diff) | |
parent | 8412e7414d7f6246a2dccf478f3884480bba6c47 (diff) | |
download | cryptography-e62829e8bf52bdfc8b482c71fc245a64d53a7be6.tar.gz cryptography-e62829e8bf52bdfc8b482c71fc245a64d53a7be6.tar.bz2 cryptography-e62829e8bf52bdfc8b482c71fc245a64d53a7be6.zip |
Merge pull request #515 from dreid/nisted-hkdf-vectors
Convert the HKDF vectors to the NIST format.
-rw-r--r-- | tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA1.txt | 8 | ||||
-rw-r--r-- | tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA256.txt | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA1.txt b/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA1.txt index 598ecaae..b3fd03aa 100644 --- a/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA1.txt +++ b/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA1.txt @@ -1,6 +1,8 @@ # A.4. Test Case 4 # Basic test case with SHA-1 +COUNT = 4 + Hash = SHA-1 IKM = 0b0b0b0b0b0b0b0b0b0b0b salt = 000102030405060708090a0b0c @@ -13,6 +15,8 @@ OKM = 085a01ea1b10f36933068b56efa5ad81a4f14b822f5b091568a9cdd4f155fda2c22e42247 # A.5. Test Case 5 # Test with SHA-1 and longer inputs/outputs +COUNT = 5 + Hash = SHA-1 IKM = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f salt = 606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeaf @@ -25,6 +29,8 @@ OKM = 0bd770a74d1160f7c9f12cd5912a06ebff6adcae899d92191fe4305673ba2ffe8fa3f1a4e # A.6. Test Case 6 # Test with SHA-1 and zero-length salt/info +COUNT = 6 + Hash = SHA-1 IKM = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b salt = @@ -38,6 +44,8 @@ OKM = 0ac1af7002b3d761d1e55298da9d0506b9ae52057220a306e07b6b87e8df21d0ea00033de # Test with SHA-1, salt not provided (defaults to HashLen zero octets), # zero-length info +COUNT = 7 + Hash = SHA-1 IKM = 0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c salt = diff --git a/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA256.txt b/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA256.txt index 170dd13e..9068a739 100644 --- a/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA256.txt +++ b/tests/hazmat/primitives/vectors/KDF/rfc-5869-HKDF-SHA256.txt @@ -1,6 +1,8 @@ # A.1. Test Case 1 # Basic test case with SHA-256 +COUNT = 1 + Hash = SHA-256 IKM = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b salt = 000102030405060708090a0b0c @@ -12,6 +14,8 @@ OKM = 3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf34007208d # A.2. Test Case 2 # Test with SHA-256 and longer inputs/outputs +COUNT = 2 + Hash = SHA-256 IKM = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f salt = 606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeaf @@ -24,6 +28,8 @@ OKM = b11e398dc80327a1c8e7f78c596a49344f012eda2d4efad8a050cc4c19afa97c59045a99c # A.3. Test Case 3 # Test with SHA-256 and zero-length salt/info +COUNT = 3 + Hash = SHA-256 IKM = 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b salt = |