diff mbox series

[v1,2/4] validation: crypto: add test vectors for full HMAC length

Message ID 1515027610-31156-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v1,1/4] validation: crypto: print untested capabilities | expand

Commit Message

Github ODP bot Jan. 4, 2018, 1 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


for HMAC tests add test vectors covering full HMAC length in addition to
truncated tests.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 379 (lumag:crypto-untested)
 ** https://github.com/Linaro/odp/pull/379
 ** Patch: https://github.com/Linaro/odp/pull/379.patch
 ** Base sha: 49ebafae0edebbc750742d8874ad0a7588286dea
 ** Merge commit sha: 36b032fa07bb9b29a0c8f774c2ce76da96b4d653
 **/
 test/validation/api/crypto/test_vectors.h     | 251 +++++++++++++++++++++++++-
 test/validation/api/crypto/test_vectors_len.h |   6 +-
 2 files changed, 254 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/test/validation/api/crypto/test_vectors.h b/test/validation/api/crypto/test_vectors.h
index f2ce9eb2f..6592a3357 100644
--- a/test/validation/api/crypto/test_vectors.h
+++ b/test/validation/api/crypto/test_vectors.h
@@ -486,7 +486,7 @@  static crypto_test_reference_t hmac_md5_reference[] = {
 		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
 		.digest_length = HMAC_MD5_96_CHECK_LEN,
 		.digest = { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
-			    0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d },
+			    0x13, 0xf4, 0x8e, 0xf8 },
 
 	},
 	{
@@ -505,7 +505,7 @@  static crypto_test_reference_t hmac_md5_reference[] = {
 				0x69, 0x6e, 0x67, 0x3f },
 		.digest_length = HMAC_MD5_96_CHECK_LEN,
 		.digest = { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
-			    0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 },
+			    0xea, 0xa8, 0x6e, 0x31 },
 
 	},
 	{
@@ -528,6 +528,61 @@  static crypto_test_reference_t hmac_md5_reference[] = {
 				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
 				0xdd, 0xdd },
 		.digest_length = HMAC_MD5_96_CHECK_LEN,
+		.digest = { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
+			    0xdb, 0xb8, 0xc7, 0x33 }
+	},
+	{
+		.auth_key_length = HMAC_MD5_KEY_LEN,
+		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b },
+		.length = 8,
+		/* "Hi There" */
+		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.digest_length = HMAC_MD5_CHECK_LEN,
+		.digest = { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
+			    0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d },
+
+	},
+	{
+		.auth_key_length = HMAC_MD5_KEY_LEN,
+		/* "Jefe" */
+		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
+		.length = 28,
+		/* what do ya want for nothing?*/
+		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+			       0x69, 0x6e, 0x67, 0x3f },
+		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+				0x69, 0x6e, 0x67, 0x3f },
+		.digest_length = HMAC_MD5_CHECK_LEN,
+		.digest = { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
+			    0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 },
+
+	},
+	{
+		.auth_key_length = HMAC_MD5_KEY_LEN,
+		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa },
+		.length = 50,
+		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd },
+		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd },
+		.digest_length = HMAC_MD5_CHECK_LEN,
 		.digest = { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
 			    0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6 }
 	}
@@ -588,6 +643,64 @@  static crypto_test_reference_t hmac_sha1_reference[] = {
 		.digest_length = HMAC_SHA1_96_CHECK_LEN,
 		.digest = { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac,
 			    0x11, 0xcd, 0x91, 0xa3, 0x9a, 0xf4 }
+	},
+	{
+		.auth_key_length = HMAC_SHA1_KEY_LEN,
+		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b },
+		.length = 8,
+		/* "Hi There" */
+		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.digest_length = HMAC_SHA1_CHECK_LEN,
+		.digest = { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
+			    0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e,
+			    0xf1, 0x46, 0xbe, 0x00 }
+	},
+	{
+		.auth_key_length = HMAC_SHA1_KEY_LEN,
+		/* "Jefe" */
+		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
+		.length = 28,
+		/* what do ya want for nothing?*/
+		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+			       0x69, 0x6e, 0x67, 0x3f },
+		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+				0x69, 0x6e, 0x67, 0x3f },
+		.digest_length = HMAC_SHA1_CHECK_LEN,
+		.digest = { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2,
+			    0xd2, 0x74, 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c,
+			    0x25, 0x9a, 0x7c, 0x79 }
+	},
+	{
+		.auth_key_length = HMAC_SHA1_KEY_LEN,
+		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa },
+		.length = 50,
+		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd },
+		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd },
+		.digest_length = HMAC_SHA1_CHECK_LEN,
+		.digest = { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd,
+			    0x91, 0xa3, 0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f,
+			    0x63, 0xf1, 0x75, 0xd3 }
 	}
 };
 
@@ -646,6 +759,67 @@  static crypto_test_reference_t hmac_sha256_reference[] = {
 		.digest_length = HMAC_SHA256_128_CHECK_LEN,
 		.digest = { 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46,
 			    0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7 }
+	},
+	{
+		.auth_key_length = HMAC_SHA256_KEY_LEN,
+		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b },
+		.length = 8,
+		/* "Hi There" */
+		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.digest_length = HMAC_SHA256_CHECK_LEN,
+		.digest = { 0xb0, 0x34, 0x4c, 0x61, 0xd8, 0xdb, 0x38, 0x53,
+			    0x5c, 0xa8, 0xaf, 0xce, 0xaf, 0x0b, 0xf1, 0x2b,
+			    0x88, 0x1d, 0xc2, 0x00, 0xc9, 0x83, 0x3d, 0xa7,
+			    0x26, 0xe9, 0x37, 0x6c, 0x2e, 0x32, 0xcf, 0xf7 }
+	},
+	{
+		.auth_key_length = HMAC_SHA256_KEY_LEN,
+		/* "Jefe" */
+		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
+		.length = 28,
+		/* what do ya want for nothing?*/
+		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+			       0x69, 0x6e, 0x67, 0x3f },
+		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+				0x69, 0x6e, 0x67, 0x3f },
+		.digest_length = HMAC_SHA256_CHECK_LEN,
+		.digest = { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
+			    0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7,
+			    0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83,
+			    0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 }
+	},
+	{
+		.auth_key_length = HMAC_SHA256_KEY_LEN,
+		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa },
+		.length = 50,
+		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd },
+		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd },
+		.digest_length = HMAC_SHA256_CHECK_LEN,
+		.digest = { 0x77, 0x3e, 0xa9, 0x1e, 0x36, 0x80, 0x0e, 0x46,
+			    0x85, 0x4d, 0xb8, 0xeb, 0xd0, 0x91, 0x81, 0xa7,
+			    0x29, 0x59, 0x09, 0x8b, 0x3e, 0xf8, 0xc1, 0x22,
+			    0xd9, 0x63, 0x55, 0x14, 0xce, 0xd5, 0x65, 0xfe }
 	}
 };
 
@@ -710,6 +884,79 @@  static crypto_test_reference_t hmac_sha512_reference[] = {
 			    0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
 			    0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
 			    0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39 }
+	},
+	{
+		.auth_key_length = HMAC_SHA512_KEY_LEN,
+		.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+			      0x0b, 0x0b, 0x0b, 0x0b },
+		.length = 8,
+		/* "Hi There" */
+		.plaintext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.ciphertext = { 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65},
+		.digest_length = HMAC_SHA512_CHECK_LEN,
+		.digest = { 0x87, 0xaa, 0x7c, 0xde, 0xa5, 0xef, 0x61, 0x9d,
+			    0x4f, 0xf0, 0xb4, 0x24, 0x1a, 0x1d, 0x6c, 0xb0,
+			    0x23, 0x79, 0xf4, 0xe2, 0xce, 0x4e, 0xc2, 0x78,
+			    0x7a, 0xd0, 0xb3, 0x05, 0x45, 0xe1, 0x7c, 0xde,
+			    0xda, 0xa8, 0x33, 0xb7, 0xd6, 0xb8, 0xa7, 0x02,
+			    0x03, 0x8b, 0x27, 0x4e, 0xae, 0xa3, 0xf4, 0xe4,
+			    0xbe, 0x9d, 0x91, 0x4e, 0xeb, 0x61, 0xf1, 0x70,
+			    0x2e, 0x69, 0x6c, 0x20, 0x3a, 0x12, 0x68, 0x54 }
+	},
+	{
+		.auth_key_length = HMAC_SHA512_KEY_LEN,
+		/* "Jefe" */
+		.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
+		.length = 28,
+		/* what do ya want for nothing?*/
+		.plaintext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+			       0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+			       0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+			       0x69, 0x6e, 0x67, 0x3f },
+		.ciphertext = { 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20,
+				0x79, 0x61, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20,
+				0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68,
+				0x69, 0x6e, 0x67, 0x3f },
+		.digest_length = HMAC_SHA512_CHECK_LEN,
+		.digest = { 0x16, 0x4b, 0x7a, 0x7b, 0xfc, 0xf8, 0x19, 0xe2,
+			    0xe3, 0x95, 0xfb, 0xe7, 0x3b, 0x56, 0xe0, 0xa3,
+			    0x87, 0xbd, 0x64, 0x22, 0x2e, 0x83, 0x1f, 0xd6,
+			    0x10, 0x27, 0x0c, 0xd7, 0xea, 0x25, 0x05, 0x54,
+			    0x97, 0x58, 0xbf, 0x75, 0xc0, 0x5a, 0x99, 0x4a,
+			    0x6d, 0x03, 0x4f, 0x65, 0xf8, 0xf0, 0xe6, 0xfd,
+			    0xca, 0xea, 0xb1, 0xa3, 0x4d, 0x4a, 0x6b, 0x4b,
+			    0x63, 0x6e, 0x07, 0x0a, 0x38, 0xbc, 0xe7, 0x37 }
+	},
+	{
+		.auth_key_length = HMAC_SHA512_KEY_LEN,
+		.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+			      0xaa, 0xaa, 0xaa, 0xaa },
+		.length = 50,
+		.plaintext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+			       0xdd, 0xdd },
+		.ciphertext = { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+				0xdd, 0xdd },
+		.digest_length = HMAC_SHA512_CHECK_LEN,
+		.digest = { 0xfa, 0x73, 0xb0, 0x08, 0x9d, 0x56, 0xa2, 0x84,
+			    0xef, 0xb0, 0xf0, 0x75, 0x6c, 0x89, 0x0b, 0xe9,
+			    0xb1, 0xb5, 0xdb, 0xdd, 0x8e, 0xe8, 0x1a, 0x36,
+			    0x55, 0xf8, 0x3e, 0x33, 0xb2, 0x27, 0x9d, 0x39,
+			    0xbf, 0x3e, 0x84, 0x82, 0x79, 0xa7, 0x22, 0xc8,
+			    0x06, 0xb4, 0x85, 0xa4, 0x7e, 0x67, 0xc8, 0x07,
+			    0xb9, 0x46, 0xa3, 0x37, 0xbe, 0xe8, 0x94, 0x26,
+			    0x74, 0x27, 0x88, 0x59, 0xe1, 0x32, 0x92, 0xfb }
 	}
 };
 
diff --git a/test/validation/api/crypto/test_vectors_len.h b/test/validation/api/crypto/test_vectors_len.h
index 0062299e6..140bef2a2 100644
--- a/test/validation/api/crypto/test_vectors_len.h
+++ b/test/validation/api/crypto/test_vectors_len.h
@@ -57,17 +57,21 @@ 
 /* HMAC-MD5 */
 #define HMAC_MD5_KEY_LEN        16
 #define HMAC_MD5_96_CHECK_LEN   12
+#define HMAC_MD5_CHECK_LEN      16
 
 /* HMAC-SHA256 */
 #define HMAC_SHA256_KEY_LEN        32
-#define HMAC_SHA256_128_CHECK_LEN   16
+#define HMAC_SHA256_128_CHECK_LEN  16
+#define HMAC_SHA256_CHECK_LEN      32
 
 /* HMAC-SHA1 */
 #define HMAC_SHA1_KEY_LEN        20
 #define HMAC_SHA1_96_CHECK_LEN   12
+#define HMAC_SHA1_CHECK_LEN      20
 
 /* HMAC-SHA512 */
 #define HMAC_SHA512_KEY_LEN        64
 #define HMAC_SHA512_256_CHECK_LEN  32
+#define HMAC_SHA512_CHECK_LEN      64
 
 #endif