Commit 5de8f1b562e87ae9d93a4e0897e54c18a5e82915

Authored by Tan Swee Heng
Committed by Herbert Xu
1 parent 0b77abb3b2

[CRYPTO] tcrypt: Added salsa20 speed test

This patch adds a simple speed test for salsa20.
Usage: modprobe tcrypt mode=206

Signed-of-by: Tan Swee Heng <thesweeheng@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 2 changed files with 21 additions and 0 deletions Side-by-side Diff

... ... @@ -1668,6 +1668,11 @@
1668 1668 camellia_speed_template);
1669 1669 break;
1670 1670  
  1671 + case 206:
  1672 + test_cipher_speed("salsa20", ENCRYPT, sec, NULL, 0,
  1673 + salsa20_speed_template);
  1674 + break;
  1675 +
1671 1676 case 300:
1672 1677 /* fall through */
1673 1678  
... ... @@ -7947,5 +7947,21 @@
7947 7947 { .klen = 0, .blen = 0, }
7948 7948 };
7949 7949  
  7950 +static struct cipher_speed salsa20_speed_template[] = {
  7951 + { .klen = 16, .blen = 16, },
  7952 + { .klen = 16, .blen = 64, },
  7953 + { .klen = 16, .blen = 256, },
  7954 + { .klen = 16, .blen = 1024, },
  7955 + { .klen = 16, .blen = 8192, },
  7956 + { .klen = 32, .blen = 16, },
  7957 + { .klen = 32, .blen = 64, },
  7958 + { .klen = 32, .blen = 256, },
  7959 + { .klen = 32, .blen = 1024, },
  7960 + { .klen = 32, .blen = 8192, },
  7961 +
  7962 + /* End marker */
  7963 + { .klen = 0, .blen = 0, }
  7964 +};
  7965 +
7950 7966 #endif /* _CRYPTO_TCRYPT_H */