aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.c
diff options
context:
space:
mode:
authorJohannes Goetzfried <Johannes.Goetzfried@informatik.stud.uni-erlangen.de>2012-07-11 13:38:29 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2012-08-01 05:47:30 -0400
commit9b8b04051d0df1e2c7c31206caff05673a2c685f (patch)
treef41ccc3c93237e887e02868ac75e747c4314be8a /crypto/tcrypt.c
parent2b49b906729644dd4696b9291b7e2f6cd1266dc0 (diff)
crypto: testmgr - add larger cast6 testvectors
New ECB, CBC, CTR, LRW and XTS testvectors for cast6. We need larger testvectors to check parallel code paths in the optimized implementation. Tests have also been added to the tcrypt module. Signed-off-by: Johannes Goetzfried <Johannes.Goetzfried@informatik.stud.uni-erlangen.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r--crypto/tcrypt.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index a94bbd77dc60..871076b1e0ab 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -1043,6 +1043,10 @@ static int do_test(int m)
1043 1043
1044 case 15: 1044 case 15:
1045 ret += tcrypt_test("ecb(cast6)"); 1045 ret += tcrypt_test("ecb(cast6)");
1046 ret += tcrypt_test("cbc(cast6)");
1047 ret += tcrypt_test("ctr(cast6)");
1048 ret += tcrypt_test("lrw(cast6)");
1049 ret += tcrypt_test("xts(cast6)");
1046 break; 1050 break;
1047 1051
1048 case 16: 1052 case 16:
@@ -1376,6 +1380,29 @@ static int do_test(int m)
1376 speed_template_8_16); 1380 speed_template_8_16);
1377 break; 1381 break;
1378 1382
1383 case 210:
1384 test_cipher_speed("ecb(cast6)", ENCRYPT, sec, NULL, 0,
1385 speed_template_16_32);
1386 test_cipher_speed("ecb(cast6)", DECRYPT, sec, NULL, 0,
1387 speed_template_16_32);
1388 test_cipher_speed("cbc(cast6)", ENCRYPT, sec, NULL, 0,
1389 speed_template_16_32);
1390 test_cipher_speed("cbc(cast6)", DECRYPT, sec, NULL, 0,
1391 speed_template_16_32);
1392 test_cipher_speed("ctr(cast6)", ENCRYPT, sec, NULL, 0,
1393 speed_template_16_32);
1394 test_cipher_speed("ctr(cast6)", DECRYPT, sec, NULL, 0,
1395 speed_template_16_32);
1396 test_cipher_speed("lrw(cast6)", ENCRYPT, sec, NULL, 0,
1397 speed_template_32_48);
1398 test_cipher_speed("lrw(cast6)", DECRYPT, sec, NULL, 0,
1399 speed_template_32_48);
1400 test_cipher_speed("xts(cast6)", ENCRYPT, sec, NULL, 0,
1401 speed_template_32_64);
1402 test_cipher_speed("xts(cast6)", DECRYPT, sec, NULL, 0,
1403 speed_template_32_64);
1404 break;
1405
1379 case 300: 1406 case 300:
1380 /* fall through */ 1407 /* fall through */
1381 1408
@@ -1671,6 +1698,29 @@ static int do_test(int m)
1671 speed_template_8_16); 1698 speed_template_8_16);
1672 break; 1699 break;
1673 1700
1701 case 507:
1702 test_acipher_speed("ecb(cast6)", ENCRYPT, sec, NULL, 0,
1703 speed_template_16_32);
1704 test_acipher_speed("ecb(cast6)", DECRYPT, sec, NULL, 0,
1705 speed_template_16_32);
1706 test_acipher_speed("cbc(cast6)", ENCRYPT, sec, NULL, 0,
1707 speed_template_16_32);
1708 test_acipher_speed("cbc(cast6)", DECRYPT, sec, NULL, 0,
1709 speed_template_16_32);
1710 test_acipher_speed("ctr(cast6)", ENCRYPT, sec, NULL, 0,
1711 speed_template_16_32);
1712 test_acipher_speed("ctr(cast6)", DECRYPT, sec, NULL, 0,
1713 speed_template_16_32);
1714 test_acipher_speed("lrw(cast6)", ENCRYPT, sec, NULL, 0,
1715 speed_template_32_48);
1716 test_acipher_speed("lrw(cast6)", DECRYPT, sec, NULL, 0,
1717 speed_template_32_48);
1718 test_acipher_speed("xts(cast6)", ENCRYPT, sec, NULL, 0,
1719 speed_template_32_64);
1720 test_acipher_speed("xts(cast6)", DECRYPT, sec, NULL, 0,
1721 speed_template_32_64);
1722 break;
1723
1674 case 1000: 1724 case 1000:
1675 test_available(); 1725 test_available();
1676 break; 1726 break;