summaryrefslogtreecommitdiff
path: root/crypto/cryptd.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-01-03 11:16:29 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2018-01-12 23:03:39 +1100
commitafef2cfab1cc0c1a6528fb266c6c609f5d028900 (patch)
tree6db23ea8691d1c226c328e4485a9441c1d9316a7 /crypto/cryptd.c
parent76d35e2d799b3c594d5fde35f7e5f6a9a8d7e88d (diff)
downloadlinux-crypto-afef2cfab1cc0c1a6528fb266c6c609f5d028900.tar.gz
linux-crypto-afef2cfab1cc0c1a6528fb266c6c609f5d028900.zip
crypto: skcipher - prevent using skciphers without setting key
Similar to what was done for the hash API, update the skcipher API to track whether each transform has been keyed, and reject encryption/decryption if a key is needed but one hasn't been set. This isn't as important as the equivalent fix for the hash API because symmetric ciphers almost always require a key (the "null cipher" is the only exception), so are unlikely to be used without one. Still, tracking the key will prevent accidental unkeyed use. algif_skcipher also had to track the key anyway, so the new flag replaces that and simplifies the algif_skcipher implementation. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/cryptd.c')
0 files changed, 0 insertions, 0 deletions