• Michael Munday's avatar
    crypto/cipher, crypto/aes: add s390x implementation of AES-CBC · 2f847564
    Michael Munday authored
    This commit adds the cbcEncAble and cbcDecAble interfaces that
    can be implemented by block ciphers that support an optimized
    implementation of CBC. This is similar to what is done for GCM
    with the gcmAble interface.
    
    The cbcEncAble, cbcDecAble and gcmAble interfaces all now have
    tests to ensure they are detected correctly in the cipher
    package.
    
    name             old speed     new speed      delta
    AESCBCEncrypt1K  152MB/s ± 1%  1362MB/s ± 0%  +795.59%   (p=0.000 n=10+9)
    AESCBCDecrypt1K  143MB/s ± 1%  1362MB/s ± 0%  +853.00%   (p=0.000 n=10+9)
    
    Change-Id: I715f686ab3686b189a3dac02f86001178fa60580
    Reviewed-on: https://go-review.googlesource.com/22523
    Run-TryBot: Michael Munday <munday@ca.ibm.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarAdam Langley <agl@golang.org>
    2f847564
cbc.go 4.19 KB