summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-01-05 14:09:59 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2018-01-12 07:03:43 -0500
commitc9a3ff8f22a2df5ec6de18ba616a863392269a10 (patch)
tree09cce6d09bcdfd0b84aff74058b38bdf8346fc3f /crypto
parenteb772f37ae8163a89e28a435f6a18742ae06653b (diff)
crypto: x86/salsa20 - cleanup and convert to skcipher API
Convert salsa20-asm from the deprecated "blkcipher" API to the "skcipher" API, in the process fixing it up to use the generic helpers. This allows removing the salsa20_keysetup() and salsa20_ivsetup() assembly functions, which aren't performance critical; the C versions do just fine. This also fixes the same bug that salsa20-generic had, where the state array was being maintained directly in the transform context rather than on the stack or in the request context. Thus, if multiple threads used the same Salsa20 transform concurrently they produced the wrong results. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Kconfig2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 9327fbfccf5a..b44c0ae04eb2 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -1339,6 +1339,7 @@ config CRYPTO_SALSA20_586
1339 tristate "Salsa20 stream cipher algorithm (i586)" 1339 tristate "Salsa20 stream cipher algorithm (i586)"
1340 depends on (X86 || UML_X86) && !64BIT 1340 depends on (X86 || UML_X86) && !64BIT
1341 select CRYPTO_BLKCIPHER 1341 select CRYPTO_BLKCIPHER
1342 select CRYPTO_SALSA20
1342 help 1343 help
1343 Salsa20 stream cipher algorithm. 1344 Salsa20 stream cipher algorithm.
1344 1345
@@ -1352,6 +1353,7 @@ config CRYPTO_SALSA20_X86_64
1352 tristate "Salsa20 stream cipher algorithm (x86_64)" 1353 tristate "Salsa20 stream cipher algorithm (x86_64)"
1353 depends on (X86 || UML_X86) && 64BIT 1354 depends on (X86 || UML_X86) && 64BIT
1354 select CRYPTO_BLKCIPHER 1355 select CRYPTO_BLKCIPHER
1356 select CRYPTO_SALSA20
1355 help 1357 help
1356 Salsa20 stream cipher algorithm. 1358 Salsa20 stream cipher algorithm.
1357 1359