1
0
mirror of https://github.com/golang/go synced 2024-09-30 04:34:33 -06:00
go/src/crypto
Michael Munday 7ba0c6235f crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations
Hardware AES support in Go on s390x currently requires ECB, CBC
and CTR modes be available. It also requires that either the
GHASH or GCM facilities are available. The existing checks missed
some of these constraints.

While we're here simplify the cpu package on s390x, moving masking
code out of assembly and into Go code. Also, update SHA-{1,256,512}
implementations to use the cpu package since that is now trivial.

Finally I also added a test for internal/cpu on s390x which loads
/proc/cpuinfo and checks it against the flags set by internal/cpu.

Updates #25822 for changes to vet whitelist.

Change-Id: Iac4183f571643209e027f730989c60a811c928eb
Reviewed-on: https://go-review.googlesource.com/114397
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-06-11 11:41:31 +00:00
..
aes crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
cipher crypto/cipher: replace NewGCMWithNonceAndTagSize with NewGCMWithTagSize 2018-06-07 01:19:13 +00:00
des
dsa crypto: randomly read an extra byte of randomness in some places. 2018-06-07 15:09:25 +00:00
ecdsa crypto: randomly read an extra byte of randomness in some places. 2018-06-07 15:09:25 +00:00
elliptic all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
hmac all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
internal/randutil crypto: randomly read an extra byte of randomness in some places. 2018-06-07 15:09:25 +00:00
md5 crypto/md5: unnecessary conversion 2018-04-24 15:49:43 +00:00
rand crypto/rand, crypto/x509: add js/wasm architecture 2018-05-03 18:00:24 +00:00
rc4 all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
rsa crypto: randomly read an extra byte of randomness in some places. 2018-06-07 15:09:25 +00:00
sha1 crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
sha256 crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
sha512 crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
subtle crypto/subtle: simplify and speed up constant-time primitives 2017-11-10 03:47:57 +00:00
tls crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
x509 crypto/x509: use SecItemExport instead of deprecated SecKeychainItemExport 2018-06-06 17:59:08 +00:00
crypto.go
issue21104_test.go