mirror of
https://github.com/golang/go
synced 2024-11-15 08:20:30 -07:00
all: update vendored golang.org/x/crypto
Pull in CL 578715: 5defcc19 sha3: fix Sum results for SHAKE functions on s390x Fixes #66804. Change-Id: I72bb7862778c6e10a40b1aaeeafea49e1a0d80f5 Reviewed-on: https://go-review.googlesource.com/c/go/+/579455 Reviewed-by: Michael Munday <mike.munday@lowrisc.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
parent
5bb4f49471
commit
626f6db588
@ -3,7 +3,7 @@ module std
|
|||||||
go 1.23
|
go 1.23
|
||||||
|
|
||||||
require (
|
require (
|
||||||
golang.org/x/crypto v0.22.0
|
golang.org/x/crypto v0.22.1-0.20240415215343-5defcc193aab
|
||||||
golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114
|
golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
golang.org/x/crypto v0.22.1-0.20240415215343-5defcc193aab h1:7X80n3mDJrqepjWApLRTQmLYC+hKHXsvFi/LO2SE324=
|
||||||
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
golang.org/x/crypto v0.22.1-0.20240415215343-5defcc193aab/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||||
golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114 h1:0+DQSN4OXt0ivfKIOXFQ+8vsRb1pNvvdl7DZ6AR07OQ=
|
golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114 h1:0+DQSN4OXt0ivfKIOXFQ+8vsRb1pNvvdl7DZ6AR07OQ=
|
||||||
golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
golang.org/x/net v0.24.1-0.20240405221309-ec05fdcd7114/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
|
||||||
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||||
|
15
src/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
generated
vendored
15
src/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
generated
vendored
@ -143,6 +143,12 @@ func (s *asmState) Write(b []byte) (int, error) {
|
|||||||
|
|
||||||
// Read squeezes an arbitrary number of bytes from the sponge.
|
// Read squeezes an arbitrary number of bytes from the sponge.
|
||||||
func (s *asmState) Read(out []byte) (n int, err error) {
|
func (s *asmState) Read(out []byte) (n int, err error) {
|
||||||
|
// The 'compute last message digest' instruction only stores the digest
|
||||||
|
// at the first operand (dst) for SHAKE functions.
|
||||||
|
if s.function != shake_128 && s.function != shake_256 {
|
||||||
|
panic("sha3: can only call Read for SHAKE functions")
|
||||||
|
}
|
||||||
|
|
||||||
n = len(out)
|
n = len(out)
|
||||||
|
|
||||||
// need to pad if we were absorbing
|
// need to pad if we were absorbing
|
||||||
@ -202,8 +208,17 @@ func (s *asmState) Sum(b []byte) []byte {
|
|||||||
|
|
||||||
// Hash the buffer. Note that we don't clear it because we
|
// Hash the buffer. Note that we don't clear it because we
|
||||||
// aren't updating the state.
|
// aren't updating the state.
|
||||||
|
switch s.function {
|
||||||
|
case sha3_224, sha3_256, sha3_384, sha3_512:
|
||||||
klmd(s.function, &a, nil, s.buf)
|
klmd(s.function, &a, nil, s.buf)
|
||||||
return append(b, a[:s.outputLen]...)
|
return append(b, a[:s.outputLen]...)
|
||||||
|
case shake_128, shake_256:
|
||||||
|
d := make([]byte, s.outputLen, 64)
|
||||||
|
klmd(s.function, &a, d, s.buf)
|
||||||
|
return append(b, d[:s.outputLen]...)
|
||||||
|
default:
|
||||||
|
panic("sha3: unknown function")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset resets the Hash to its initial state.
|
// Reset resets the Hash to its initial state.
|
||||||
|
2
src/vendor/modules.txt
vendored
2
src/vendor/modules.txt
vendored
@ -1,4 +1,4 @@
|
|||||||
# golang.org/x/crypto v0.22.0
|
# golang.org/x/crypto v0.22.1-0.20240415215343-5defcc193aab
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
golang.org/x/crypto/chacha20
|
golang.org/x/crypto/chacha20
|
||||||
golang.org/x/crypto/chacha20poly1305
|
golang.org/x/crypto/chacha20poly1305
|
||||||
|
Loading…
Reference in New Issue
Block a user