Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51d33c2f authored by Giovanni Cabiddu's avatar Giovanni Cabiddu Committed by Herbert Xu
Browse files

crypto: qat - fix block size for aes ctr mode



The block size for aes counter mode was improperly set to AES_BLOCK_SIZE.
This sets it to 1 as it is a stream cipher.

This problem was found with by the new extra run-time crypto self test.

Reviewed-by: default avatarConor Mcloughlin <conor.mcloughlin@intel.com>
Tested-by: default avatarSergey Portnoy <sergey.portnoy@intel.com>
Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 15b5e911
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1273,7 +1273,7 @@ static struct crypto_alg qat_algs[] = { {
	.cra_driver_name = "qat_aes_ctr",
	.cra_driver_name = "qat_aes_ctr",
	.cra_priority = 4001,
	.cra_priority = 4001,
	.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
	.cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
	.cra_blocksize = AES_BLOCK_SIZE,
	.cra_blocksize = 1,
	.cra_ctxsize = sizeof(struct qat_alg_ablkcipher_ctx),
	.cra_ctxsize = sizeof(struct qat_alg_ablkcipher_ctx),
	.cra_alignmask = 0,
	.cra_alignmask = 0,
	.cra_type = &crypto_ablkcipher_type,
	.cra_type = &crypto_ablkcipher_type,