Skip to content

Commit 425359a

Browse files
ardbiesheuvelherbertx
authored andcommitted
crypto: tcrypt - include larger key sizes in RFC4106 benchmark
RFC4106 wraps AES in GCM mode, and can be used with larger key sizes than 128/160 bits, just like AES itself. So add these to the tcrypt recipe so they will be benchmarked as well. Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 9e34571 commit 425359a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crypto/tcrypt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,11 +2044,11 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
20442044

20452045
case 211:
20462046
test_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec,
2047-
NULL, 0, 16, 16, aead_speed_template_20);
2047+
NULL, 0, 16, 16, aead_speed_template_20_28_36);
20482048
test_aead_speed("gcm(aes)", ENCRYPT, sec,
20492049
NULL, 0, 16, 8, speed_template_16_24_32);
20502050
test_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec,
2051-
NULL, 0, 16, 16, aead_speed_template_20);
2051+
NULL, 0, 16, 16, aead_speed_template_20_28_36);
20522052
test_aead_speed("gcm(aes)", DECRYPT, sec,
20532053
NULL, 0, 16, 8, speed_template_16_24_32);
20542054
break;
@@ -2074,11 +2074,11 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
20742074

20752075
case 215:
20762076
test_mb_aead_speed("rfc4106(gcm(aes))", ENCRYPT, sec, NULL,
2077-
0, 16, 16, aead_speed_template_20, num_mb);
2077+
0, 16, 16, aead_speed_template_20_28_36, num_mb);
20782078
test_mb_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8,
20792079
speed_template_16_24_32, num_mb);
20802080
test_mb_aead_speed("rfc4106(gcm(aes))", DECRYPT, sec, NULL,
2081-
0, 16, 16, aead_speed_template_20, num_mb);
2081+
0, 16, 16, aead_speed_template_20_28_36, num_mb);
20822082
test_mb_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8,
20832083
speed_template_16_24_32, num_mb);
20842084
break;

crypto/tcrypt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static u8 speed_template_32[] = {32, 0};
6262
* AEAD speed tests
6363
*/
6464
static u8 aead_speed_template_19[] = {19, 0};
65-
static u8 aead_speed_template_20[] = {20, 0};
65+
static u8 aead_speed_template_20_28_36[] = {20, 28, 36, 0};
6666
static u8 aead_speed_template_36[] = {36, 0};
6767

6868
/*

0 commit comments

Comments
 (0)