Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm/arm64: crypto: assure that ECB modes don't require an IV

ECB modes don't use an initialization vector. The kernel
/proc/crypto interface doesn't reflect this properly.

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>

authored by

Jeremy Linton and committed by
Will Deacon
bee038a4 a80a0eb7

+4 -4
+2 -2
arch/arm/crypto/aes-ce-glue.c
··· 364 364 .cra_blkcipher = { 365 365 .min_keysize = AES_MIN_KEY_SIZE, 366 366 .max_keysize = AES_MAX_KEY_SIZE, 367 - .ivsize = AES_BLOCK_SIZE, 367 + .ivsize = 0, 368 368 .setkey = ce_aes_setkey, 369 369 .encrypt = ecb_encrypt, 370 370 .decrypt = ecb_decrypt, ··· 441 441 .cra_ablkcipher = { 442 442 .min_keysize = AES_MIN_KEY_SIZE, 443 443 .max_keysize = AES_MAX_KEY_SIZE, 444 - .ivsize = AES_BLOCK_SIZE, 444 + .ivsize = 0, 445 445 .setkey = ablk_set_key, 446 446 .encrypt = ablk_encrypt, 447 447 .decrypt = ablk_decrypt,
+2 -2
arch/arm64/crypto/aes-glue.c
··· 294 294 .cra_blkcipher = { 295 295 .min_keysize = AES_MIN_KEY_SIZE, 296 296 .max_keysize = AES_MAX_KEY_SIZE, 297 - .ivsize = AES_BLOCK_SIZE, 297 + .ivsize = 0, 298 298 .setkey = aes_setkey, 299 299 .encrypt = ecb_encrypt, 300 300 .decrypt = ecb_decrypt, ··· 371 371 .cra_ablkcipher = { 372 372 .min_keysize = AES_MIN_KEY_SIZE, 373 373 .max_keysize = AES_MAX_KEY_SIZE, 374 - .ivsize = AES_BLOCK_SIZE, 374 + .ivsize = 0, 375 375 .setkey = ablk_set_key, 376 376 .encrypt = ablk_encrypt, 377 377 .decrypt = ablk_decrypt,