aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryhe <yhe@sonicwall.com>2018-03-28 08:51:20 +0800
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-04-10 17:35:53 +0300
commit290decaf3259b036c3a402be428b04ba100f0f81 (patch)
tree85bdfe0250222ae5879f893ee0a02c9d82576718
parent61d16e162788ac0923c544b4d31bb847fa3d9189 (diff)
validation:crypto:implement AES-XCBC-MAC and SHA384-HMAC
Add AES-XCBC-MAC and SHA384-HMAC into the test case Signed-off-by: Tom He <yhe@sonicwall.com> Reviewed-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r--test/validation/api/crypto/odp_crypto_test_inp.c91
-rw-r--r--test/validation/api/crypto/test_vectors.h209
-rw-r--r--test/validation/api/crypto/test_vectors_len.h10
-rw-r--r--test/validation/api/ipsec/ipsec.c8
4 files changed, 318 insertions, 0 deletions
diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c
index 39ef33505..aa053dd50 100644
--- a/test/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/validation/api/crypto/odp_crypto_test_inp.c
@@ -47,8 +47,12 @@ static const char *auth_alg_name(odp_auth_alg_t auth)
return "ODP_AUTH_ALG_SHA1_HMAC";
case ODP_AUTH_ALG_SHA256_HMAC:
return "ODP_AUTH_ALG_SHA256_HMAC";
+ case ODP_AUTH_ALG_SHA384_HMAC:
+ return "ODP_AUTH_ALG_SHA384_HMAC";
case ODP_AUTH_ALG_SHA512_HMAC:
return "ODP_AUTH_ALG_SHA512_HMAC";
+ case ODP_AUTH_ALG_AES_XCBC_MAC:
+ return "ODP_AUTH_ALG_AES_XCBC_MAC";
case ODP_AUTH_ALG_AES_GCM:
return "ODP_AUTH_ALG_AES_GCM";
case ODP_AUTH_ALG_AES_GMAC:
@@ -527,9 +531,15 @@ static void check_alg(odp_crypto_op_t op,
if (auth_alg == ODP_AUTH_ALG_SHA256_HMAC &&
!(capa.auths.bit.sha256_hmac))
rc = -1;
+ if (auth_alg == ODP_AUTH_ALG_SHA384_HMAC &&
+ !(capa.auths.bit.sha384_hmac))
+ rc = -1;
if (auth_alg == ODP_AUTH_ALG_SHA512_HMAC &&
!(capa.auths.bit.sha512_hmac))
rc = -1;
+ if (auth_alg == ODP_AUTH_ALG_AES_XCBC_MAC &&
+ !(capa.auths.bit.aes_xcbc_mac))
+ rc = -1;
CU_ASSERT(!rc);
CU_ASSERT((~capa.auths.all_bits & capa.hw_auths.all_bits) == 0);
@@ -711,10 +721,18 @@ static int check_alg_support(odp_cipher_alg_t cipher, odp_auth_alg_t auth)
if (!capability.auths.bit.sha256_hmac)
return ODP_TEST_INACTIVE;
break;
+ case ODP_AUTH_ALG_SHA384_HMAC:
+ if (!capability.auths.bit.sha384_hmac)
+ return ODP_TEST_INACTIVE;
+ break;
case ODP_AUTH_ALG_SHA512_HMAC:
if (!capability.auths.bit.sha512_hmac)
return ODP_TEST_INACTIVE;
break;
+ case ODP_AUTH_ALG_AES_XCBC_MAC:
+ if (!capability.auths.bit.aes_xcbc_mac)
+ return ODP_TEST_INACTIVE;
+ break;
case ODP_AUTH_ALG_AES_GCM:
if (!capability.auths.bit.aes_gcm)
return ODP_TEST_INACTIVE;
@@ -1205,6 +1223,38 @@ static void crypto_test_check_alg_hmac_sha256(void)
false);
}
+static int check_alg_hmac_sha384(void)
+{
+ return check_alg_support(ODP_CIPHER_ALG_NULL, ODP_AUTH_ALG_SHA384_HMAC);
+}
+
+/* This test verifies the correctness of HMAC_SHA384 digest operation.
+ * The output check length is truncated to 24 bytes (192 bits) as
+ * returned by the crypto operation API call.
+ * Note that hash digest is a one-way operation.
+ * In addition the test verifies if the implementation can use the
+ * packet buffer as completion event buffer.
+ * */
+static void crypto_test_gen_alg_hmac_sha384(void)
+{
+ check_alg(ODP_CRYPTO_OP_ENCODE,
+ ODP_CIPHER_ALG_NULL,
+ ODP_AUTH_ALG_SHA384_HMAC,
+ hmac_sha384_reference,
+ ARRAY_SIZE(hmac_sha384_reference),
+ false);
+}
+
+static void crypto_test_check_alg_hmac_sha384(void)
+{
+ check_alg(ODP_CRYPTO_OP_DECODE,
+ ODP_CIPHER_ALG_NULL,
+ ODP_AUTH_ALG_SHA384_HMAC,
+ hmac_sha384_reference,
+ ARRAY_SIZE(hmac_sha384_reference),
+ false);
+}
+
static int check_alg_hmac_sha512(void)
{
return check_alg_support(ODP_CIPHER_ALG_NULL, ODP_AUTH_ALG_SHA512_HMAC);
@@ -1237,6 +1287,39 @@ static void crypto_test_check_alg_hmac_sha512(void)
false);
}
+static int check_alg_aes_xcbc(void)
+{
+ return check_alg_support(ODP_CIPHER_ALG_NULL,
+ ODP_AUTH_ALG_AES_XCBC_MAC);
+}
+
+/* This test verifies the correctness of AES_XCBC_MAC digest operation.
+ * The output check length is truncated to 16 bytes (128 bits) as
+ * returned by the crypto operation API call.
+ * Note that hash digest is a one-way operation.
+ * In addition the test verifies if the implementation can use the
+ * packet buffer as completion event buffer.
+ * */
+static void crypto_test_gen_alg_aes_xcbc(void)
+{
+ check_alg(ODP_CRYPTO_OP_ENCODE,
+ ODP_CIPHER_ALG_NULL,
+ ODP_AUTH_ALG_AES_XCBC_MAC,
+ aes_xcbc_reference,
+ ARRAY_SIZE(aes_xcbc_reference),
+ false);
+}
+
+static void crypto_test_check_alg_aes_xcbc(void)
+{
+ check_alg(ODP_CRYPTO_OP_DECODE,
+ ODP_CIPHER_ALG_NULL,
+ ODP_AUTH_ALG_AES_XCBC_MAC,
+ aes_xcbc_reference,
+ ARRAY_SIZE(aes_xcbc_reference),
+ false);
+}
+
static int check_alg_aes_gmac(void)
{
return check_alg_support(ODP_CIPHER_ALG_NULL, ODP_AUTH_ALG_AES_GMAC);
@@ -1424,10 +1507,18 @@ odp_testinfo_t crypto_suite[] = {
check_alg_hmac_sha256),
ODP_TEST_INFO_CONDITIONAL(crypto_test_check_alg_hmac_sha256,
check_alg_hmac_sha256),
+ ODP_TEST_INFO_CONDITIONAL(crypto_test_gen_alg_hmac_sha384,
+ check_alg_hmac_sha384),
+ ODP_TEST_INFO_CONDITIONAL(crypto_test_check_alg_hmac_sha384,
+ check_alg_hmac_sha384),
ODP_TEST_INFO_CONDITIONAL(crypto_test_gen_alg_hmac_sha512,
check_alg_hmac_sha512),
ODP_TEST_INFO_CONDITIONAL(crypto_test_check_alg_hmac_sha512,
check_alg_hmac_sha512),
+ ODP_TEST_INFO_CONDITIONAL(crypto_test_gen_alg_aes_xcbc,
+ check_alg_aes_xcbc),
+ ODP_TEST_INFO_CONDITIONAL(crypto_test_check_alg_aes_xcbc,
+ check_alg_aes_xcbc),
ODP_TEST_INFO_CONDITIONAL(crypto_test_gen_alg_aes_gmac,
check_alg_aes_gmac),
ODP_TEST_INFO_CONDITIONAL(crypto_test_gen_alg_aes_gmac_ovr_iv,
diff --git a/test/validation/api/crypto/test_vectors.h b/test/validation/api/crypto/test_vectors.h
index 23ed95251..9adb43324 100644
--- a/test/validation/api/crypto/test_vectors.h
+++ b/test/validation/api/crypto/test_vectors.h
@@ -1188,6 +1188,134 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
}
};
+static crypto_test_reference_t hmac_sha384_reference[] = {
+ {
+ .auth_key_length = HMAC_SHA384_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_SHA384_192_CHECK_LEN,
+ .digest = { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62,
+ 0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f,
+ 0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6 }
+ },
+ {
+ .auth_key_length = HMAC_SHA384_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_SHA384_192_CHECK_LEN,
+ .digest = { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31,
+ 0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b,
+ 0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47 }
+ },
+ {
+ .auth_key_length = HMAC_SHA384_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, 0x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65, 0x72, 0x65},
+ .digest_length = HMAC_SHA384_CHECK_LEN,
+ .digest = { 0xaf, 0xd0, 0x39, 0x44, 0xd8, 0x48, 0x95, 0x62,
+ 0x6b, 0x08, 0x25, 0xf4, 0xab, 0x46, 0x90, 0x7f,
+ 0x15, 0xf9, 0xda, 0xdb, 0xe4, 0x10, 0x1e, 0xc6,
+ 0x82, 0xaa, 0x03, 0x4c, 0x7c, 0xeb, 0xc5, 0x9c,
+ 0xfa, 0xea, 0x9e, 0xa9, 0x07, 0x6e, 0xde, 0x7f,
+ 0x4a, 0xf1, 0x52, 0xe8, 0xb2, 0xfa, 0x9c, 0xb6 }
+ },
+ {
+ .auth_key_length = HMAC_SHA384_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_SHA384_CHECK_LEN,
+ .digest = { 0xaf, 0x45, 0xd2, 0xe3, 0x76, 0x48, 0x40, 0x31,
+ 0x61, 0x7f, 0x78, 0xd2, 0xb5, 0x8a, 0x6b, 0x1b,
+ 0x9c, 0x7e, 0xf4, 0x64, 0xf5, 0xa0, 0x1b, 0x47,
+ 0xe4, 0x2e, 0xc3, 0x73, 0x63, 0x22, 0x44, 0x5e,
+ 0x8e, 0x22, 0x40, 0xca, 0x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a8, 0x6f,
+ 0x0a, 0xa6, 0x35, 0xd9, 0x47, 0xac, 0x9f, 0xeb,
+ 0xe8, 0x3e, 0xf4, 0xe5, 0x59, 0x66, 0x14, 0x4b,
+ 0x2a, 0x5a, 0xb3, 0x9d, 0xc1, 0x38, 0x14, 0xb9,
+ 0x4e, 0x3a, 0xb6, 0xe1, 0x01, 0xa3, 0x4f, 0x27 }
+ }
+};
+
static crypto_test_reference_t hmac_sha512_reference[] = {
{
.auth_key_length = HMAC_SHA512_KEY_LEN,
@@ -1325,4 +1453,85 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
}
};
+static crypto_test_reference_t aes_xcbc_reference[] = {
+ {
+ .auth_key_length = AES_XCBC_MAC_KEY_LEN,
+ .auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .length = 3,
+ .plaintext = { 0x00, 0x01, 0x02 },
+ .ciphertext = { 0x00, 0x01, 0x02 },
+ .digest_length = AES_XCBC_MAC_96_CHECK_LEN,
+ .digest = { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf,
+ 0xe7, 0x21, 0x9c, 0xee }
+ },
+ {
+ .auth_key_length = AES_XCBC_MAC_KEY_LEN,
+ .auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .length = 16,
+ .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .digest_length = AES_XCBC_MAC_96_CHECK_LEN,
+ .digest = { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7,
+ 0x99, 0x98, 0xa4, 0x39 }
+ },
+ {
+ .auth_key_length = AES_XCBC_MAC_KEY_LEN,
+ .auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .length = 20,
+ .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13 },
+ .ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13 },
+ .digest_length = AES_XCBC_MAC_96_CHECK_LEN,
+ .digest = { 0x47, 0xf5, 0x1b, 0x45, 0x64, 0x96, 0x62, 0x15,
+ 0xb8, 0x98, 0x5c, 0x63 }
+ },
+ {
+ .auth_key_length = AES_XCBC_MAC_KEY_LEN,
+ .auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .length = 3,
+ .plaintext = { 0x00, 0x01, 0x02 },
+ .ciphertext = { 0x00, 0x01, 0x02 },
+ .digest_length = AES_XCBC_MAC_CHECK_LEN,
+ .digest = { 0x5b, 0x37, 0x65, 0x80, 0xae, 0x2f, 0x19, 0xaf,
+ 0xe7, 0x21, 0x9c, 0xee, 0xf1, 0x72, 0x75, 0x6f }
+ },
+ {
+ .auth_key_length = AES_XCBC_MAC_KEY_LEN,
+ .auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .length = 16,
+ .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .digest_length = AES_XCBC_MAC_CHECK_LEN,
+ .digest = { 0xd2, 0xa2, 0x46, 0xfa, 0x34, 0x9b, 0x68, 0xa7,
+ 0x99, 0x98, 0xa4, 0x39, 0x4f, 0xf7, 0xa2, 0x63 }
+ },
+ {
+ .auth_key_length = AES_XCBC_MAC_KEY_LEN,
+ .auth_key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+ .length = 20,
+ .plaintext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13 },
+ .ciphertext = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x10, 0x11, 0x12, 0x13 },
+ .digest_length = AES_XCBC_MAC_CHECK_LEN,
+ .digest = { 0x47, 0xf5, 0x1b, 0x45, 0x64, 0x96, 0x62, 0x15,
+ 0xb8, 0x98, 0x5c, 0x63, 0x05, 0x5e, 0xd3, 0x08 }
+ }
+};
+
#endif
diff --git a/test/validation/api/crypto/test_vectors_len.h b/test/validation/api/crypto/test_vectors_len.h
index 860840cfe..95d202b62 100644
--- a/test/validation/api/crypto/test_vectors_len.h
+++ b/test/validation/api/crypto/test_vectors_len.h
@@ -50,6 +50,11 @@
#define HMAC_SHA1_96_CHECK_LEN 12
#define HMAC_SHA1_CHECK_LEN 20
+/* HMAC-SHA384 */
+#define HMAC_SHA384_KEY_LEN 48
+#define HMAC_SHA384_192_CHECK_LEN 24
+#define HMAC_SHA384_CHECK_LEN 48
+
/* HMAC-SHA512 */
#define HMAC_SHA512_KEY_LEN 64
#define HMAC_SHA512_256_CHECK_LEN 32
@@ -60,4 +65,9 @@
#define CHACHA20_POLY1305_IV_LEN 12
#define CHACHA20_POLY1305_CHECK_LEN 16
+/* AES-XCBC-MAC */
+#define AES_XCBC_MAC_KEY_LEN 16
+#define AES_XCBC_MAC_96_CHECK_LEN 12
+#define AES_XCBC_MAC_CHECK_LEN 16
+
#endif
diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c
index 3e2e743d2..7c82d85a4 100644
--- a/test/validation/api/ipsec/ipsec.c
+++ b/test/validation/api/ipsec/ipsec.c
@@ -204,10 +204,18 @@ int ipsec_check(odp_bool_t ah,
if (!capa.auths.bit.sha256_hmac)
return ODP_TEST_INACTIVE;
break;
+ case ODP_AUTH_ALG_SHA384_HMAC:
+ if (!capa.auths.bit.sha384_hmac)
+ return ODP_TEST_INACTIVE;
+ break;
case ODP_AUTH_ALG_SHA512_HMAC:
if (!capa.auths.bit.sha512_hmac)
return ODP_TEST_INACTIVE;
break;
+ case ODP_AUTH_ALG_AES_XCBC_MAC:
+ if (!capa.auths.bit.aes_xcbc_mac)
+ return ODP_TEST_INACTIVE;
+ break;
case ODP_AUTH_ALG_AES_GCM:
if (!capa.auths.bit.aes_gcm)
return ODP_TEST_INACTIVE;