Skip to content

Commit 5209c07

Browse files
jkivilinherbertx
authored andcommitted
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>
1 parent 18be20b commit 5209c07

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎crypto/tcrypt.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ static int do_test(int m)
998998
ret += tcrypt_test("cbc(serpent)");
999999
ret += tcrypt_test("ctr(serpent)");
10001000
ret += tcrypt_test("lrw(serpent)");
1001+
ret += tcrypt_test("xts(serpent)");
10011002
break;
10021003

10031004
case 10:
@@ -1315,6 +1316,10 @@ static int do_test(int m)
13151316
speed_template_32_48);
13161317
test_cipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
13171318
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);
13181323
break;
13191324

13201325
case 300:
@@ -1535,6 +1540,10 @@ static int do_test(int m)
15351540
speed_template_32_48);
15361541
test_acipher_speed("lrw(serpent)", DECRYPT, sec, NULL, 0,
15371542
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);
15381547
break;
15391548

15401549
case 1000:

‎crypto/tcrypt.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
5353
static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
5454
static u8 speed_template_32_48[] = {32, 48, 0};
5555
static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
56+
static u8 speed_template_32_64[] = {32, 64, 0};
5657

5758
/*
5859
* Digest speed tests

0 commit comments

Comments
 (0)