go/src/crypto/cipher
Russ Cox 57d05512fe crypto/subtle: add XORBytes
Export cipher.xorBytes as subtle.XORBytes, for proposal #53021,
to provide fast XOR to cryptography libraries outside crypto/cipher.

Along with the move, implement the alignment check TODO
in xor_generic.go, so that systems with neither unaligned
accesses nor custom assembly can still XOR a word at a time
in word-based algorithms like GCM. This removes the need
for the separate cipher.xorWords.

Fixes #53021.

Change-Id: I58f80a922f1cff671b5ebc6168eb046e702b5a4c
Reviewed-on: https://go-review.googlesource.com/c/go/+/421435
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2022-08-17 18:47:33 +00:00
..
benchmark_test.go crypto/cipher: make AES-GCM benchmarks match ChaCha20Poly1305 ones 2021-04-28 19:13:50 +00:00
cbc.go crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
cbc_aes_test.go
cfb.go crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
cfb_test.go
cipher.go
cipher_test.go
common_test.go
ctr.go crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
ctr_aes_test.go
ctr_test.go
example_test.go
export_test.go crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
fuzz_test.go crypto/aes: improve performance for aes-cbc on ppc64le 2022-03-03 13:39:12 +00:00
gcm.go crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
gcm_test.go
io.go
ofb.go crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
ofb_test.go