]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: skcipher - fix weak key check for lskciphers
authorEric Biggers <ebiggers@google.com>
Fri, 13 Oct 2023 05:56:13 +0000 (22:56 -0700)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Oct 2023 05:39:26 +0000 (13:39 +0800)
commit7ec0a09d4e84396b8c3c799b0add4399f5fdb7a6
tree368d41914a5276acc8be1e2df006655e43b25e5f
parent5acab6eb592387191c1bb745ba9b815e1e076db5
crypto: skcipher - fix weak key check for lskciphers

When an algorithm of the new "lskcipher" type is exposed through the
"skcipher" API, calls to crypto_skcipher_setkey() don't pass on the
CRYPTO_TFM_REQ_FORBID_WEAK_KEYS flag to the lskcipher.  This causes
self-test failures for ecb(des), as weak keys are not rejected anymore.
Fix this.

Fixes: 31865c4c4db2 ("crypto: skcipher - Add lskcipher")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/lskcipher.c
crypto/skcipher.c
crypto/skcipher.h