]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
crypto: inside-secure - keep ivsize for DES ECB modes at 0
authorPascal van Leeuwen <pvanleeuwen@insidesecure.com>
Tue, 2 Jul 2019 14:39:52 +0000 (16:39 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jul 2019 04:51:58 +0000 (14:51 +1000)
The driver incorrectly advertised the IV size for DES and 3DES ECB
mode as being the DES blocksize of 8. This is incorrect as ECB mode
does not need any IV.

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Acked-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel_cipher.c

index 8cdbdbe356815efbc0deb2d978a52a4a6ccc50cc..82f293caf68a112f0a58f07e220c318a8a25ff1c 100644 (file)
@@ -1037,7 +1037,6 @@ struct safexcel_alg_template safexcel_alg_ecb_des = {
                .decrypt = safexcel_ecb_des_decrypt,
                .min_keysize = DES_KEY_SIZE,
                .max_keysize = DES_KEY_SIZE,
-               .ivsize = DES_BLOCK_SIZE,
                .base = {
                        .cra_name = "ecb(des)",
                        .cra_driver_name = "safexcel-ecb-des",
@@ -1140,7 +1139,6 @@ struct safexcel_alg_template safexcel_alg_ecb_des3_ede = {
                .decrypt = safexcel_ecb_des3_ede_decrypt,
                .min_keysize = DES3_EDE_KEY_SIZE,
                .max_keysize = DES3_EDE_KEY_SIZE,
-               .ivsize = DES3_EDE_BLOCK_SIZE,
                .base = {
                        .cra_name = "ecb(des3_ede)",
                        .cra_driver_name = "safexcel-ecb-des3_ede",