1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:44:39 -07: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 crypto: revise wording about cryptographically broken algorithms 2017-05-04 12:31:18 +00:00
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 crypto: add BLAKE2b and BLAKE2s hash constants 2017-03-01 19:26:16 +00:00
issue21104_test.go crypto/{aes,cipher,rc4}: fix out of bounds write in stream ciphers 2017-08-09 04:17:51 +00:00