1
0
mirror of https://github.com/golang/go synced 2024-09-29 14:14:29 -06:00
go/src/crypto
Paul E. Murphy d4dd7acd2e crypto/aes: simplify key load+store on PPC64
There is no requirement for how the expanded keys are stored
in memory. They are only accessed by asm routines. If keys
are stored directly with stxvd2x, they can be loaded directly
with lxvd2x.

This speeds up ppc64le key expansion and crypting a bit too.

POWER9 aes benchmark delta:

name     old time/op    new time/op    delta
Encrypt    15.0ns ± 0%    13.0ns ± 0%  -13.17%
Decrypt    14.6ns ± 0%    13.0ns ± 0%  -11.02%
Expand     49.1ns ± 0%    45.1ns ± 0%   -8.01%

name             old time/op    new time/op    delta
AESCBCEncrypt1K    1.08µs ± 0%    1.08µs ± 0%   -0.46%
AESCBCDecrypt1K     744ns ± 0%     562ns ± 0%  -24.46%

Change-Id: I91f3cdc770a178aee849301e4e6aa5a4a517ad10
Reviewed-on: https://go-review.googlesource.com/c/go/+/405135
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2022-05-13 14:14:49 +00:00
..
aes crypto/aes: simplify key load+store on PPC64 2022-05-13 14:14:49 +00:00
boring [dev.boringcrypto] all: add boringcrypto build tags 2022-04-29 14:23:22 +00:00
cipher all: gofmt main repo 2022-04-11 16:34:30 +00:00
des all: fix some lint issues 2022-05-08 17:27:54 +00:00
dsa
ecdsa all: REVERSE MERGE dev.boringcrypto (cdcb4b6) into master 2022-05-02 22:12:49 -04:00
ed25519 crypto/ed25519/internal/edwards25519: move to crypto/internal/edwards25519 2022-05-05 21:53:10 +00:00
elliptic crypto/elliptic/internal/nistec: move to crypto/internal/nistec 2022-05-05 21:53:03 +00:00
hmac [dev.boringcrypto] crypto/hmac: merge up to 2a206c7 and skip test 2020-11-18 13:38:14 -05:00
internal crypto/internal/nistec: re-enable ppc64le asm for P-256 2022-05-05 23:41:16 +00:00
md5 all: remove more leftover // +build lines 2021-11-06 10:24:44 +00:00
rand crypto/rand: fix race on r.used 2022-05-06 17:41:30 +00:00
rc4
rsa [dev.boringcrypto] crypto/ecdsa, crypto/rsa: use boring.Cache 2022-04-29 14:23:32 +00:00
sha1 [dev.boringcrypto] crypto/internal/boring: make SHA calls allocation-free 2022-04-29 14:23:27 +00:00
sha256 crypto/internal/boring: avoid false positive in cgo pointer check in SHA calls 2022-05-05 19:31:33 +00:00
sha512 [dev.boringcrypto] crypto/internal/boring: make SHA calls allocation-free 2022-04-29 14:23:27 +00:00
subtle crypto/subtle: note that input length mismatch makes ConstantTimeCompare return immediately 2022-04-05 01:54:27 +00:00
tls crypto/tls: avoid extra allocations in steady-state Handshake calls 2022-05-06 20:17:52 +00:00
x509 crypto/x509: attempt to prime windows root pool before hybrid test 2022-05-12 20:58:12 +00:00
crypto.go all: gofmt main repo 2022-04-11 16:34:30 +00:00
issue21104_test.go