From: Jussi Kivilinna Date: Tue, 18 Oct 2011 10:32:39 +0000 (+0300) Subject: crypto: tcrypt - add lrw(serpent) tests X-Git-Tag: Ubuntu-5.2.0-15.16~18944^2~43 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=87aae4bfb2912d18f2c92a4484b9edcc8c7b3f21;p=mirror_ubuntu-eoan-kernel.git crypto: tcrypt - add lrw(serpent) tests Signed-off-by: Jussi Kivilinna Signed-off-by: Herbert Xu --- 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) 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 10cb925132c9..3eceaef2754d 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}; /*