[crypto] sha3: make it mostly a wrapper around crypto/sha3

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Oct 22, 2025, 9:01:06 PM (12 hours ago) Oct 22
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, David Chase, Roland Shoemaker, Daniel McCarney, Go LUCI, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
sha3: make it mostly a wrapper around crypto/sha3

crypto/sha3 was introduced in Go 1.24, which is now the minimum Go
version of this module.

Made the hashes go:fix inline wrappers, since the new types can be used
as hash.Hash directly.

The SHAKE instances need a wrapper for the methods we dropped from
crypto.XOF, so no go:fix inline there.

Kept the generic implementation for the legacy Keccak hashes we did not
bring to the standard library. We need to keep them working, but they
don't need to be fast.

Fixes golang/go#73681
Updates golang/go#65269
Change-Id: I6a6a69648b6353b153c70a2cec84864e64dcd61b
Auto-Submit: Filippo Valsorda <fil...@golang.org>
Reviewed-by: Daniel McCarney <dan...@binaryparadox.net>
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Files:
  • D sha3/_asm/go.mod
  • D sha3/_asm/go.sum
  • D sha3/_asm/keccakf_amd64_asm.go
  • D sha3/allocations_test.go
  • D sha3/doc.go
  • M sha3/hashes.go
  • D sha3/hashes_noasm.go
  • D sha3/keccakf_amd64.go
  • D sha3/keccakf_amd64.s
  • R sha3/legacy_hash.go
  • R sha3/legacy_keccakf.go
  • D sha3/sha3_s390x.go
  • D sha3/sha3_s390x.s
  • M sha3/sha3_test.go
  • M sha3/shake.go
  • D sha3/shake_noasm.go
Change size: XL
Delta: 16 files changed, 137 insertions(+), 6743 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by David Chase, +2 by Roland Shoemaker, +2 by Daniel McCarney
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: crypto
Gerrit-Branch: master
Gerrit-Change-Id: I6a6a69648b6353b153c70a2cec84864e64dcd61b
Gerrit-Change-Number: 710115
Gerrit-PatchSet: 3
Gerrit-Owner: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Daniel McCarney <dan...@binaryparadox.net>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages