summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-10-18 13:32:39 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2011-11-09 11:52:19 +0800
commit061aa4aa7a8c5bfb76716c2ff1d3a1a440a75c6c (patch)
tree0a0fffbc7c82a52ff5795e9931e1bbb68f013be3
parent7602fe866c42c57b5fa87275a5bb594ada77ee54 (diff)
downloadlinux-crypto-061aa4aa7a8c5bfb76716c2ff1d3a1a440a75c6c.tar.gz
linux-crypto-061aa4aa7a8c5bfb76716c2ff1d3a1a440a75c6c.zip
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>
-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 5526065e..9a9e1700 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -996,6 +996,7 @@ static int do_test(int m)
ret += tcrypt_test("ecb(serpent)");
ret += tcrypt_test("cbc(serpent)");
ret += tcrypt_test("ctr(serpent)");
+ ret += tcrypt_test("lrw(serpent)");
break;
case 10:
@@ -1305,6 +1306,10 @@ static int do_test(int m)
speed_template_16_32);
test_cipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
+ test_cipher_speed("lrw(serpent)", ENCRYPT, sec, NULL, 0,
+ speed_template_32_48);
+ test_cipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
+ speed_template_32_48);
break;
case 300:
@@ -1521,6 +1526,10 @@ static int do_test(int m)
speed_template_16_32);
test_acipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0,
speed_template_16_32);
+ test_acipher_speed("lrw(serpent)", ENCRYPT, sec, NULL, 0,
+ speed_template_32_48);
+ test_acipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
+ speed_template_32_48);
break;
case 1000:
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 10cb9251..3eceaef2 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -51,6 +51,7 @@ static u8 speed_template_8_32[] = {8, 32, 0};
static u8 speed_template_16_32[] = {16, 32, 0};
static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
+static u8 speed_template_32_48[] = {32, 48, 0};
static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
/*