• Michael Munday's avatar
    crypto/aes: de-couple asm and go implementations · 9b6bf20a
    Michael Munday authored
    There is currently only one assembly implementation of AES
    (amd64). While it is possible to fit other implementations to the
    same pattern it complicates the code. For example s390x does not
    use expanded keys, so having enc and dec in the aesCipher struct
    is confusing.
    
    By separating out the asm implementations we can more closely
    match the data structures to the underlying implementation. This
    also opens the door for AES implementations that support block
    cipher modes other than GCM (e.g. CTR and CBC).
    
    This commit changes BenchmarkExpandKey to test the go
    implementation of key expansion. It might be better to have some
    sort of 'initialisation' benchmark instead to cover the startup
    costs of the assembly implementations (which might be doing
    key expansion in a different way, or not at all).
    
    Change-Id: I094a7176b5bbe2177df73163a9c0b711a61c12d6
    Reviewed-on: https://go-review.googlesource.com/22193
    Run-TryBot: Michael Munday <munday@ca.ibm.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    9b6bf20a
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...
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...