mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@redhat.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] crypto: aesni-intel - Add ivsize to ablk_ecb_alg
Date: Thu, 11 Aug 2011 12:40:41 -0400	[thread overview]
Message-ID: <20110811164040.GB2167@zod.bos.redhat.com> (raw)

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


             reply	other threads:[~2011-08-11 17:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 16:40 Josh Boyer [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110811164040.GB2167@zod.bos.redhat.com \
    --to=jwboyer@redhat.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®