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: Thu, 23 Apr 2015 03:58:37 +0200 [thread overview]
Message-ID: <3845789.gd1dJWGSe8@myon.chronox.de> (raw)
In-Reply-To: <20150423014609.GA17267@gondor.apana.org.au>
Am Donnerstag, 23. April 2015, 09:46:09 schrieb Herbert Xu:
Hi Herbert,
> On Thu, Apr 23, 2015 at 03:39:11AM +0200, Stephan Mueller wrote:
> > The KW does not return an IV. The IV is used for encryption to stir the
> > encryption a bit. The resulting ciphertext now contains the mixed in IV.
> > For decryption, the IV is only used to verify that the one block in the
> > decryption operation matches the IV.
> >
> > So, there is no IV returned by the encryption.
>
> Of course there is. The first 8 bytes of the ciphertext is the
> output IV.
Well, you can see it as IV, but I have not seen other implementations of the
KW where that first block is handled separately from the ciphertext.
So, when our implementations returns ciphertext minus the first block and the
first block separately, it will deviate from other implementations
significantly.
And KW is not standalone in the kernel. The idea is that user space wraps some
key with their implementation, and hands the wrapped key down to the kernel.
When the kernel needs it, it can unwrap it. But it will be kept wrapped for
the time it is not used.
>
> If you really want to pedantic then make a function wrapper around
> the whole thing and copy the IV in there.
So we have another memcpy just to copy that block into the IV field just to
have the KW cipher implementation copy it to some other location again? I do
not see the value of it.
>
> Cheers,
--
Ciao
Stephan
next prev parent reply other threads:[~2015-04-23 1:58 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 [this message]
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
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=3845789.gd1dJWGSe8@myon.chronox.de \
--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