The rfc3686 implementation in inside-secure 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 underlying block size.
Signed-off-by: Herbert Xu <[email protected]>
---
drivers/crypto/inside-secure/safexcel_cipher.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/inside-secure/safexcel_cipher.c
b/drivers/crypto/inside-secure/safexcel_cipher.c
index ef04a394ff49d..4e269e92c25dc 100644
--- a/drivers/crypto/inside-secure/safexcel_cipher.c
+++ b/drivers/crypto/inside-secure/safexcel_cipher.c
@@ -1484,6 +1484,8 @@ struct safexcel_alg_template safexcel_alg_ctr_aes = {
.min_keysize = AES_MIN_KEY_SIZE + CTR_RFC3686_NONCE_SIZE,
.max_keysize = AES_MAX_KEY_SIZE + CTR_RFC3686_NONCE_SIZE,
.ivsize = CTR_RFC3686_IV_SIZE,
+ .chunksize = AES_BLOCK_SIZE,
+ .final_chunksize = -1,
.base = {
.cra_name = "rfc3686(ctr(aes))",
.cra_driver_name = "safexcel-ctr-aes",
@@ -3309,6 +3311,8 @@ struct safexcel_alg_template safexcel_alg_ctr_sm4 = {
.min_keysize = SM4_KEY_SIZE + CTR_RFC3686_NONCE_SIZE,
.max_keysize = SM4_KEY_SIZE + CTR_RFC3686_NONCE_SIZE,
.ivsize = CTR_RFC3686_IV_SIZE,
+ .chunksize = SM4_BLOCK_SIZE,
+ .final_chunksize = -1,
.base = {
.cra_name = "rfc3686(ctr(sm4))",
.cra_driver_name = "safexcel-ctr-sm4",