aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Thorogood <me+google@tomthorogood.co.uk>2026-01-11 17:30:06 +1030
committerGopher Robot <gobot@golang.org>2026-02-06 12:25:04 -0800
commitbf69803f97c1afadcfb29fea820326ffe8e87c6d (patch)
treee6692a0a5db7604f75e6d73ca46d8010f5df3892
parent43ee761b703bef6814817d3d5146b0d47fe3e657 (diff)
downloadgo-bf69803f97c1afadcfb29fea820326ffe8e87c6d.tar.xz
[release-branch.go1.26] simd/archsimd: correct algorithm name in SHA256 ops documentation
The three SHA256 ops (SHA256Message1, SHA256Message2 and SHA256TwoRounds) all incorrectly referred to the SHA1 algorithm in their documentation rather than SHA256. Change-Id: Id6c1bfe4fee4517c0e498fb063cc9112464bc1e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/735420 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> (cherry picked from commit 0430fa977573866f93e66aa61a66b37ff0738aba) Reviewed-on: https://go-review.googlesource.com/c/go/+/742583 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com>
-rw-r--r--src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml6
-rw-r--r--src/simd/archsimd/ops_amd64.go6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml b/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml
index 64a9544bc8..a7720bbd33 100644
--- a/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml
+++ b/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml
@@ -83,7 +83,7 @@
- go: SHA256TwoRounds
commutative: false
documentation: !string |-
- // NAME does 2 rounds of B loop to calculate updated state variables in SHA1 algorithm defined in FIPS 180-4.
+ // NAME does 2 rounds of B loop to calculate updated state variables in SHA256 algorithm defined in FIPS 180-4.
// x = {h, g, d, c}
// y = {f, e, b, a}
// z = {W0+K0, W1+K1}
@@ -95,14 +95,14 @@
- go: SHA256Message1
commutative: false
documentation: !string |-
- // NAME does the sigma and addtion of 1 in SHA1 algorithm defined in FIPS 180-4.
+ // NAME does the sigma and addition of 1 in SHA256 algorithm defined in FIPS 180-4.
// x = {W0, W1, W2, W3}
// y = {W4, 0, 0, 0}
// result = {W0+σ(W1), W1+σ(W2), W2+σ(W3), W3+σ(W4)}
- go: SHA256Message2
commutative: false
documentation: !string |-
- // NAME does the sigma and addition of 3 in SHA1 algorithm defined in FIPS 180-4.
+ // NAME does the sigma and addition of 3 in SHA256 algorithm defined in FIPS 180-4.
// x = result of 2
// y = {0, 0, W14, W15}
// result = {W16, W17, W18, W19} \ No newline at end of file
diff --git a/src/simd/archsimd/ops_amd64.go b/src/simd/archsimd/ops_amd64.go
index 9c5bb22eee..8eb06994ad 100644
--- a/src/simd/archsimd/ops_amd64.go
+++ b/src/simd/archsimd/ops_amd64.go
@@ -5359,7 +5359,7 @@ func (x Uint32x4) SHA1NextE(y Uint32x4) Uint32x4
/* SHA256Message1 */
-// SHA256Message1 does the sigma and addtion of 1 in SHA1 algorithm defined in FIPS 180-4.
+// SHA256Message1 does the sigma and addition of 1 in SHA256 algorithm defined in FIPS 180-4.
// x = {W0, W1, W2, W3}
// y = {W4, 0, 0, 0}
// result = {W0+σ(W1), W1+σ(W2), W2+σ(W3), W3+σ(W4)}
@@ -5369,7 +5369,7 @@ func (x Uint32x4) SHA256Message1(y Uint32x4) Uint32x4
/* SHA256Message2 */
-// SHA256Message2 does the sigma and addition of 3 in SHA1 algorithm defined in FIPS 180-4.
+// SHA256Message2 does the sigma and addition of 3 in SHA256 algorithm defined in FIPS 180-4.
// x = result of 2
// y = {0, 0, W14, W15}
// result = {W16, W17, W18, W19}
@@ -5379,7 +5379,7 @@ func (x Uint32x4) SHA256Message2(y Uint32x4) Uint32x4
/* SHA256TwoRounds */
-// SHA256TwoRounds does 2 rounds of B loop to calculate updated state variables in SHA1 algorithm defined in FIPS 180-4.
+// SHA256TwoRounds does 2 rounds of B loop to calculate updated state variables in SHA256 algorithm defined in FIPS 180-4.
// x = {h, g, d, c}
// y = {f, e, b, a}
// z = {W0+K0, W1+K1}