aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorNitesh Lal <NiteshNarayanLal@freescale.com>2014-05-21 07:39:08 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-05-22 09:03:18 -0400
commit5208ed2ca16526cdbec25abe594a3cc3aea210f4 (patch)
treeb133e5a27ae52c3f6e26db1d72d5693c91958298 /crypto/tcrypt.c
parent9bac019dad8098a77cce555d929f678e22111783 (diff)
crypto: testmgr - add aead cbc des, des3_ede tests
Test vectors were taken from existing test for CBC(DES3_EDE). Associated data has been added to test vectors. HMAC computed with Crypto++ has been used. Following algos have been covered. (a) "authenc(hmac(sha1),cbc(des))" (b) "authenc(hmac(sha1),cbc(des3_ede))" (c) "authenc(hmac(sha224),cbc(des))" (d) "authenc(hmac(sha224),cbc(des3_ede))" (e) "authenc(hmac(sha256),cbc(des))" (f) "authenc(hmac(sha256),cbc(des3_ede))" (g) "authenc(hmac(sha384),cbc(des))" (h) "authenc(hmac(sha384),cbc(des3_ede))" (i) "authenc(hmac(sha512),cbc(des))" (j) "authenc(hmac(sha512),cbc(des3_ede))" Signed-off-by: Vakul Garg <vakul@freescale.com> [NiteshNarayanLal@freescale.com: added hooks for the missing algorithms test and tested the patch] Signed-off-by: Nitesh Lal <NiteshNarayanLal@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 09c93ff216e4..ba247cf30858 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -1519,7 +1519,36 @@ static int do_test(int m)
1519 case 157: 1519 case 157:
1520 ret += tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))"); 1520 ret += tcrypt_test("authenc(hmac(sha1),ecb(cipher_null))");
1521 break; 1521 break;
1522 1522 case 181:
1523 ret += tcrypt_test("authenc(hmac(sha1),cbc(des))");
1524 break;
1525 case 182:
1526 ret += tcrypt_test("authenc(hmac(sha1),cbc(des3_ede))");
1527 break;
1528 case 183:
1529 ret += tcrypt_test("authenc(hmac(sha224),cbc(des))");
1530 break;
1531 case 184:
1532 ret += tcrypt_test("authenc(hmac(sha224),cbc(des3_ede))");
1533 break;
1534 case 185:
1535 ret += tcrypt_test("authenc(hmac(sha256),cbc(des))");
1536 break;
1537 case 186:
1538 ret += tcrypt_test("authenc(hmac(sha256),cbc(des3_ede))");
1539 break;
1540 case 187:
1541 ret += tcrypt_test("authenc(hmac(sha384),cbc(des))");
1542 break;
1543 case 188:
1544 ret += tcrypt_test("authenc(hmac(sha384),cbc(des3_ede))");
1545 break;
1546 case 189:
1547 ret += tcrypt_test("authenc(hmac(sha512),cbc(des))");
1548 break;
1549 case 190:
1550 ret += tcrypt_test("authenc(hmac(sha512),cbc(des3_ede))");
1551 break;
1523 case 200: 1552 case 200:
1524 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0, 1553 test_cipher_speed("ecb(aes)", ENCRYPT, sec, NULL, 0,
1525 speed_template_16_24_32); 1554 speed_template_16_24_32);