diff options
author | Winston Hudson (b45308) <winston.h.hudson@freescale.com> | 2013-09-18 08:45:43 -0700 |
---|---|---|
committer | Victoria Milhoan <vicki.milhoan@freescale.com> | 2014-11-07 14:53:16 -0700 |
commit | 417cbd5bbe7efd24d3c866d5388c78c68cdbd8d6 (patch) | |
tree | 78c351220234b1889b2546acdf506554f931d941 /crypto | |
parent | 29c52c6701a2fe2c241af13e8c231ea706d53f42 (diff) |
MLK-9710-6 AEAD CBC AES MD5 Test Support
This patch adds support for the following tcrypt test:
(a) "authenc(hmac(md5),cbc(aes))"
Note that CAAM also goes by sec-4.0 or sec-5.0 in other product families (such as QorIQ).
Thus the property names are often tied to the sec-4.0+ nomenclature.
Signed-off-by: Winston Hudson (b45308) <winston.h.hudson@freescale.com>
(cherry picked from commit a8ad8329282f7381c7768b7f3d544864b8e9df33)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/testmgr.c | 12 | ||||
-rw-r--r-- | crypto/testmgr.h | 31 |
2 files changed, 43 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 59d45db3d445..3efb4dbfd2cb 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -1819,6 +1819,18 @@ static const struct alg_test_desc alg_test_descs[] = { } } }, { + .alg = "authenc(hmac(md5),cbc(aes))", + .test = alg_test_aead, + .fips_allowed = 1, + .suite = { + .aead = { + .enc = { + .vecs = hmac_md5_aes_cbc_enc_tv_template, + .count = HMAC_MD5_AES_CBC_ENC_TEST_VECTORS + } + } + } + }, { .alg = "cbc(aes)", .test = alg_test_skcipher, .fips_allowed = 1, diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 0feb6ec4293c..95bf75d900aa 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -94,6 +94,37 @@ struct cprng_testvec { static char zeroed_string[48]; +#define HMAC_MD5_AES_CBC_ENC_TEST_VECTORS 1 + +static struct aead_testvec hmac_md5_aes_cbc_enc_tv_template[] = { + { +#ifdef __LITTLE_ENDIAN + .key = "\x08\x00" /* rta length */ + "\x01\x00" /* rta type */ +#else + .key = "\x00\x08" /* rta length */ + "\x00\x01" /* rta type */ +#endif + "\x00\x00\x00\x10" /* enc key length */ + "\x00\x00\x00\x00\x00\x00\x00\x00" + "\x00\x00\x00\x00\x00\x00\x00\x00" + "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" + "\x51\x2e\x03\xd5\x34\x12\x00\x06", + .klen = 8 + 16 + 16, + .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30" + "\xb4\x22\xda\x80\x2c\x9f\xac\x41", + .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01", + .alen = 8, + .input = "Single block msg", + .ilen = 16, + .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8" + "\x27\x08\x94\x2d\xbe\x77\x18\x1a" + "\x76\xa8\x43\x89\xbd\xfe\xf9\x79" + "\x96\x64\x77\x02\x95\x21\x08\x4c", + .rlen = 16 + 16, + }, +}; + /* * MD4 test vectors from RFC1320 */ |