aboutsummaryrefslogtreecommitdiff
path: root/test/validation/api/crypto/test_vectors.h
diff options
context:
space:
mode:
authorJanne Peltonen <janne.peltonen@nokia.com>2023-05-25 10:42:54 +0300
committerMatias Elo <matias.elo@nokia.com>2023-05-31 11:08:05 +0300
commita8454de2b7767d3f095e5ed9f1ad74b273610da1 (patch)
tree69fd2d832757089a5ee640e61a10a8548b60ee82 /test/validation/api/crypto/test_vectors.h
parentcc87fdb1df326ddc140b5f58c29eeb20c356e803 (diff)
validation: crypto: add crypto algorithm IDs in test vectors
Each test vector is for a specific cipher and/or auth algorithm, but the test vectors do not include the algorithm IDs. This makes it necessary to hardcode the correspondence between algorithms and test vectors in the test code and to carry the algorithm IDs in the code separately alongside the test vectors. Improve the situation by including algorithm IDs in the test vectors. Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Diffstat (limited to 'test/validation/api/crypto/test_vectors.h')
-rw-r--r--test/validation/api/crypto/test_vectors.h126
1 files changed, 125 insertions, 1 deletions
diff --git a/test/validation/api/crypto/test_vectors.h b/test/validation/api/crypto/test_vectors.h
index b9a9c2f06..16683fb94 100644
--- a/test/validation/api/crypto/test_vectors.h
+++ b/test/validation/api/crypto/test_vectors.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2014-2018, Linaro Limited
- * Copyright (c) 2021-2022, Nokia
+ * Copyright (c) 2021-2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
@@ -8,10 +8,13 @@
#ifndef _ODP_TEST_CRYPTO_VECTORS_H_
#define _ODP_TEST_CRYPTO_VECTORS_H_
+#include <odp_api.h>
#include "test_vectors_len.h"
typedef struct crypto_test_reference_s {
uint8_t copy_previous_vector; /* does not copy digest_length */
+ odp_cipher_alg_t cipher;
+ odp_auth_alg_t auth;
uint32_t cipher_key_length;
uint8_t cipher_key[MAX_KEY_LEN];
uint32_t auth_key_length;
@@ -30,6 +33,9 @@ typedef struct crypto_test_reference_s {
uint8_t digest[MAX_DIGEST_LEN];
} crypto_test_reference_t;
+ODP_STATIC_ASSERT(ODP_CIPHER_ALG_NULL == 0, "null cipher is not the default");
+ODP_STATIC_ASSERT(ODP_AUTH_ALG_NULL == 0, "null auth is not the default");
+
/*
* Return test data length in bytes, rounding up to full bytes.
*/
@@ -66,6 +72,7 @@ static crypto_test_reference_t null_reference[] = {
*/
static crypto_test_reference_t tdes_cbc_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_3DES_CBC,
.cipher_key_length = TDES_CBC_KEY_LEN,
.cipher_key = { 0x62, 0x7f, 0x46, 0x0e, 0x08, 0x10, 0x4a, 0x10,
0x43, 0xcd, 0x26, 0x5d, 0x58, 0x40, 0xea, 0xf1,
@@ -77,6 +84,7 @@ static crypto_test_reference_t tdes_cbc_reference[] = {
.ciphertext = { 0xb2, 0x2b, 0x8d, 0x66, 0xde, 0x97, 0x06, 0x92 }
},
{
+ .cipher = ODP_CIPHER_ALG_3DES_CBC,
.cipher_key_length = TDES_CBC_KEY_LEN,
.cipher_key = { 0x37, 0xae, 0x5e, 0xbf, 0x46, 0xdf, 0xf2, 0xdc,
0x07, 0x54, 0xb9, 0x4f, 0x31, 0xcb, 0xb3, 0x85,
@@ -98,6 +106,7 @@ static crypto_test_reference_t tdes_cbc_reference[] = {
static crypto_test_reference_t tdes_ecb_reference[] = {
/* CAVS 18.0 TECBMMT2.rsp #0 */
{
+ .cipher = ODP_CIPHER_ALG_3DES_ECB,
.cipher_key_length = TDES_ECB_KEY_LEN,
.cipher_key = { 0x15, 0x1f, 0x10, 0x38, 0x3d, 0x6d, 0x19, 0x9b,
0x4a, 0x76, 0x3b, 0xd5, 0x4a, 0x46, 0xa4, 0x45,
@@ -108,6 +117,7 @@ static crypto_test_reference_t tdes_ecb_reference[] = {
},
/* CAVS 18.0 TECBMMT2.rsp #2 */
{
+ .cipher = ODP_CIPHER_ALG_3DES_ECB,
.cipher_key_length = TDES_ECB_KEY_LEN,
.cipher_key = { 0xcd, 0x3d, 0x9b, 0xf7, 0x2f, 0x8c, 0x8a, 0xb5,
0xfe, 0xe6, 0x73, 0x34, 0x31, 0x1c, 0xa4, 0x62,
@@ -124,6 +134,7 @@ static crypto_test_reference_t tdes_ecb_reference[] = {
static crypto_test_reference_t aes_cbc_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x06, 0xa9, 0x21, 0x40, 0x36, 0xb8, 0xa1, 0x5b,
0x51, 0x2e, 0x03, 0xd5, 0x34, 0x12, 0x00, 0x06},
@@ -136,6 +147,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x27, 0x08, 0x94, 0x2d, 0xbe, 0x77, 0x18, 0x1a }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xc2, 0x86, 0x69, 0x6d, 0x88, 0x7c, 0x9a, 0xa0,
0x61, 0x1b, 0xbb, 0x3e, 0x20, 0x25, 0xa4, 0x5a},
@@ -153,6 +165,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x1b, 0x82, 0x66, 0xbe, 0xa6, 0xd6, 0x1a, 0xb1 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x6c, 0x3e, 0xa0, 0x47, 0x76, 0x30, 0xce, 0x21,
0xa2, 0xce, 0x33, 0x4a, 0xa7, 0x46, 0xc2, 0xcd},
@@ -169,6 +182,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x85, 0x79, 0x69, 0x5d, 0x83, 0xba, 0x26, 0x84 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x56, 0xe4, 0x7a, 0x38, 0xc5, 0x59, 0x89, 0x74,
0xbc, 0x46, 0x90, 0x3d, 0xba, 0x29, 0x03, 0x49},
@@ -194,6 +208,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0x49, 0xa5, 0x3e, 0x87, 0xf4, 0xc3, 0xda, 0x55 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
@@ -213,6 +228,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -239,6 +255,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
0xd9, 0x20, 0xa9, 0xe6, 0x4f, 0x56, 0x15, 0xcd }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,
@@ -263,6 +280,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CBC,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -294,6 +312,7 @@ static crypto_test_reference_t aes_cbc_reference[] = {
static crypto_test_reference_t aes_ctr_reference[] = {
/* RFC3686 https://tools.ietf.org/html/rfc3686 */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7,
0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63},
@@ -312,6 +331,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -338,6 +358,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* Generated by Crypto++ 5.6.1 (715 bytes data)*/
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -528,6 +549,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* RFC3686 https://tools.ietf.org/html/rfc3686 */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x02, 0xBF, 0x39, 0x1E, 0xE8, 0xEC, 0xB1, 0x59,
0xB9, 0x59, 0x61, 0x7B, 0x09, 0x65, 0x27, 0x9B,
@@ -549,6 +571,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -576,6 +599,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* RFC3686 https://tools.ietf.org/html/rfc3686 */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xFF, 0x7A, 0x61, 0x7C, 0xE6, 0x91, 0x48, 0xE4,
0xF1, 0x72, 0x6E, 0x2F, 0x43, 0x58, 0x1D, 0xE2,
@@ -598,6 +622,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CTR,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -629,6 +654,7 @@ static crypto_test_reference_t aes_ctr_reference[] = {
static crypto_test_reference_t aes_ecb_reference[] = {
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -652,6 +678,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
},
/* Generated by Crypto++ 5.6.1 (528 bytes) */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -791,6 +818,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -815,6 +843,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_ECB,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -843,6 +872,7 @@ static crypto_test_reference_t aes_ecb_reference[] = {
static crypto_test_reference_t aes_cfb128_reference[] = {
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CFB128,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c},
@@ -869,6 +899,7 @@ static crypto_test_reference_t aes_cfb128_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CFB128,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -896,6 +927,7 @@ static crypto_test_reference_t aes_cfb128_reference[] = {
},
/* NIST Special Publication 800-38A */
{
+ .cipher = ODP_CIPHER_ALG_AES_CFB128,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -927,6 +959,7 @@ static crypto_test_reference_t aes_cfb128_reference[] = {
static crypto_test_reference_t aes_xts_reference[] = {
/* CAVS 11.0 XTSGen information, #1 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES128_XTS_KEY_LEN,
.cipher_key = { 0xa1, 0xb9, 0x0c, 0xba, 0x3f, 0x06, 0xac, 0x35,
0x3b, 0x2c, 0x34, 0x38, 0x76, 0x08, 0x17, 0x62,
@@ -943,6 +976,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #101 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES128_XTS_KEY_LEN,
.cipher_key = { 0xb7, 0xb9, 0x3f, 0x51, 0x6a, 0xef, 0x29, 0x5e,
0xff, 0x3a, 0x29, 0xd8, 0x37, 0xcf, 0x1f, 0x13,
@@ -963,6 +997,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #227 TODO (Length 130 bits)*/
/* {
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES128_XTS_KEY_LEN,
.cipher_key = { 0xec, 0x14, 0xc0, 0xa3, 0xb7, 0x72, 0x58, 0x5c,
0x15, 0xd4, 0xeb, 0x94, 0xe6, 0x9e, 0x2c, 0x55,
@@ -981,6 +1016,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
}, */
/* CAVS 11.0 XTSGen information, #1 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES256_XTS_KEY_LEN,
.cipher_key = { 0x1e, 0xa6, 0x61, 0xc5, 0x8d, 0x94, 0x3a, 0x0e,
0x48, 0x01, 0xe4, 0x2f, 0x4b, 0x09, 0x47, 0x14,
@@ -1005,6 +1041,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #110 */
{
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES256_XTS_KEY_LEN,
.cipher_key = { 0x6b, 0x19, 0x84, 0xc2, 0x4e, 0x7e, 0xb6, 0x62,
0x8e, 0x3a, 0x11, 0xc9, 0xcc, 0xd2, 0x59, 0x40,
@@ -1033,6 +1070,7 @@ static crypto_test_reference_t aes_xts_reference[] = {
},
/* CAVS 11.0 XTSGen information, #211 TODO: length 140 bits */
/* {
+ .cipher = ODP_CIPHER_ALG_AES_XTS,
.cipher_key_length = AES256_XTS_KEY_LEN,
.cipher_key = { 0x62, 0xc2, 0xe4, 0xf8, 0x52, 0xa9, 0x3e, 0xea,
0x4a, 0x2f, 0x61, 0xe8, 0x67, 0x68, 0x14, 0xf4,
@@ -1060,6 +1098,8 @@ static crypto_test_reference_t aes_xts_reference[] = {
*/
static crypto_test_reference_t aes_gcm_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
@@ -1093,6 +1133,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x2f, 0xd0, 0x47, 0x96, 0x56, 0x2d, 0xfd, 0xb4 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08},
@@ -1123,6 +1165,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0xc3, 0x09, 0xe9, 0xd8, 0x5a, 0x41, 0xad, 0x4a }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
@@ -1153,6 +1197,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x8a, 0xd2, 0xb6, 0x9e, 0x47, 0x99, 0xc7, 0x1d }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0x3d, 0xe0, 0x98, 0x74, 0xb3, 0x88, 0xe6, 0x49,
0x19, 0x88, 0xd0, 0xc3, 0x60, 0x7e, 0xae, 0x1f},
@@ -1176,6 +1222,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x95, 0xf1, 0x12, 0xe4, 0xe7, 0xd0, 0x5d, 0x35 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c,
0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08,
@@ -1201,6 +1249,8 @@ static crypto_test_reference_t aes_gcm_reference[] = {
0x18, 0x02, 0x7b, 0x5b, 0x4c, 0xd7, 0xa6, 0x36 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_GCM,
+ .auth = ODP_AUTH_ALG_AES_GCM,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xab, 0xbc, 0xcd, 0xde, 0xf0, 0x01, 0x12, 0x23,
0x34, 0x45, 0x56, 0x67, 0x78, 0x89, 0x9a, 0xab,
@@ -1237,6 +1287,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
* AES-CCM reference from RFC 3610
*/
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf},
@@ -1258,6 +1310,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
/* The rest of test vectors are generated manually, no "interesting"
* vectors for use cases in RFC 3610 or SP 800-38C. */
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1278,6 +1332,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0x67, 0xae, 0xc8, 0x0a, 0xc5, 0x88, 0xab, 0x16 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1299,6 +1355,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0xb5, 0x57, 0x2a, 0x17, 0x2d, 0x49, 0x16, 0xd5 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES128_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf},
@@ -1318,6 +1376,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0x63, 0xe7, 0x01, 0x5c, 0x69, 0xaf, 0xb4, 0x0c }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES192_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1338,6 +1398,8 @@ static crypto_test_reference_t aes_ccm_reference[] = {
.digest = { 0x31, 0x29, 0x47, 0xa4, 0x6d, 0x76, 0x34, 0xb4 }
},
{
+ .cipher = ODP_CIPHER_ALG_AES_CCM,
+ .auth = ODP_AUTH_ALG_AES_CCM,
.cipher_key_length = AES256_KEY_LEN,
.cipher_key = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
@@ -1362,6 +1424,7 @@ static crypto_test_reference_t aes_ccm_reference[] = {
static crypto_test_reference_t aes_gmac_reference[] = {
{
+ .auth = ODP_AUTH_ALG_AES_GMAC,
.auth_key_length = AES128_KEY_LEN,
.auth_key = { 0x4c, 0x80, 0xcd, 0xef, 0xbb, 0x5d, 0x10, 0xda,
0x90, 0x6a, 0xc7, 0x3c, 0x36, 0x13, 0xa6, 0x34},
@@ -1393,6 +1456,7 @@ static crypto_test_reference_t aes_gmac_reference[] = {
},
/* AES192-GMAC from DPDK 17.02 */
{
+ .auth = ODP_AUTH_ALG_AES_GMAC,
.auth_key_length = AES192_KEY_LEN,
.auth_key = { 0xaa, 0x74, 0x0a, 0xbf, 0xad, 0xcd, 0xa7, 0x79,
0x22, 0x0d, 0x3b, 0x40, 0x6c, 0x5d, 0x7e, 0xc0,
@@ -1427,6 +1491,7 @@ static crypto_test_reference_t aes_gmac_reference[] = {
},
/* AES256-GMAC from DPDK 17.02 */
{
+ .auth = ODP_AUTH_ALG_AES_GMAC,
.auth_key_length = AES256_KEY_LEN,
.auth_key = { 0xb5, 0x48, 0xe4, 0x93, 0x4f, 0x5c, 0x64, 0xd3,
0xc0, 0xf0, 0xb7, 0x8f, 0x7b, 0x4d, 0x88, 0x24,
@@ -1466,6 +1531,7 @@ static crypto_test_reference_t aes_gmac_reference[] = {
*/
static crypto_test_reference_t aes_cmac_reference[] = {
{
+ .auth = ODP_AUTH_ALG_AES_CMAC,
.auth_key_length = AES128_KEY_LEN,
.auth_key = { 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6,
0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c },
@@ -1484,6 +1550,7 @@ static crypto_test_reference_t aes_cmac_reference[] = {
.digest_length = 12,
},
{
+ .auth = ODP_AUTH_ALG_AES_CMAC,
.auth_key_length = AES192_KEY_LEN,
.auth_key = { 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52,
0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5,
@@ -1503,6 +1570,7 @@ static crypto_test_reference_t aes_cmac_reference[] = {
.digest_length = 12,
},
{
+ .auth = ODP_AUTH_ALG_AES_CMAC,
.auth_key_length = AES256_KEY_LEN,
.auth_key = { 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe,
0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81,
@@ -1529,6 +1597,8 @@ static crypto_test_reference_t aes_cmac_reference[] = {
*/
static crypto_test_reference_t chacha20_poly1305_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_CHACHA20_POLY1305,
+ .auth = ODP_AUTH_ALG_CHACHA20_POLY1305,
.cipher_key_length = CHACHA20_POLY1305_KEY_LEN,
.cipher_key = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
@@ -1576,6 +1646,8 @@ static crypto_test_reference_t chacha20_poly1305_reference[] = {
0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60, 0x06, 0x91 }
},
{
+ .cipher = ODP_CIPHER_ALG_CHACHA20_POLY1305,
+ .auth = ODP_AUTH_ALG_CHACHA20_POLY1305,
.cipher_key_length = CHACHA20_POLY1305_KEY_LEN,
.cipher_key = { 0x1c, 0x92, 0x40, 0xa5, 0xeb, 0x55, 0xd3, 0x8a,
0xf3, 0x33, 0x88, 0x86, 0x04, 0xf6, 0xb5, 0xf0,
@@ -1664,6 +1736,7 @@ static crypto_test_reference_t chacha20_poly1305_reference[] = {
static crypto_test_reference_t hmac_md5_reference[] = {
{
+ .auth = ODP_AUTH_ALG_MD5_HMAC,
.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 },
@@ -1681,6 +1754,7 @@ static crypto_test_reference_t hmac_md5_reference[] = {
.digest_length = HMAC_MD5_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_MD5_HMAC,
.auth_key_length = HMAC_MD5_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1704,6 +1778,7 @@ static crypto_test_reference_t hmac_md5_reference[] = {
.digest_length = HMAC_MD5_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_MD5_HMAC,
.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 },
@@ -1734,6 +1809,7 @@ static crypto_test_reference_t hmac_md5_reference[] = {
static crypto_test_reference_t hmac_sha1_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA1_HMAC,
.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,
@@ -1752,6 +1828,7 @@ static crypto_test_reference_t hmac_sha1_reference[] = {
.digest_length = HMAC_SHA1_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA1_HMAC,
.auth_key_length = HMAC_SHA1_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1775,6 +1852,7 @@ static crypto_test_reference_t hmac_sha1_reference[] = {
.digest_length = HMAC_SHA1_96_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA1_HMAC,
.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,
@@ -1807,6 +1885,7 @@ static crypto_test_reference_t hmac_sha1_reference[] = {
static crypto_test_reference_t hmac_sha224_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA224_HMAC,
.auth_key_length = HMAC_SHA224_KEY_LEN,
.auth_key = { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
@@ -1822,6 +1901,7 @@ static crypto_test_reference_t hmac_sha224_reference[] = {
0x53, 0x68, 0x4b, 0x22 }
},
{
+ .auth = ODP_AUTH_ALG_SHA224_HMAC,
.auth_key_length = HMAC_SHA224_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1842,6 +1922,7 @@ static crypto_test_reference_t hmac_sha224_reference[] = {
0x8f, 0xd0, 0x5e, 0x44 }
},
{
+ .auth = ODP_AUTH_ALG_SHA224_HMAC,
.auth_key_length = HMAC_SHA224_KEY_LEN,
.auth_key = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
@@ -1871,6 +1952,7 @@ static crypto_test_reference_t hmac_sha224_reference[] = {
static crypto_test_reference_t hmac_sha256_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA256_HMAC,
.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,
@@ -1890,6 +1972,7 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
.digest_length = HMAC_SHA256_128_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA256_HMAC,
.auth_key_length = HMAC_SHA256_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1914,6 +1997,7 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
.digest_length = HMAC_SHA256_128_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA256_HMAC,
.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,
@@ -1947,6 +2031,7 @@ static crypto_test_reference_t hmac_sha256_reference[] = {
static crypto_test_reference_t hmac_sha384_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA384_HMAC,
.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,
@@ -1968,6 +2053,7 @@ static crypto_test_reference_t hmac_sha384_reference[] = {
.digest_length = HMAC_SHA384_192_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA384_HMAC,
.auth_key_length = HMAC_SHA384_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -1994,6 +2080,7 @@ static crypto_test_reference_t hmac_sha384_reference[] = {
.digest_length = HMAC_SHA384_192_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA384_HMAC,
.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,
@@ -2029,6 +2116,7 @@ static crypto_test_reference_t hmac_sha384_reference[] = {
static crypto_test_reference_t hmac_sha512_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA512_HMAC,
.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,
@@ -2052,6 +2140,7 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
.digest_length = HMAC_SHA512_256_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA512_HMAC,
.auth_key_length = HMAC_SHA512_KEY_LEN,
/* "Jefe" */
.auth_key = { 0x4a, 0x65, 0x66, 0x65 },
@@ -2080,6 +2169,7 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
.digest_length = HMAC_SHA512_256_CHECK_LEN,
},
{
+ .auth = ODP_AUTH_ALG_SHA512_HMAC,
.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,
@@ -2121,6 +2211,7 @@ static crypto_test_reference_t hmac_sha512_reference[] = {
static crypto_test_reference_t aes_xcbc_reference[] = {
/* Test Case #1 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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},
@@ -2135,6 +2226,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #2 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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 },
@@ -2151,6 +2243,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #3 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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 },
@@ -2169,6 +2262,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #4 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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 },
@@ -2189,6 +2283,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #5 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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},
@@ -2211,6 +2306,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #6 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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},
@@ -2235,6 +2331,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
},
/* Test Case #7 */
{
+ .auth = ODP_AUTH_ALG_AES_XCBC_MAC,
.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},
@@ -2263,6 +2360,7 @@ static crypto_test_reference_t aes_xcbc_reference[] = {
*/
static crypto_test_reference_t kasumi_f8_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_KASUMI_F8,
.cipher_key_length = KASUMI_F8_KEY_LEN,
.cipher_key = { 0x5a, 0xcb, 0x1d, 0x64, 0x4c, 0x0d, 0x51, 0x20,
0x4e, 0xa5, 0xf1, 0x45, 0x10, 0x10, 0xd8, 0x52},
@@ -2279,6 +2377,7 @@ static crypto_test_reference_t kasumi_f8_reference[] = {
static crypto_test_reference_t kasumi_f9_reference[] = {
{
+ .auth = ODP_AUTH_ALG_KASUMI_F9,
.auth_key_length = KASUMI_F9_KEY_LEN,
.auth_key = { 0xc7, 0x36, 0xc6, 0xaa, 0xb2, 0x2b, 0xff, 0xf9,
0x1e, 0x26, 0x98, 0xd2, 0xe2, 0x2a, 0xd5, 0x7e },
@@ -2314,6 +2413,7 @@ static crypto_test_reference_t kasumi_f9_reference[] = {
*/
static crypto_test_reference_t snow3g_uea2_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_SNOW3G_UEA2,
.cipher_key_length = SNOW3G_UEA2_KEY_LEN,
.cipher_key = { 0x5a, 0xcb, 0x1d, 0x64, 0x4c, 0x0d, 0x51, 0x20,
0x4e, 0xa5, 0xf1, 0x45, 0x10, 0x10, 0xd8, 0x52},
@@ -2331,6 +2431,7 @@ static crypto_test_reference_t snow3g_uea2_reference[] = {
static crypto_test_reference_t snow3g_uia2_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SNOW3G_UIA2,
.auth_key_length = SNOW3G_UIA2_KEY_LEN,
.auth_key = { 0xc7, 0x36, 0xc6, 0xaa, 0xb2, 0x2b, 0xff, 0xf9,
0x1e, 0x26, 0x98, 0xd2, 0xe2, 0x2a, 0xd5, 0x7e},
@@ -2363,6 +2464,7 @@ static crypto_test_reference_t snow3g_uia2_reference[] = {
*/
static crypto_test_reference_t aes_eea2_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_AES_EEA2,
.cipher_key_length = AES_EEA2_KEY_LEN,
.cipher_key = { 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C,
0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1},
@@ -2380,6 +2482,7 @@ static crypto_test_reference_t aes_eea2_reference[] = {
0x3C, 0x22, 0xD7, 0xBD, 0xEE, 0xED, 0x8E, 0x78}
},
{
+ .cipher = ODP_CIPHER_ALG_AES_EEA2,
.cipher_key_length = AES_EEA2_KEY_LEN,
.cipher_key = { 0x2B, 0xD6, 0x45, 0x9F, 0x82, 0xC4, 0x40, 0xE0,
0x95, 0x2C, 0x49, 0x10, 0x48, 0x05, 0xFF, 0x48},
@@ -2419,6 +2522,7 @@ static crypto_test_reference_t aes_eea2_reference[] = {
static crypto_test_reference_t aes_eia2_reference[] = {
/* 3GPP TS 33.401, C.2.1 */
{
+ .auth = ODP_AUTH_ALG_AES_EIA2,
.auth_key_length = AES_EIA2_KEY_LEN,
.auth_key = { 0x2b, 0xd6, 0x45, 0x9f, 0x82, 0xc5, 0xb3, 0x00,
0x95, 0x2c, 0x49, 0x10, 0x48, 0x81, 0xff, 0x48 },
@@ -2433,6 +2537,7 @@ static crypto_test_reference_t aes_eia2_reference[] = {
},
/* 3GPP TS 33.401, C.2.2. */
{
+ .auth = ODP_AUTH_ALG_AES_EIA2,
.auth_key_length = AES_EIA2_KEY_LEN,
.auth_key = { 0xD3, 0xC5, 0xD5, 0x92, 0x32, 0x7F, 0xB1, 0x1C,
0x40, 0x35, 0xC6, 0x68, 0x0A, 0xF8, 0xC6, 0xD1 },
@@ -2447,6 +2552,7 @@ static crypto_test_reference_t aes_eia2_reference[] = {
},
/* 3GPP TS 33.401, C.2.5 */
{
+ .auth = ODP_AUTH_ALG_AES_EIA2,
.auth_key_length = AES_EIA2_KEY_LEN,
.auth_key = { 0x83, 0xfd, 0x23, 0xa2, 0x44, 0xa7, 0x4c, 0xf3,
0x58, 0xda, 0x30, 0x19, 0xf1, 0x72, 0x26, 0x35 },
@@ -2493,6 +2599,7 @@ static crypto_test_reference_t aes_eia2_reference[] = {
*/
static crypto_test_reference_t zuc_eea3_reference[] = {
{
+ .cipher = ODP_CIPHER_ALG_ZUC_EEA3,
.cipher_key_length = ZUC_EEA3_KEY_LEN,
.cipher_key = { 0xe5, 0xbd, 0x3e, 0xa0, 0xeb, 0x55, 0xad, 0xe8,
0x66, 0xc6, 0xac, 0x58, 0xbd, 0x54, 0x30, 0x2a},
@@ -2531,6 +2638,7 @@ static crypto_test_reference_t zuc_eea3_reference[] = {
/* Privately generated test data */
{
+ .cipher = ODP_CIPHER_ALG_ZUC_EEA3,
.cipher_key_length = ZUC_EEA3_256_KEY_LEN,
.cipher_key = { 0xf7, 0xb4, 0x04, 0x5a, 0x81, 0x5c, 0x1b, 0x01,
0x82, 0xf9, 0xf4, 0x26, 0x80, 0xd4, 0x56, 0x26,
@@ -2578,6 +2686,7 @@ static crypto_test_reference_t zuc_eea3_reference[] = {
},
/* Privately generated test data */
{
+ .cipher = ODP_CIPHER_ALG_ZUC_EEA3,
.cipher_key_length = ZUC_EEA3_256_KEY_LEN,
.cipher_key = { 0x1d, 0x0f, 0x0e, 0x75, 0x86, 0xb3, 0xfc, 0x65,
0x94, 0xbf, 0xaa, 0xa8, 0xf5, 0xd0, 0x0f, 0xe8,
@@ -2657,6 +2766,7 @@ static crypto_test_reference_t zuc_eea3_reference[] = {
static crypto_test_reference_t zuc_eia3_reference[] = {
{
+ .auth = ODP_AUTH_ALG_ZUC_EIA3,
.auth_key_length = ZUC_EIA3_KEY_LEN,
.auth_key = { 0xc9, 0xe6, 0xce, 0xc4, 0x60, 0x7c, 0x72, 0xdb,
0x00, 0x0a, 0xef, 0xa8, 0x83, 0x85, 0xab, 0x0a },
@@ -2690,6 +2800,7 @@ static crypto_test_reference_t zuc_eia3_reference[] = {
},
/* Privately generated test data */
{
+ .auth = ODP_AUTH_ALG_ZUC_EIA3,
.auth_key_length = ZUC_EIA3_256_KEY_LEN,
.auth_key = { 0xe3, 0x8e, 0xaf, 0x08, 0xde, 0x8c, 0x08, 0x41,
0x7f, 0x2b, 0x97, 0x20, 0x10, 0x87, 0xc7, 0xf7,
@@ -2719,6 +2830,7 @@ static crypto_test_reference_t zuc_eia3_reference[] = {
},
/* Privately generated test data */
{
+ .auth = ODP_AUTH_ALG_ZUC_EIA3,
.auth_key_length = ZUC_EIA3_256_KEY_LEN,
.auth_key = { 0x6a, 0x7e, 0x4c, 0x7e, 0x51, 0x25, 0xb3, 0x48,
0x84, 0x53, 0x3a, 0x94, 0xfb, 0x31, 0x99, 0x90,
@@ -2831,6 +2943,7 @@ static crypto_test_reference_t zuc_eia3_reference[] = {
*/
static crypto_test_reference_t md5_reference[] = {
{
+ .auth = ODP_AUTH_ALG_MD5,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2839,6 +2952,7 @@ static crypto_test_reference_t md5_reference[] = {
0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72}
},
{
+ .auth = ODP_AUTH_ALG_MD5,
.length = 62,
.plaintext = { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
@@ -2867,6 +2981,7 @@ static crypto_test_reference_t md5_reference[] = {
*/
static crypto_test_reference_t sha1_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA1,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2876,6 +2991,7 @@ static crypto_test_reference_t sha1_reference[] = {
0x9C, 0xD0, 0xD8, 0x9D},
},
{
+ .auth = ODP_AUTH_ALG_SHA1,
.length = 56,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
@@ -2900,6 +3016,7 @@ static crypto_test_reference_t sha1_reference[] = {
static crypto_test_reference_t sha224_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA224,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2910,6 +3027,7 @@ static crypto_test_reference_t sha224_reference[] = {
0xe3, 0x6c, 0x9d, 0xa7 },
},
{
+ .auth = ODP_AUTH_ALG_SHA224,
.length = 56,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
@@ -2935,6 +3053,7 @@ static crypto_test_reference_t sha224_reference[] = {
static crypto_test_reference_t sha256_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA256,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2945,6 +3064,7 @@ static crypto_test_reference_t sha256_reference[] = {
0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad},
},
{
+ .auth = ODP_AUTH_ALG_SHA256,
.length = 56,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x62, 0x63, 0x64, 0x65,
0x63, 0x64, 0x65, 0x66, 0x64, 0x65, 0x66, 0x67,
@@ -2970,6 +3090,7 @@ static crypto_test_reference_t sha256_reference[] = {
static crypto_test_reference_t sha384_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA384,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -2982,6 +3103,7 @@ static crypto_test_reference_t sha384_reference[] = {
0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7},
},
{
+ .auth = ODP_AUTH_ALG_SHA384,
.length = 112,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
@@ -3023,6 +3145,7 @@ static crypto_test_reference_t sha384_reference[] = {
static crypto_test_reference_t sha512_reference[] = {
{
+ .auth = ODP_AUTH_ALG_SHA512,
.length = 3,
.plaintext = { 0x61, 0x62, 0x63 },
.ciphertext = { 0x61, 0x62, 0x63 },
@@ -3037,6 +3160,7 @@ static crypto_test_reference_t sha512_reference[] = {
0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f},
},
{
+ .auth = ODP_AUTH_ALG_SHA512,
.length = 112,
.plaintext = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,