Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Ard Biesheuvel and committed by
Herbert Xu
425359ae 9e345711

+5 -5
+4 -4
crypto/tcrypt.c
··· 2044 2044 2045 2045 case 211: 2046 2046 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); 2048 2048 test_aead_speed("gcm(aes)", ENCRYPT, sec, 2049 2049 NULL, 0, 16, 8, speed_template_16_24_32); 2050 2050 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); 2052 2052 test_aead_speed("gcm(aes)", DECRYPT, sec, 2053 2053 NULL, 0, 16, 8, speed_template_16_24_32); 2054 2054 break; ··· 2074 2074 2075 2075 case 215: 2076 2076 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); 2078 2078 test_mb_aead_speed("gcm(aes)", ENCRYPT, sec, NULL, 0, 16, 8, 2079 2079 speed_template_16_24_32, num_mb); 2080 2080 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); 2082 2082 test_mb_aead_speed("gcm(aes)", DECRYPT, sec, NULL, 0, 16, 8, 2083 2083 speed_template_16_24_32, num_mb); 2084 2084 break;
+1 -1
crypto/tcrypt.h
··· 62 62 * AEAD speed tests 63 63 */ 64 64 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}; 66 66 static u8 aead_speed_template_36[] = {36, 0}; 67 67 68 68 /*