From: LABBE Corentin <clabbe.montjoie@gmail.com>
To: herbert@gondor.apana.org.au, davem@davemloft.net,
thomas.lendacky@amd.com, geert+renesas@glider.be,
ulf.hansson@linaro.org, wsa@the-dreams.de, keescook@chromium.org,
maxime.ripard@free-electrons.com
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
LABBE Corentin <clabbe.montjoie@gmail.com>
Subject: [PATCH 8/8] crypto: testmgr: Use the xxx_zero_message_hash from headers
Date: Mon, 12 Oct 2015 18:53:46 +0200 [thread overview]
Message-ID: <1444668826-6531-9-git-send-email-clabbe.montjoie@gmail.com> (raw)
In-Reply-To: <1444668826-6531-1-git-send-email-clabbe.montjoie@gmail.com>
Since md5/shaxxx headers have hash for zero message length, just use them.
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
crypto/testmgr.h | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/crypto/testmgr.h b/crypto/testmgr.h
index 03b2f19..9585854 100644
--- a/crypto/testmgr.h
+++ b/crypto/testmgr.h
@@ -367,8 +367,7 @@ static struct hash_testvec md4_tv_template [] = {
static struct hash_testvec md5_tv_template[] = {
{
- .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
- "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
+ .digest = md5_zero_message_hash,
}, {
.plaintext = "a",
.psize = 1,
@@ -713,8 +712,7 @@ static struct hash_testvec sha1_tv_template[] = {
{
.plaintext = "",
.psize = 0,
- .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
- "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
+ .digest = sha1_zero_message_hash,
}, {
.plaintext = "abc",
.psize = 3,
@@ -905,10 +903,7 @@ static struct hash_testvec sha224_tv_template[] = {
{
.plaintext = "",
.psize = 0,
- .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
- "\x47\x61\x02\xbb\x28\x82\x34\xc4"
- "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
- "\xc5\xb3\xe4\x2f",
+ .digest = sha224_zero_message_hash,
}, {
.plaintext = "abc",
.psize = 3,
@@ -1079,10 +1074,7 @@ static struct hash_testvec sha256_tv_template[] = {
{
.plaintext = "",
.psize = 0,
- .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
- "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
- "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
- "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
+ .digest = sha256_zero_message_hash,
}, {
.plaintext = "abc",
.psize = 3,
--
2.4.9
next prev parent reply other threads:[~2015-10-12 16:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 16:53 [PATCH] crypto: add precalculated hash for zero message length LABBE Corentin
2015-10-12 16:53 ` [PATCH 1/8] crypto: hash: add zero length message hash for shax and md5 LABBE Corentin
2015-10-14 10:08 ` Herbert Xu
2015-10-15 9:42 ` LABBE Corentin
2015-10-16 11:26 ` Ulf Hansson
2015-10-12 16:53 ` [PATCH 2/8] crypto: niagara: Use precalculated hash from headers LABBE Corentin
2015-10-12 16:53 ` [PATCH 3/8] crypto: ccp: " LABBE Corentin
2015-10-12 21:16 ` Tom Lendacky
2015-10-12 16:53 ` [PATCH 4/8] crypto: ux500: " LABBE Corentin
2015-10-12 16:53 ` [PATCH 5/8] crypto: akcipher: fix typos in include/crypto/akcipher.h LABBE Corentin
2015-10-12 16:53 ` [PATCH 6/8] crypto: akcipher: the key parameter must be const u8 * LABBE Corentin
2015-10-12 16:53 ` [PATCH 7/8] crypto: testmgr: Constify tested key/iv/plaintext/digest LABBE Corentin
2015-10-12 16:53 ` LABBE Corentin [this message]
2015-10-12 19:24 ` [PATCH 8/8] crypto: testmgr: Use the xxx_zero_message_hash from headers kbuild test robot
2015-10-12 19:31 ` Corentin LABBE
2015-10-20 7:33 [PATCH v2] crypto: add precalculated hash for zero message length LABBE Corentin
2015-10-20 7:34 ` [PATCH 8/8] crypto: testmgr: Use the xxx_zero_message_hash from headers LABBE Corentin
2015-11-17 9:56 ` 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=1444668826-6531-9-git-send-email-clabbe.montjoie@gmail.com \
--to=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=geert+renesas@glider.be \
--cc=herbert@gondor.apana.org.au \
--cc=keescook@chromium.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=thomas.lendacky@amd.com \
--cc=ulf.hansson@linaro.org \
--cc=wsa@the-dreams.de \
/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
all inboxes | Powered by JetHome®