1
0
mirror of https://github.com/golang/go synced 2024-10-04 11:21:21 -06:00
go/src/crypto/aes
Michael Munday c717675c35 crypto/cipher, crypto/aes: add s390x implementation of AES-CTR
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/22195
Reviewed-by: Adam Langley <agl@golang.org>
2016-04-29 21:17:31 +00:00
..
aes_gcm.go crypto/cipher, crypto/aes: add s390x implementation of AES-CBC 2016-04-29 21:17:09 +00:00
aes_test.go crypto/aes: use asm for BenchmarkExpand on amd64 2016-04-22 18:58:29 +00:00
asm_amd64.s cmd/internal/obj/x86: add new instructions, cleanup. 2016-01-13 14:04:44 +00:00
asm_s390x.s crypto/cipher, crypto/aes: add s390x implementation of AES-CTR 2016-04-29 21:17:31 +00:00
block.go all: single space after period. 2016-03-02 00:13:47 +00:00
cbc_s390x.go crypto/cipher, crypto/aes: add s390x implementation of AES-CBC 2016-04-29 21:17:09 +00:00
cipher_amd64.go crypto/aes: use asm for BenchmarkExpand on amd64 2016-04-22 18:58:29 +00:00
cipher_generic.go crypto/aes: use asm for BenchmarkExpand on amd64 2016-04-22 18:58:29 +00:00
cipher_s390x.go crypto/aes: use asm for BenchmarkExpand on amd64 2016-04-22 18:58:29 +00:00
cipher.go crypto/aes: de-couple asm and go implementations 2016-04-19 18:50:51 +00:00
const.go
ctr_s390x.go crypto/cipher, crypto/aes: add s390x implementation of AES-CTR 2016-04-29 21:17:31 +00:00
gcm_amd64.s crypto/aes: fix vet warnings in gcm_amd64.s 2016-04-14 20:06:30 +00:00
modes_test.go crypto/cipher, crypto/aes: add s390x implementation of AES-CTR 2016-04-29 21:17:31 +00:00
modes.go crypto/cipher, crypto/aes: add s390x implementation of AES-CTR 2016-04-29 21:17:31 +00:00