mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
crypto: testmgr - add larger cast5 testvectors
New ECB, CBC and CTR testvectors for cast5. 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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
270b0c6b40
commit
a2c5826095
4 changed files with 871 additions and 2 deletions
|
|
@ -1037,6 +1037,8 @@ static int do_test(int m)
|
|||
|
||||
case 14:
|
||||
ret += tcrypt_test("ecb(cast5)");
|
||||
ret += tcrypt_test("cbc(cast5)");
|
||||
ret += tcrypt_test("ctr(cast5)");
|
||||
break;
|
||||
|
||||
case 15:
|
||||
|
|
@ -1359,6 +1361,21 @@ static int do_test(int m)
|
|||
speed_template_8);
|
||||
break;
|
||||
|
||||
case 209:
|
||||
test_cipher_speed("ecb(cast5)", ENCRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_cipher_speed("ecb(cast5)", DECRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_cipher_speed("cbc(cast5)", ENCRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_cipher_speed("cbc(cast5)", DECRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_cipher_speed("ctr(cast5)", ENCRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_cipher_speed("ctr(cast5)", DECRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
/* fall through */
|
||||
|
||||
|
|
@ -1639,6 +1656,21 @@ static int do_test(int m)
|
|||
speed_template_8);
|
||||
break;
|
||||
|
||||
case 506:
|
||||
test_acipher_speed("ecb(cast5)", ENCRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_acipher_speed("ecb(cast5)", DECRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_acipher_speed("cbc(cast5)", ENCRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_acipher_speed("cbc(cast5)", DECRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_acipher_speed("ctr(cast5)", ENCRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
test_acipher_speed("ctr(cast5)", DECRYPT, sec, NULL, 0,
|
||||
speed_template_8_16);
|
||||
break;
|
||||
|
||||
case 1000:
|
||||
test_available();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue