From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH] crypto: testmgr - use calculated count for number of test vectors
Date: Fri, 13 Jan 2017 22:32:03 +0800 [thread overview]
Message-ID: <20170113143203.GA25945@gondor.apana.org.au> (raw)
In-Reply-To: <1484228439-28373-1-git-send-email-ard.biesheuvel@linaro.org>
On Thu, Jan 12, 2017 at 01:40:39PM +0000, Ard Biesheuvel wrote:
> When working on AES in CCM mode for ARM, my code passed the internal
> tcrypt test before I had even bothered to implement the AES-192 and
> AES-256 code paths, which is strange because the tcrypt does contain
> AES-192 and AES-256 test vectors for CCM.
>
> As it turned out, the define AES_CCM_ENC_TEST_VECTORS was out of sync
> with the actual number of test vectors, causing only the AES-128 ones
> to be executed.
>
> So get rid of the defines, and wrap the test vector references in a
> macro that calculates the number of vectors automatically.
>
> The following test vector counts were out of sync with the respective
> defines:
>
> BF_CTR_ENC_TEST_VECTORS 2 -> 3
> BF_CTR_DEC_TEST_VECTORS 2 -> 3
> TF_CTR_ENC_TEST_VECTORS 2 -> 3
> TF_CTR_DEC_TEST_VECTORS 2 -> 3
> SERPENT_CTR_ENC_TEST_VECTORS 2 -> 3
> SERPENT_CTR_DEC_TEST_VECTORS 2 -> 3
> AES_CCM_ENC_TEST_VECTORS 8 -> 14
> AES_CCM_DEC_TEST_VECTORS 7 -> 17
> AES_CCM_4309_ENC_TEST_VECTORS 7 -> 23
> AES_CCM_4309_DEC_TEST_VECTORS 10 -> 23
> CAMELLIA_CTR_ENC_TEST_VECTORS 2 -> 3
> CAMELLIA_CTR_DEC_TEST_VECTORS 2 -> 3
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2017-01-13 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 13:40 [PATCH] crypto: testmgr - use calculated count for number of test vectors Ard Biesheuvel
2017-01-13 14:32 ` Herbert Xu [this message]
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=20170113143203.GA25945@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=ard.biesheuvel@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).