From: Eric Biggers <ebiggers@kernel.org>
To: Christian Lamparter <chunkeey@gmail.com>
Cc: linux-crypto@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] crypto: crypto4xx - fix AES CTR blocksize value
Date: Fri, 17 May 2019 14:42:04 -0700 [thread overview]
Message-ID: <20190517214203.GA153555@gmail.com> (raw)
In-Reply-To: <20190517211557.25815-1-chunkeey@gmail.com>
Hi Christian,
On Fri, May 17, 2019 at 11:15:57PM +0200, Christian Lamparter wrote:
> This patch fixes a issue with crypto4xx's ctr(aes) that was
> discovered by libcapi's kcapi-enc-test.sh test.
>
> The some of the ctr(aes) encryptions test were failing on the
> non-power-of-two test:
>
> kcapi-enc - Error: encryption failed with error 0
> kcapi-enc - Error: decryption failed with error 0
> [FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits):
> original file (1d100e..cc96184c) and generated file (e3b0c442..1b7852b855)
> [FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits)
> (openssl generated CT): original file (e3b0..5) and generated file (3..8e)
> [PASSED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (128 bits)
> (openssl generated PT)
> [FAILED: 32-bit - 5.1.0-rc1+] 15 bytes: STDIN / STDOUT enc test (password):
> original file (1d1..84c) and generated file (e3b..852b855)
>
> But the 16, 32, 512, 65536 tests always worked.
>
> Thankfully, this isn't a hidden hardware problem like previously,
> instead this turned out to be a copy and paste issue.
>
> With this patch, all the tests are passing with and
> kcapi-enc-test.sh gives crypto4xx's a clean bill of health:
> "Number of failures: 0" :).
>
> Cc: stable@vger.kernel.org
> Fixes: 98e87e3d933b ("crypto: crypto4xx - add aes-ctr support")
> Fixes: f2a13e7cba9e ("crypto: crypto4xx - enable AES RFC3686, ECB, CFB and OFB offloads")
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
With this patch applied to the latest mainline kernel, did you check whether
this driver also passes the in-kernel crypto self-tests when
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y is set? Those should have detected this bug
too, maybe even without EXTRA_TESTS.
- Eric
next prev parent reply other threads:[~2019-05-17 21:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 21:15 [PATCH] crypto: crypto4xx - fix AES CTR blocksize value Christian Lamparter
2019-05-17 21:42 ` Eric Biggers [this message]
2019-05-23 6:52 ` 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=20190517214203.GA153555@gmail.com \
--to=ebiggers@kernel.org \
--cc=chunkeey@gmail.com \
--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 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.