diff mbox series

[v3,30/31] crypto: kw - Set final_chunksize

Message ID E1k0Jtr-0006Xr-RA@fornost.hmeau.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show
Series crypto: skcipher - Add support for no chaining and partial chaining | expand

Commit Message

Herbert Xu July 28, 2020, 7:19 a.m. UTC
The kw algorithm does not support partial operation and therefore
this patch sets its final_chunksize to -1 to mark this fact.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
---

 crypto/keywrap.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/crypto/keywrap.c b/crypto/keywrap.c
index 0355cce21b1e2..b99568c6d032c 100644
--- a/crypto/keywrap.c
+++ b/crypto/keywrap.c
@@ -280,6 +280,7 @@  static int crypto_kw_create(struct crypto_template *tmpl, struct rtattr **tb)
 	inst->alg.base.cra_blocksize = SEMIBSIZE;
 	inst->alg.base.cra_alignmask = 0;
 	inst->alg.ivsize = SEMIBSIZE;
+	inst->alg.final_chunksize = -1;
 
 	inst->alg.encrypt = crypto_kw_encrypt;
 	inst->alg.decrypt = crypto_kw_decrypt;