Commit 9e9ac4a4 authored by Leonidas Da Silva Barbosa's avatar Leonidas Da Silva Barbosa Committed by Kamal Mostafa

crypto: vmx - IV size failing on skcipher API

BugLink: http://bugs.launchpad.net/bugs/1596557

IV size was zero on CBC and CTR modes,
causing a bug triggered by skcipher.

Fixing this  adding a correct size.
Signed-off-by: default avatarLeonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: default avatarPaulo Smorigo <pfsmorigo@linux.vnet.ibm.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 0d3d054b)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 87bd13c6
...@@ -191,7 +191,7 @@ struct crypto_alg p8_aes_cbc_alg = { ...@@ -191,7 +191,7 @@ struct crypto_alg p8_aes_cbc_alg = {
.cra_init = p8_aes_cbc_init, .cra_init = p8_aes_cbc_init,
.cra_exit = p8_aes_cbc_exit, .cra_exit = p8_aes_cbc_exit,
.cra_blkcipher = { .cra_blkcipher = {
.ivsize = 0, .ivsize = AES_BLOCK_SIZE,
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.setkey = p8_aes_cbc_setkey, .setkey = p8_aes_cbc_setkey,
......
...@@ -175,7 +175,7 @@ struct crypto_alg p8_aes_ctr_alg = { ...@@ -175,7 +175,7 @@ struct crypto_alg p8_aes_ctr_alg = {
.cra_init = p8_aes_ctr_init, .cra_init = p8_aes_ctr_init,
.cra_exit = p8_aes_ctr_exit, .cra_exit = p8_aes_ctr_exit,
.cra_blkcipher = { .cra_blkcipher = {
.ivsize = 0, .ivsize = AES_BLOCK_SIZE,
.min_keysize = AES_MIN_KEY_SIZE, .min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE,
.setkey = p8_aes_ctr_setkey, .setkey = p8_aes_ctr_setkey,
......
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