diff options
author | Eric Biggers <ebiggers@google.com> | 2018-01-05 11:09:57 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-01-12 23:03:41 +1100 |
commit | d48a31edd6d0d3f6f814df7be7016404151a8ce0 (patch) | |
tree | 9c746174120325655e4dca219e92f798d4642561 /crypto/ansi_cprng.c | |
parent | 2f1095410977dcef14d8c10e01901ef959463750 (diff) | |
download | linux-crypto-d48a31edd6d0d3f6f814df7be7016404151a8ce0.tar.gz linux-crypto-d48a31edd6d0d3f6f814df7be7016404151a8ce0.zip |
crypto: salsa20-generic - cleanup and convert to skcipher API
Convert salsa20-generic from the deprecated "blkcipher" API to the
"skcipher" API, in the process fixing it up to be thread-safe (as the
crypto API expects) by maintaining each request's state separately from
the transform context.
Also remove the unnecessary cra_alignmask and tighten validation of the
key size by accepting only 16 or 32 bytes, not anything in between.
These changes bring the code close to the way chacha20-generic does
things, so hopefully it will be easier to maintain in the future.
However, the way Salsa20 interprets the IV is still slightly different;
that was not changed.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ansi_cprng.c')
0 files changed, 0 insertions, 0 deletions