• Michael Munday's avatar
    crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations · 7ba0c623
    Michael Munday authored
    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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    7ba0c623
Name
Last commit
Last update
..
aes Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
internal/randutil Loading commit data...
md5 Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
x509 Loading commit data...
crypto.go Loading commit data...
issue21104_test.go Loading commit data...