crypto: tcrypt - add serpent speed tests
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Mon, 17 Oct 2011 21:03:03 +0000 (00:03 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 9 Nov 2011 03:42:59 +0000 (11:42 +0800)
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/tcrypt.c

index dd3a0f8a09125dfbea277d3f04a7248393a843b2..5526065e8e79f32351d31ccf5cf1c50995b1221a 100644 (file)
@@ -1292,6 +1292,21 @@ static int do_test(int m)
                                  speed_template_16_32);
                break;
 
+       case 207:
+               test_cipher_speed("ecb(serpent)", ENCRYPT, sec, NULL, 0,
+                                 speed_template_16_32);
+               test_cipher_speed("ecb(serpent)", DECRYPT, sec, NULL, 0,
+                                 speed_template_16_32);
+               test_cipher_speed("cbc(serpent)", ENCRYPT, sec, NULL, 0,
+                                 speed_template_16_32);
+               test_cipher_speed("cbc(serpent)", DECRYPT, sec, NULL, 0,
+                                 speed_template_16_32);
+               test_cipher_speed("ctr(serpent)", ENCRYPT, sec, NULL, 0,
+                                 speed_template_16_32);
+               test_cipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0,
+                                 speed_template_16_32);
+               break;
+
        case 300:
                /* fall through */
 
@@ -1493,6 +1508,21 @@ static int do_test(int m)
                                   speed_template_8);
                break;
 
+       case 503:
+               test_acipher_speed("ecb(serpent)", ENCRYPT, sec, NULL, 0,
+                                  speed_template_16_32);
+               test_acipher_speed("ecb(serpent)", DECRYPT, sec, NULL, 0,
+                                  speed_template_16_32);
+               test_acipher_speed("cbc(serpent)", ENCRYPT, sec, NULL, 0,
+                                  speed_template_16_32);
+               test_acipher_speed("cbc(serpent)", DECRYPT, sec, NULL, 0,
+                                  speed_template_16_32);
+               test_acipher_speed("ctr(serpent)", ENCRYPT, sec, NULL, 0,
+                                  speed_template_16_32);
+               test_acipher_speed("ctr(serpent)", DECRYPT, sec, NULL, 0,
+                                  speed_template_16_32);
+               break;
+
        case 1000:
                test_available();
                break;