diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2011-10-18 06:33:22 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-08 22:57:56 -0500 |
commit | 5209c07ac3601cfdbe2edff016e80ad93cee8dbc (patch) | |
tree | de277911051a3715cbbf2b37d1f254796717feee /crypto | |
parent | 18be20b9445731c57ef2fa0c7c9e71ac1b4a7872 (diff) |
crypto: tcrypt - add xts(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.c | 9 | ||||
-rw-r--r-- | crypto/tcrypt.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 01203833ccc2..a66459594bed 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -998,6 +998,7 @@ static int do_test(int m) | |||
998 | ret += tcrypt_test("cbc(serpent)"); | 998 | ret += tcrypt_test("cbc(serpent)"); |
999 | ret += tcrypt_test("ctr(serpent)"); | 999 | ret += tcrypt_test("ctr(serpent)"); |
1000 | ret += tcrypt_test("lrw(serpent)"); | 1000 | ret += tcrypt_test("lrw(serpent)"); |
1001 | ret += tcrypt_test("xts(serpent)"); | ||
1001 | break; | 1002 | break; |
1002 | 1003 | ||
1003 | case 10: | 1004 | case 10: |
@@ -1315,6 +1316,10 @@ static int do_test(int m) | |||
1315 | speed_template_32_48); | 1316 | speed_template_32_48); |
1316 | test_cipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0, | 1317 | test_cipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0, |
1317 | speed_template_32_48); | 1318 | speed_template_32_48); |
1319 | test_cipher_speed("xts(serpent)", ENCRYPT, sec, NULL, 0, | ||
1320 | speed_template_32_64); | ||
1321 | test_cipher_speed("xts(serpent)", DECRYPT, sec, NULL, 0, | ||
1322 | speed_template_32_64); | ||
1318 | break; | 1323 | break; |
1319 | 1324 | ||
1320 | case 300: | 1325 | case 300: |
@@ -1535,6 +1540,10 @@ static int do_test(int m) | |||
1535 | speed_template_32_48); | 1540 | speed_template_32_48); |
1536 | test_acipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0, | 1541 | test_acipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0, |
1537 | speed_template_32_48); | 1542 | speed_template_32_48); |
1543 | test_acipher_speed("xts(serpent)", ENCRYPT, sec, NULL, 0, | ||
1544 | speed_template_32_64); | ||
1545 | test_acipher_speed("xts(serpent)", DECRYPT, sec, NULL, 0, | ||
1546 | speed_template_32_64); | ||
1538 | break; | 1547 | break; |
1539 | 1548 | ||
1540 | case 1000: | 1549 | case 1000: |
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 3eceaef2754d..5be1fc8c1ab3 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h | |||
@@ -53,6 +53,7 @@ static u8 speed_template_16_24_32[] = {16, 24, 32, 0}; | |||
53 | static u8 speed_template_32_40_48[] = {32, 40, 48, 0}; | 53 | static u8 speed_template_32_40_48[] = {32, 40, 48, 0}; |
54 | static u8 speed_template_32_48[] = {32, 48, 0}; | 54 | static u8 speed_template_32_48[] = {32, 48, 0}; |
55 | static u8 speed_template_32_48_64[] = {32, 48, 64, 0}; | 55 | static u8 speed_template_32_48_64[] = {32, 48, 64, 0}; |
56 | static u8 speed_template_32_64[] = {32, 64, 0}; | ||
56 | 57 | ||
57 | /* | 58 | /* |
58 | * Digest speed tests | 59 | * Digest speed tests |