From: Dave Watson <davejwatson@fb.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
Junaid Shahid <junaids@google.com>,
Steffen Klassert <steffen.klassert@secunet.com>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Cc: Doron Roberts-Kedes <doronrk@fb.com>,
Sabrina Dubroca <sd@queasysnail.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Stephan Mueller <smueller@chronox.de>
Subject: [PATCH 05/12] x86/crypto: aesni: Add GCM_COMPLETE macro
Date: Mon, 10 Dec 2018 19:57:49 +0000 [thread overview]
Message-ID: <85c7157eb2c38a3bd0d39e17a8156e451fcd13e2.1544471415.git.davejwatson@fb.com> (raw)
In-Reply-To: <cover.1544471415.git.davejwatson@fb.com>
Merge encode and decode tag calculations in GCM_COMPLETE macro.
Scatter/gather routines will call this once at the end of encryption
or decryption.
Signed-off-by: Dave Watson <davejwatson@fb.com>
---
arch/x86/crypto/aesni-intel_avx-x86_64.S | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/x86/crypto/aesni-intel_avx-x86_64.S b/arch/x86/crypto/aesni-intel_avx-x86_64.S
index 2aa11c503bb9..8e9ae4b26118 100644
--- a/arch/x86/crypto/aesni-intel_avx-x86_64.S
+++ b/arch/x86/crypto/aesni-intel_avx-x86_64.S
@@ -510,6 +510,14 @@ _less_than_8_bytes_left\@:
#############################
_multiple_of_16_bytes\@:
+ GCM_COMPLETE \GHASH_MUL \REP
+.endm
+
+
+# GCM_COMPLETE Finishes update of tag of last partial block
+# Output: Authorization Tag (AUTH_TAG)
+# Clobbers rax, r10-r12, and xmm0, xmm1, xmm5-xmm15
+.macro GCM_COMPLETE GHASH_MUL REP
mov arg8, %r12 # r12 = aadLen (number of bytes)
shl $3, %r12 # convert into number of bits
vmovd %r12d, %xmm15 # len(A) in xmm15
--
2.17.1
next prev parent reply other threads:[~2018-12-10 19:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-10 19:56 [PATCH 00/12] x86/crypto: gcmaes AVX scatter/gather support Dave Watson
2018-12-10 19:56 ` [PATCH 01/12] x86/crypto: aesni: Merge GCM_ENC_DEC Dave Watson
2018-12-10 19:57 ` [PATCH 02/12] x86/crypto: aesni: Introduce gcm_context_data Dave Watson
2018-12-10 19:57 ` [PATCH 03/12] x86/crypto: aesni: Macro-ify func save/restore Dave Watson
2018-12-10 19:57 ` [PATCH 04/12] x86/crypto: aesni: support 256 byte keys in avx asm Dave Watson
2018-12-10 19:57 ` Dave Watson [this message]
2018-12-10 19:58 ` [PATCH 06/12] x86/crypto: aesni: Split AAD hash calculation to separate macro Dave Watson
2018-12-10 19:58 ` [PATCH 07/12] x86/crypto: aesni: Merge avx precompute functions Dave Watson
2018-12-10 19:58 ` [PATCH 08/12] x86/crypto: aesni: Fill in new context data structures Dave Watson
2018-12-10 19:59 ` [PATCH 09/12] x86/crypto: aesni: Move ghash_mul to GCM_COMPLETE Dave Watson
2018-12-10 19:59 ` [PATCH 10/12] x86/crypto: aesni: Introduce READ_PARTIAL_BLOCK macro Dave Watson
2018-12-10 19:59 ` [PATCH 11/12] x86/crypto: aesni: Introduce partial block macro Dave Watson
2018-12-10 19:59 ` [PATCH 12/12] x86/crypto: aesni: Add scatter/gather avx stubs, and use them in C Dave Watson
2018-12-23 4:01 ` [PATCH 00/12] x86/crypto: gcmaes AVX scatter/gather support 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=85c7157eb2c38a3bd0d39e17a8156e451fcd13e2.1544471415.git.davejwatson@fb.com \
--to=davejwatson@fb.com \
--cc=doronrk@fb.com \
--cc=herbert@gondor.apana.org.au \
--cc=junaids@google.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sd@queasysnail.net \
--cc=smueller@chronox.de \
--cc=steffen.klassert@secunet.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
all inboxes | Powered by JetHome®