crypto/sha3
Yawning Angel a0819fbb02 sha3: fix cSHAKE initialization for extremely large N and or S
While both impractical and unlikely, the multiplication could overflow
on 32-bit architectures.

The 64-bit architecture case is unaffected by both the maximum length
of Go slices being too small to trigger the overflow (everything except
s390), and it being safe to assume no machine has more than 2 EiB of
memory.

Fixes golang/go#66232

Change-Id: I19c15d42d2d6af35e296697159d43d02f513e614
GitHub-Last-Rev: 503e180deb
GitHub-Pull-Request: golang/crypto#286
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/570876
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
2024-09-30 15:41:13 +00:00
..
_asm sha3: Avo port of keccakf_amd64.s 2024-07-16 18:24:57 +00:00
testdata sha3: add cSHAKE support 2019-04-17 17:40:47 +00:00
allocations_test.go sha3: reenable s390x assembly 2024-05-07 22:33:54 +00:00
doc.go all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
hashes.go all: bump go.mod version and drop compatibility shims 2024-06-26 15:12:35 +00:00
hashes_noasm.go sha3: reenable s390x assembly 2024-05-07 22:33:54 +00:00
keccakf.go all: update go directive to 1.18 2023-10-11 22:02:22 +00:00
keccakf_amd64.go all: update go directive to 1.18 2023-10-11 22:02:22 +00:00
keccakf_amd64.s sha3: Avo port of keccakf_amd64.s 2024-07-16 18:24:57 +00:00
sha3.go sha3: make APIs usable with zero allocations 2024-05-07 22:04:09 +00:00
sha3_s390x.go sha3: reenable s390x assembly 2024-05-07 22:33:54 +00:00
sha3_s390x.s sha3: reenable s390x assembly 2024-05-07 22:33:54 +00:00
sha3_test.go sha3: simplify XOR functions 2024-05-06 15:29:57 +00:00
shake.go sha3: fix cSHAKE initialization for extremely large N and or S 2024-09-30 15:41:13 +00:00
shake_noasm.go sha3: reenable s390x assembly 2024-05-07 22:33:54 +00:00
xor.go sha3: simplify XOR functions 2024-05-06 15:29:57 +00:00