Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1280161 > unrolled thread
| Started by | Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com> |
|---|---|
| First post | 2015-11-30 19:20 +0100 |
| Last post | 2015-12-04 15:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] IV size failing on skcipher API Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com> - 2015-11-30 19:20 +0100
Re: [PATCH 1/2] IV size failing on skcipher API Herbert Xu <herbert@gondor.apana.org.au> - 2015-12-04 15:50 +0100
| From | Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-11-30 19:20 +0100 |
| Subject | [PATCH 1/2] IV size failing on skcipher API |
| Message-ID | <qABdp-76v-37@gated-at.bofh.it> |
IV size was zero on CBC and CTR modes,
causing a bug triggered by skcipher.
Fixing this adding a correct size.
Signed-off-by: Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Signed-off-by: Paulo Smorigo <pfsmorigo@linux.vnet.ibm.com>
---
drivers/crypto/vmx/aes_cbc.c | 2 +-
drivers/crypto/vmx/aes_ctr.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/vmx/aes_cbc.c b/drivers/crypto/vmx/aes_cbc.c
index 0b8fe2e..78a9786 100644
--- a/drivers/crypto/vmx/aes_cbc.c
+++ b/drivers/crypto/vmx/aes_cbc.c
@@ -191,7 +191,7 @@ struct crypto_alg p8_aes_cbc_alg = {
.cra_init = p8_aes_cbc_init,
.cra_exit = p8_aes_cbc_exit,
.cra_blkcipher = {
- .ivsize = 0,
+ .ivsize = AES_BLOCK_SIZE,
.min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE,
.setkey = p8_aes_cbc_setkey,
diff --git a/drivers/crypto/vmx/aes_ctr.c b/drivers/crypto/vmx/aes_ctr.c
index ee1306c..1febc4f 100644
--- a/drivers/crypto/vmx/aes_ctr.c
+++ b/drivers/crypto/vmx/aes_ctr.c
@@ -175,7 +175,7 @@ struct crypto_alg p8_aes_ctr_alg = {
.cra_init = p8_aes_ctr_init,
.cra_exit = p8_aes_ctr_exit,
.cra_blkcipher = {
- .ivsize = 0,
+ .ivsize = AES_BLOCK_SIZE,
.min_keysize = AES_MIN_KEY_SIZE,
.max_keysize = AES_MAX_KEY_SIZE,
.setkey = p8_aes_ctr_setkey,
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-12-04 15:50 +0100 |
| Message-ID | <qBZQm-3Yo-25@gated-at.bofh.it> |
| In reply to | #1280161 |
On Mon, Nov 30, 2015 at 04:19:03PM -0200, Leonidas Da Silva Barbosa wrote: > IV size was zero on CBC and CTR modes, > causing a bug triggered by skcipher. > > Fixing this adding a correct size. > > Signed-off-by: Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com> > Signed-off-by: Paulo Smorigo <pfsmorigo@linux.vnet.ibm.com> Patch applied. Thanks. -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web