From: Stephan Mueller <smueller@chronox.de>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: add key wrapping block chaining mode
Date: Fri, 24 Apr 2015 02:22:15 +0200 [thread overview]
Message-ID: <1631170.dsiKAyPJ3M@tauon> (raw)
In-Reply-To: <20150423232105.GC26635@gondor.apana.org.au>
Am Freitag, 24. April 2015, 07:21:05 schrieb Herbert Xu:
Hi Herbert,
>On Thu, Apr 23, 2015 at 03:42:19PM +0200, Stephan Mueller wrote:
>> Now, shall I kind of re-implement the chainiv ablkcipher wrapper into an IV
>> handler that just helps my code? That will be a lot of code for a simple
>> memcmp.
>
>No no no. You don't need to do a template for givencrypt. chainiv
>is a template because it can be used by any blkcipher. In your case
>your fixed IV is only used by you. So just implement givencrypt and
>givdecrypt directly in your blkcipher (or ablkcipher rather because
>only ablkcipher supports givencrypt/givdecrypt).
>
>If you really want to keep the underlying kw as a blkcipher for the
>sake of simplicity you could go back to the wrapper idea and have
>the rfc wrapper around kw as an ablkcipher so that you can add the
>givencrypt/givdecrypt calls.
For the moment, I was working on the following approach:
- kw() as blkcipher (like ctr()
- implement a kwiv geniv handler and use it by kw via:
inst->alg.cra_blkcipher.geniv = "kwiv";
So, if I read your recommendation right, I would do the following:
- kw() as blkcipher (like the ctr())
- rfc3394() as ablkcipher around kw (like rfc3686())
I also have the givencrypt and givdecrypt functions. How would I directly hook
them into the ablkcipher without using a reference for inst-
>alg.cra_ablkcipher.geniv?
Which approach would fit best?
Ciao
Stephan
next prev parent reply other threads:[~2015-04-24 0:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 4:36 [PATCH] crypto: add key wrapping block chaining mode Stephan Mueller
2015-04-22 5:48 ` Herbert Xu
2015-04-22 12:44 ` Stephan Mueller
2015-04-23 1:39 ` Herbert Xu
2015-04-23 1:40 ` Stephan Mueller
2015-04-22 5:53 ` Herbert Xu
2015-04-22 6:13 ` Herbert Xu
2015-04-22 12:23 ` Stephan Mueller
2015-04-22 14:11 ` Stephan Mueller
2015-04-23 1:37 ` Herbert Xu
2015-04-23 1:33 ` Herbert Xu
2015-04-23 1:39 ` Stephan Mueller
2015-04-23 1:46 ` Herbert Xu
2015-04-23 1:58 ` Stephan Mueller
2015-04-23 2:03 ` Herbert Xu
2015-04-23 2:51 ` Stephan Mueller
2015-04-23 2:55 ` Herbert Xu
2015-04-23 13:42 ` Stephan Mueller
2015-04-23 23:21 ` Herbert Xu
2015-04-24 0:22 ` Stephan Mueller [this message]
2015-04-24 0:24 ` Herbert Xu
2015-04-22 6:06 ` 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=1631170.dsiKAyPJ3M@tauon \
--to=smueller@chronox.de \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@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