From: Eric Biggers <ebiggers@kernel.org>
To: Stefan Kanthak <stefan.kanthak@nexgo.de>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
tim.c.chen@linux.intel.com, sean.m.gulley@intel.com
Subject: Re: [PATCH 1/2] crypto: s(h)aving 40+ bytes off arch/x86/crypto/sha256_ni_asm.S
Date: Mon, 8 Apr 2024 09:12:38 -0400 [thread overview]
Message-ID: <20240408131238.GC732@quark.localdomain> (raw)
In-Reply-To: <5EEE09A9021540A5AAD8BFEEE915512D@H270>
On Mon, Apr 08, 2024 at 11:26:52AM +0200, Stefan Kanthak wrote:
> @@ -315,11 +315,11 @@
> jne .Lloop0
>
> /* Write hash values back in the correct order */
> - pshufd $0x1B, STATE0, STATE0 /* FEBA */
> - pshufd $0xB1, STATE1, STATE1 /* DCHG */
> movdqa STATE0, MSGTMP4
> - pblendw $0xF0, STATE1, STATE0 /* DCBA */
> - palignr $8, MSGTMP4, STATE1 /* HGFE */
> + punpcklqdq STATE1, STATE0 /* GHEF */
> + punpckhqdq MSGTMP4, STATE1 /* ABCD */
> + pshufd $0xB1, STATE0, STATE0 /* HGFE */
> + pshufd $0x1B, STATE1, STATE1 /* DCBA */
>
> movdqu STATE0, 0*16(DIGEST_PTR)
> movdqu STATE1, 1*16(DIGEST_PTR)
Please make sure to run the crypto self-tests too. The above is storing the two
halves of the state in the wrong order.
Thanks,
- Eric
prev parent reply other threads:[~2024-04-08 13:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 9:26 [PATCH 1/2] crypto: s(h)aving 40+ bytes off arch/x86/crypto/sha256_ni_asm.S Stefan Kanthak
2024-04-08 12:37 ` Eric Biggers
[not found] ` <9088939CC5454139901CEDD97DAFB004@H270>
2024-04-08 15:18 ` Eric Biggers
2024-04-09 10:23 ` Stefan Kanthak
2024-04-09 12:32 ` Eric Biggers
2024-04-08 13:12 ` Eric Biggers [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=20240408131238.GC732@quark.localdomain \
--to=ebiggers@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sean.m.gulley@intel.com \
--cc=stefan.kanthak@nexgo.de \
--cc=tim.c.chen@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox