1 From bb5c863b3d3cbd10e80b2ebf409934a091058f54 Mon Sep 17 00:00:00 2001
2 From: Eneas U de Queiroz <cotequeiroz@gmail.com>
3 Date: Fri, 20 Dec 2019 16:02:13 -0300
4 Subject: [PATCH 02/11] crypto: qce - fix ctr-aes-qce block, chunk sizes
6 Set blocksize of ctr-aes-qce to 1, so it can operate as a stream cipher,
7 adding the definition for chucksize instead, where the underlying block
10 Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
11 Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
13 drivers/crypto/qce/skcipher.c | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
16 --- a/drivers/crypto/qce/skcipher.c
17 +++ b/drivers/crypto/qce/skcipher.c
18 @@ -270,6 +270,7 @@ struct qce_skcipher_def {
21 unsigned int blocksize;
22 + unsigned int chunksize;
24 unsigned int min_keysize;
25 unsigned int max_keysize;
26 @@ -298,7 +299,8 @@ static const struct qce_skcipher_def skc
27 .flags = QCE_ALG_AES | QCE_MODE_CTR,
29 .drv_name = "ctr-aes-qce",
30 - .blocksize = AES_BLOCK_SIZE,
32 + .chunksize = AES_BLOCK_SIZE,
33 .ivsize = AES_BLOCK_SIZE,
34 .min_keysize = AES_MIN_KEY_SIZE,
35 .max_keysize = AES_MAX_KEY_SIZE,
36 @@ -368,6 +370,7 @@ static int qce_skcipher_register_one(con
39 alg->base.cra_blocksize = def->blocksize;
40 + alg->chunksize = def->chunksize;
41 alg->ivsize = def->ivsize;
42 alg->min_keysize = def->min_keysize;
43 alg->max_keysize = def->max_keysize;