The chacha implementation in caam/qi2 does not support partial
operation and therefore this patch sets its final_chunksize to -1
to mark this fact.
This patch also sets the chunksize to the chacha block size.
Signed-off-by: Herbert Xu <[email protected]>
---
drivers/crypto/caam/caamalg_qi2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 1b0c286759065..6294c104bf7a9 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -1689,6 +1689,8 @@ static struct caam_skcipher_alg driver_algs[] = {
.min_keysize = CHACHA_KEY_SIZE,
.max_keysize = CHACHA_KEY_SIZE,
.ivsize = CHACHA_IV_SIZE,
+ .chunksize = CHACHA_BLOCK_SIZE,
+ .final_chunksize = -1,
},
.caam.class1_alg_type = OP_ALG_ALGSEL_CHACHA20,
},
On 7/28/2020 10:19 AM, Herbert Xu wrote:
> The chacha implementation in caam/qi2 does not support partial
> operation and therefore this patch sets its final_chunksize to -1
> to mark this fact.
>
> This patch also sets the chunksize to the chacha block size.
>
> Signed-off-by: Herbert Xu <[email protected]>
Reviewed-by: Horia Geantă <[email protected]>
Thanks,
Horia