diff options
author | Eric Biggers <ebiggers@google.com> | 2018-01-03 20:16:29 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-01-12 13:03:39 +0100 |
commit | f8d33fac84806eebd2ba31a3136066eeca19255f (patch) | |
tree | ca1ff03d50c7f17a3a1ae173f1324af826068619 /mm/slab_common.c | |
parent | crypto: ghash - remove checks for key being set (diff) | |
download | linux-f8d33fac84806eebd2ba31a3136066eeca19255f.tar.xz linux-f8d33fac84806eebd2ba31a3136066eeca19255f.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 'mm/slab_common.c')
0 files changed, 0 insertions, 0 deletions