Commit 5de8f1b5 authored by Tan Swee Heng's avatar Tan Swee Heng Committed by Herbert Xu

[CRYPTO] tcrypt: Added salsa20 speed test

This patch adds a simple speed test for salsa20.
Usage: modprobe tcrypt mode=206
Signed-of-by: default avatarTan Swee Heng <thesweeheng@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0b77abb3
...@@ -1668,6 +1668,11 @@ static void do_test(void) ...@@ -1668,6 +1668,11 @@ static void do_test(void)
camellia_speed_template); camellia_speed_template);
break; break;
case 206:
test_cipher_speed("salsa20", ENCRYPT, sec, NULL, 0,
salsa20_speed_template);
break;
case 300: case 300:
/* fall through */ /* fall through */
......
...@@ -7947,4 +7947,20 @@ static struct cipher_speed camellia_speed_template[] = { ...@@ -7947,4 +7947,20 @@ static struct cipher_speed camellia_speed_template[] = {
{ .klen = 0, .blen = 0, } { .klen = 0, .blen = 0, }
}; };
static struct cipher_speed salsa20_speed_template[] = {
{ .klen = 16, .blen = 16, },
{ .klen = 16, .blen = 64, },
{ .klen = 16, .blen = 256, },
{ .klen = 16, .blen = 1024, },
{ .klen = 16, .blen = 8192, },
{ .klen = 32, .blen = 16, },
{ .klen = 32, .blen = 64, },
{ .klen = 32, .blen = 256, },
{ .klen = 32, .blen = 1024, },
{ .klen = 32, .blen = 8192, },
/* End marker */
{ .klen = 0, .blen = 0, }
};
#endif /* _CRYPTO_TCRYPT_H */ #endif /* _CRYPTO_TCRYPT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment