aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-10-18 06:32:39 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2011-11-08 22:52:19 -0500
commit87aae4bfb2912d18f2c92a4484b9edcc8c7b3f21 (patch)
tree58fc85f17d80f1b4bcc1bb18150d389d3a854145 /crypto
parentd7bfc0fa31bc237a5d49e9c5638676a5dedff6fc (diff)
crypto: tcrypt - add lrw(serpent) tests
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/tcrypt.c9
-rw-r--r--crypto/tcrypt.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 5526065e8e79..9a9e170035d1 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -996,6 +996,7 @@ static int do_test(int m)
996 ret += tcrypt_test("ecb(serpent)"); 996 ret += tcrypt_test("ecb(serpent)");
997 ret += tcrypt_test("cbc(serpent)"); 997 ret += tcrypt_test("cbc(serpent)");
998 ret += tcrypt_test("ctr(serpent)"); 998 ret += tcrypt_test("ctr(serpent)");
999 ret += tcrypt_test("lrw(serpent)");
999 break; 1000 break;
1000 1001
1001 case 10: 1002 case 10:
@@ -1305,6 +1306,10 @@ static int do_test(int m)
1305 speed_template_16_32); 1306 speed_template_16_32);
1306 test_cipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0, 1307 test_cipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0,
1307 speed_template_16_32); 1308 speed_template_16_32);
1309 test_cipher_speed("lrw(serpent)", ENCRYPT, sec, NULL, 0,
1310 speed_template_32_48);
1311 test_cipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
1312 speed_template_32_48);
1308 break; 1313 break;
1309 1314
1310 case 300: 1315 case 300:
@@ -1521,6 +1526,10 @@ static int do_test(int m)
1521 speed_template_16_32); 1526 speed_template_16_32);
1522 test_acipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0, 1527 test_acipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0,
1523 speed_template_16_32); 1528 speed_template_16_32);
1529 test_acipher_speed("lrw(serpent)", ENCRYPT, sec, NULL, 0,
1530 speed_template_32_48);
1531 test_acipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
1532 speed_template_32_48);
1524 break; 1533 break;
1525 1534
1526 case 1000: 1535 case 1000:
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 10cb925132c9..3eceaef2754d 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -51,6 +51,7 @@ static u8 speed_template_8_32[] = {8, 32, 0};
51static u8 speed_template_16_32[] = {16, 32, 0}; 51static u8 speed_template_16_32[] = {16, 32, 0};
52static u8 speed_template_16_24_32[] = {16, 24, 32, 0}; 52static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
53static u8 speed_template_32_40_48[] = {32, 40, 48, 0}; 53static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
54static u8 speed_template_32_48[] = {32, 48, 0};
54static u8 speed_template_32_48_64[] = {32, 48, 64, 0}; 55static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
55 56
56/* 57/*