crypto: tcrypt - add xts(serpent) tests
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Tue, 18 Oct 2011 10:33:22 +0000 (13:33 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 9 Nov 2011 03:57:56 +0000 (11:57 +0800)
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/tcrypt.c
crypto/tcrypt.h

index 01203833ccc297c1c1a0a1090d1af8c338b536a4..a66459594bedc57e97adbe9e0b3f0db5a966f77a 100644 (file)
@@ -998,6 +998,7 @@ static int do_test(int m)
                ret += tcrypt_test("cbc(serpent)");
                ret += tcrypt_test("ctr(serpent)");
                ret += tcrypt_test("lrw(serpent)");
+               ret += tcrypt_test("xts(serpent)");
                break;
 
        case 10:
@@ -1315,6 +1316,10 @@ static int do_test(int m)
                                  speed_template_32_48);
                test_cipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
                                  speed_template_32_48);
+               test_cipher_speed("xts(serpent)", ENCRYPT, sec, NULL, 0,
+                                 speed_template_32_64);
+               test_cipher_speed("xts(serpent)", DECRYPT, sec, NULL, 0,
+                                 speed_template_32_64);
                break;
 
        case 300:
@@ -1535,6 +1540,10 @@ static int do_test(int m)
                                   speed_template_32_48);
                test_acipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
                                   speed_template_32_48);
+               test_acipher_speed("xts(serpent)", ENCRYPT, sec, NULL, 0,
+                                  speed_template_32_64);
+               test_acipher_speed("xts(serpent)", DECRYPT, sec, NULL, 0,
+                                  speed_template_32_64);
                break;
 
        case 1000:
index 3eceaef2754d5d3b66c2057444100bb5f44d5711..5be1fc8c1ab349e051bbb18efc4f37737abe1d5d 100644 (file)
@@ -53,6 +53,7 @@ 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};
+static u8 speed_template_32_64[] = {32, 64, 0};
 
 /*
  * Digest speed tests