• Michael Munday's avatar
    crypto/cipher, crypto/aes: add s390x implementation of AES-CTR · c717675c
    Michael Munday authored
    This commit adds the new 'ctrAble' interface to the crypto/cipher
    package. The role of ctrAble is the same as gcmAble but for CTR
    instead of GCM. It allows block ciphers to provide optimized CTR
    implementations.
    
    The primary benefit of adding CTR support to the s390x AES
    implementation is that it allows us to encrypt the counter values
    in bulk, giving the cipher message instruction a larger chunk of
    data to work on per invocation.
    
    The xorBytes assembly is necessary because xorBytes becomes a
    bottleneck when CTR is done in this way. Hopefully it will be
    possible to remove this once s390x has migrated to the ssa
    backend.
    
    name      old speed     new speed     delta
    AESCTR1K  160MB/s ± 6%  867MB/s ± 0%  +442.42%  (p=0.000 n=9+10)
    
    Change-Id: I1ae16b0ce0e2641d2bdc7d7eabc94dd35f6e9318
    Reviewed-on: https://go-review.googlesource.com/22195Reviewed-by: 's avatarAdam Langley <agl@golang.org>
    c717675c
Name
Last commit
Last update
..
aes_gcm.go Loading commit data...
aes_test.go Loading commit data...
asm_amd64.s Loading commit data...
asm_s390x.s Loading commit data...
block.go Loading commit data...
cbc_s390x.go Loading commit data...
cipher.go Loading commit data...
cipher_amd64.go Loading commit data...
cipher_generic.go Loading commit data...
cipher_s390x.go Loading commit data...
const.go Loading commit data...
ctr_s390x.go Loading commit data...
gcm_amd64.s Loading commit data...
modes.go Loading commit data...
modes_test.go Loading commit data...