mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	Huang Ying <ying.huang@intel.com>
Subject: [BUGFIX] crypto: Fix ctr(aes) testing by specifying geniv
Date: Mon,  3 Aug 2009 15:44:43 +0800	[thread overview]
Message-ID: <1249285483-22286-1-git-send-email-ying.huang@intel.com> (raw)

When doing "modeprobe tcrypt mode=10", the following error will show
in dmesg.

alg: skcipher: Failed to load transform for ctr(aes): -22
alg: skcipher: Failed to load transform for ctr(aes): -22
tcrypt: one or more tests failed!

Because ctr(aes) testing code will allocate ctr(aes) with geniv, but
defualt geniv mode may not work with ctr(aes). As that of rfc3686,
this is fixed via specifying geniv mode to "seqiv".

Signed-off-by: Huang Ying <ying.huang@intel.com>
---
 crypto/ctr.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/crypto/ctr.c
+++ b/crypto/ctr.c
@@ -219,6 +219,8 @@ static struct crypto_instance *crypto_ct
 	inst->alg.cra_blkcipher.encrypt = crypto_ctr_crypt;
 	inst->alg.cra_blkcipher.decrypt = crypto_ctr_crypt;
 
+	inst->alg.cra_blkcipher.geniv = "seqiv";
+
 out:
 	crypto_mod_put(alg);
 	return inst;

             reply	other threads:[~2009-08-03  7:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-03  7:44 Huang Ying [this message]
2009-08-05  9:45 ` Herbert Xu
2009-08-06  2:12   ` Huang Ying
2009-08-12  2:27     ` Huang Ying
2009-08-13  4:53       ` Herbert Xu
2009-08-13  7:39         ` Herbert Xu
2009-08-13 13:12           ` Herbert Xu
2009-08-14  1:01             ` Huang Ying
2009-08-14  1:05               ` Herbert Xu
2009-08-14 13:02             ` Herbert Xu
2009-08-14 13:47               ` Artem Bityutskiy

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=1249285483-22286-1-git-send-email-ying.huang@intel.com \
    --to=ying.huang@intel.com \
    --cc=herbert@gondor.apana.org.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®