Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH] crypto: aesni-intel - Add ivsize to ablk_ecb_alg
@ 2011-08-11 16:40 Josh Boyer
  2011-08-15  7:15 ` Herbert Xu
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2011-08-11 16:40 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, linux-kernel

The ablkcipher structure in ablk_ecb_alg is lacking an ivsize setting.
This causes the algorithm to fail it's self-test when it's registered
with the error message:

[    0.806920] alg: skcipher: Failed to load transform for ecb-aes-aesni: -2

crypto_lookup_skcipher doesn't like a missing ivsize.  Adding the ivsize
allows the self-test lookup to pass.

Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---
 arch/x86/crypto/aesni-intel_glue.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c
index feee8ff..711cc3c 100644
--- a/arch/x86/crypto/aesni-intel_glue.c
+++ b/arch/x86/crypto/aesni-intel_glue.c
@@ -587,6 +587,7 @@ static struct crypto_alg ablk_ecb_alg = {
 		.ablkcipher = {
 			.min_keysize	= AES_MIN_KEY_SIZE,
 			.max_keysize	= AES_MAX_KEY_SIZE,
+			.ivsize		= AES_BLOCK_SIZE,
 			.setkey		= ablk_set_key,
 			.encrypt	= ablk_encrypt,
 			.decrypt	= ablk_decrypt,
-- 
1.7.6

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-08-20  8:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11 16:40 [PATCH] crypto: aesni-intel - Add ivsize to ablk_ecb_alg Josh Boyer
2011-08-15  7:15 ` Herbert Xu
2011-08-15 11:50   ` Josh Boyer
2011-08-16 12:32     ` Herbert Xu
2011-08-18 17:44       ` Josh Boyer
2011-08-19  0:02         ` Herbert Xu
2011-08-19  2:15           ` Josh Boyer
2011-08-19  7:32             ` Herbert Xu
2011-08-19  8:12               ` Herbert Xu
2011-08-19 12:15                 ` Josh Boyer
2011-08-20  8:08                   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox