From d4525fe9d2c53846a9bc1eb66e28400219936606 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan <iuliana.prodan@nxp.com> Date: Mon, 1 Apr 2019 17:12:14 +0300 Subject: [PATCH] crypto: caam - weak key checking for cbc des, 3des MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify setkey callback for cbc des and 3des to check for weak keys. Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com> Reviewed-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> (cherry picked from commit cf64e495fe221479866c1ea7c6f5cd9698d8a3af) Reviewed-by: Horia Geanta <horia.geanta@nxp.com> --- drivers/crypto/caam/caamalg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c index 6d3a7753599243..cfc25fe580cf70 100644 --- a/drivers/crypto/caam/caamalg.c +++ b/drivers/crypto/caam/caamalg.c @@ -2017,7 +2017,7 @@ static struct caam_alg_template driver_algs[] = { .blocksize = DES3_EDE_BLOCK_SIZE, .type = CRYPTO_ALG_TYPE_GIVCIPHER, .template_ablkcipher = { - .setkey = ablkcipher_setkey, + .setkey = des_ablkcipher_setkey, .encrypt = ablkcipher_encrypt, .decrypt = ablkcipher_decrypt, .givencrypt = ablkcipher_givencrypt, @@ -2034,7 +2034,7 @@ static struct caam_alg_template driver_algs[] = { .blocksize = DES_BLOCK_SIZE, .type = CRYPTO_ALG_TYPE_GIVCIPHER, .template_ablkcipher = { - .setkey = ablkcipher_setkey, + .setkey = des_ablkcipher_setkey, .encrypt = ablkcipher_encrypt, .decrypt = ablkcipher_decrypt, .givencrypt = ablkcipher_givencrypt, -- GitLab