diff options
author | Herbert Xu <[email protected]> | 2023-12-21 10:42:57 +0800 |
---|---|---|
committer | Herbert Xu <[email protected]> | 2023-12-22 12:30:19 +0800 |
commit | 37c6fc323a81a14612626a1eec64f4690d89f234 (patch) | |
tree | 781344412b17ce6709460b6a2c7790eb5fc59f78 | |
parent | 0eaef675b94c746900dcea7f6c41b9a103ed5d53 (diff) |
crypto: skcipher - Pass statesize for simple lskcipher instances
When ecb is used to wrap an lskcipher, the statesize isn't set
correctly. Fix this by making the simple instance creator set
the statesize.
Reported-by: [email protected]
Reported-by: Edward Adam Davis <[email protected]>
Fixes: 662ea18d089b ("crypto: skcipher - Make use of internal state")
Signed-off-by: Herbert Xu <[email protected]>
-rw-r--r-- | crypto/lskcipher.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/lskcipher.c b/crypto/lskcipher.c index a06008e112f3..0b6dd8aa21f2 100644 --- a/crypto/lskcipher.c +++ b/crypto/lskcipher.c @@ -642,6 +642,7 @@ struct lskcipher_instance *lskcipher_alloc_instance_simple( inst->alg.co.min_keysize = cipher_alg->co.min_keysize; inst->alg.co.max_keysize = cipher_alg->co.max_keysize; inst->alg.co.ivsize = cipher_alg->co.base.cra_blocksize; + inst->alg.co.statesize = cipher_alg->co.statesize; /* Use struct crypto_lskcipher * by default, can be overridden */ inst->alg.co.base.cra_ctxsize = sizeof(struct crypto_lskcipher *); |