[v3 PATCH 16/31] crypto: caam/qi2 - Set final_chunksize on chacha

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <herbert@xxxxxxxxxxxxxxxxxxx>
---

 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,
 	},



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux