]> Cypherpunks repositories - gostls13.git/commit
crypto/internal/fips/sha3: reduce s390x divergence
authorFilippo Valsorda <filippo@golang.org>
Wed, 2 Oct 2024 11:29:47 +0000 (13:29 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 28 Oct 2024 14:55:21 +0000 (14:55 +0000)
commitd75fb40e52888dbd3ec9ff22e63e48b18cd5be31
tree91908154aee0873cdc59b4721c81059973dbbbd5
parent312e7e9f8a85bbab449daae6ebe969ad1d4f0840
crypto/internal/fips/sha3: reduce s390x divergence

It's a little annoying, but we can fit the IBM instructions on top of
the regular state, avoiding more intrusive interventions.

Going forward we should not accept assembly that replaces the whole
implementation, because it doubles the work to do any refactoring like
the one in this chain.

Also, it took me a while to find the specification of these
instructions, which should have been linked from the source for the next
person who'd have to touch this.

Finally, it's really painful to test this without a LUCI TryBot, per #67307.

For #69536

Change-Id: I90632a90f06b2aa2e863967de972b12dbaa5b2ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/617359
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Roland Shoemaker <roland@golang.org>
12 files changed:
src/crypto/internal/fips/sha3/_asm/keccakf_amd64_asm.go
src/crypto/internal/fips/sha3/hashes.go
src/crypto/internal/fips/sha3/keccakf.go
src/crypto/internal/fips/sha3/keccakf_amd64.go [deleted file]
src/crypto/internal/fips/sha3/sha3.go
src/crypto/internal/fips/sha3/sha3_amd64.go [new file with mode: 0644]
src/crypto/internal/fips/sha3/sha3_amd64.s [moved from src/crypto/internal/fips/sha3/keccakf_amd64.s with 99% similarity]
src/crypto/internal/fips/sha3/sha3_noasm.go
src/crypto/internal/fips/sha3/sha3_s390x.go
src/crypto/internal/fips/sha3/sha3_s390x.s
src/crypto/internal/fips/sha3/sha3_test.go
src/crypto/internal/fips/sha3/shake.go