]> Cypherpunks repositories - gostls13.git/commit
crypto/cipher, crypto/aes: add s390x implementation of AES-CBC
authorMichael Munday <munday@ca.ibm.com>
Tue, 26 Apr 2016 01:46:02 +0000 (21:46 -0400)
committerAdam Langley <agl@golang.org>
Fri, 29 Apr 2016 21:17:09 +0000 (21:17 +0000)
commit2f8475648a5500830561ea03960a1425e1ff0993
tree5403ca668f26c39a1681e4f4c9c0e86d197c21ce
parentcd956576ae618a1de829e42f9ec557e6cee338d1
crypto/cipher, crypto/aes: add s390x implementation of AES-CBC

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: Adam Langley <agl@golang.org>
src/crypto/aes/aes_gcm.go
src/crypto/aes/asm_s390x.s
src/crypto/aes/cbc_s390x.go [new file with mode: 0644]
src/crypto/aes/modes.go [new file with mode: 0644]
src/crypto/aes/modes_test.go [new file with mode: 0644]
src/crypto/cipher/cbc.go