Commit bee038a4 authored by Jeremy Linton's avatar Jeremy Linton Committed by Will Deacon

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: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent a80a0eb7
...@@ -364,7 +364,7 @@ static struct crypto_alg aes_algs[] = { { ...@@ -364,7 +364,7 @@ static struct crypto_alg aes_algs[] = { {
.cra_blkcipher = { .cra_blkcipher = {
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_BLOCK_SIZE, .ivsize = 0,
.setkey = ce_aes_setkey, .setkey = ce_aes_setkey,
.encrypt = ecb_encrypt, .encrypt = ecb_encrypt,
.decrypt = ecb_decrypt, .decrypt = ecb_decrypt,
...@@ -441,7 +441,7 @@ static struct crypto_alg aes_algs[] = { { ...@@ -441,7 +441,7 @@ static struct crypto_alg aes_algs[] = { {
.cra_ablkcipher = { .cra_ablkcipher = {
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_BLOCK_SIZE, .ivsize = 0,
.setkey = ablk_set_key, .setkey = ablk_set_key,
.encrypt = ablk_encrypt, .encrypt = ablk_encrypt,
.decrypt = ablk_decrypt, .decrypt = ablk_decrypt,
......
...@@ -294,7 +294,7 @@ static struct crypto_alg aes_algs[] = { { ...@@ -294,7 +294,7 @@ static struct crypto_alg aes_algs[] = { {
.cra_blkcipher = { .cra_blkcipher = {
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_BLOCK_SIZE, .ivsize = 0,
.setkey = aes_setkey, .setkey = aes_setkey,
.encrypt = ecb_encrypt, .encrypt = ecb_encrypt,
.decrypt = ecb_decrypt, .decrypt = ecb_decrypt,
...@@ -371,7 +371,7 @@ static struct crypto_alg aes_algs[] = { { ...@@ -371,7 +371,7 @@ static struct crypto_alg aes_algs[] = { {
.cra_ablkcipher = { .cra_ablkcipher = {
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.ivsize = AES_BLOCK_SIZE, .ivsize = 0,
.setkey = ablk_set_key, .setkey = ablk_set_key,
.encrypt = ablk_encrypt, .encrypt = ablk_encrypt,
.decrypt = ablk_decrypt, .decrypt = ablk_decrypt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment