From 87f316d7748268eb56f2dc147bd593254ae93198 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Tue, 28 Sep 2021 15:55:17 -0700 Subject: [PATCH] Add note to HMAC test vectors from NIST All the test vectors testing key length greater than the block length were mislabelled as key length being equal to the block length. Add a note to these test vectors indicating they are directly from the NIST tests with the misleading input intact. Change-Id: I9fe87971265ad48e9b835fccbe92306e1670b4d6 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/49705 Reviewed-by: David Benjamin Commit-Queue: David Benjamin --- crypto/hmac_extra/hmac_tests.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto/hmac_extra/hmac_tests.txt b/crypto/hmac_extra/hmac_tests.txt index 1d7efd2ad..1339b5b39 100644 --- a/crypto/hmac_extra/hmac_tests.txt +++ b/crypto/hmac_extra/hmac_tests.txt @@ -33,6 +33,7 @@ Input = "Sample message for keylenblocklen, but the NIST test vectors have a misleading input. HMAC = SHA1 Input = "Sample message for keylen=blocklen" Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263 @@ -48,6 +49,7 @@ Input = "Sample message for keylenblocklen, but the NIST test vectors have a misleading input. HMAC = SHA224 Input = "Sample message for keylen=blocklen" Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263 @@ -63,6 +65,7 @@ Input = "Sample message for keylenblocklen, but the NIST test vectors have a misleading input. HMAC = SHA256 Input = "Sample message for keylen=blocklen" Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F60616263 @@ -78,6 +81,7 @@ Input = "Sample message for keylenblocklen, but the NIST test vectors have a misleading input. HMAC = SHA384 Input = "Sample message for keylen=blocklen" Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7 @@ -93,6 +97,7 @@ Input = "Sample message for keylenblocklen, but the NIST test vectors have a misleading input. HMAC = SHA512 Input = "Sample message for keylen=blocklen" Key = 000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F202122232425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F404142434445464748494A4B4C4D4E4F505152535455565758595A5B5C5D5E5F606162636465666768696A6B6C6D6E6F707172737475767778797A7B7C7D7E7F808182838485868788898A8B8C8D8E8F909192939495969798999A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAABACADAEAFB0B1B2B3B4B5B6B7B8B9BABBBCBDBEBFC0C1C2C3C4C5C6C7