From: James Yonan <james@openvpn.net>
To: Mathias Krause <minipli@googlemail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org,
Romain Francoise <romain@orebokech.com>,
Chandramouli Narayanan <mouli@linux.intel.com>
Subject: Re: [PATCH] crypto: aesni - fix "by8" variant for 128 bit keys
Date: Thu, 01 Jan 2015 10:08:18 -0700 [thread overview]
Message-ID: <54A57F02.1020502@openvpn.net> (raw)
In-Reply-To: <1419976254-30208-1-git-send-email-minipli@googlemail.com>
On 30/12/2014 14:50, Mathias Krause wrote:
> The "by8" counter mode optimization is broken for 128 bit keys with
> input data longer than 128 bytes. It uses the wrong key material for
> en- and decryption.
>
> The key registers xkey0, xkey4, xkey8 and xkey12 need to be preserved
> in case we're handling more than 128 bytes of input data -- they won't
> get reloaded after the initial load. They must therefore be (a) loaded
> on the first iteration and (b) be preserved for the latter ones. The
> implementation for 128 bit keys does not comply with (a) nor (b).
>
> Fix this by bringing the implementation back to its original source
> and correctly load the key registers and preserve their values by
> *not* re-using the registers for other purposes.
>
> Kudos to James for reporting the issue and providing a test case
> showing the discrepancies.
>
> Reported-by: James Yonan <james@openvpn.net>
> Cc: Chandramouli Narayanan <mouli@linux.intel.com>
> Cc: <stable@vger.kernel.org> # v3.18
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
This looks great, fixes the issue on 3.18.1 for all of our use cases.
Thanks to Mathias for putting this together.
James
next prev parent reply other threads:[~2015-01-01 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-30 21:50 [PATCH] crypto: aesni - fix "by8" variant for 128 bit keys Mathias Krause
2015-01-01 17:08 ` James Yonan [this message]
2015-01-05 10:36 ` 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=54A57F02.1020502@openvpn.net \
--to=james@openvpn.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=minipli@googlemail.com \
--cc=mouli@linux.intel.com \
--cc=romain@orebokech.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.