zig/lib/std/crypto
Frank Denis 5af89b3dcc
std.crypto.chacha: support larger vectors on AVX2 and AVX512 targets (#15809)
* std.crypto.chacha: support larger vectors on AVX2 and AVX512 targets

Ryzen 7 7700, ChaCha20/8 stream, long outputs:

Generic: 3268 MiB/s
AVX2   : 6023 MiB/s
AVX512 : 8086 MiB/s

Bump the rand.chacha buffer a tiny bit to take advantage of this.
More than 8 blocks doesn't seem to make any measurable difference.

ChaChaPoly also gets a small performance boost from this, albeit
Poly1305 remains the bottleneck.

Generic:  707 MiB/s
AVX2   :  981 MiB/s
AVX512 : 1202 MiB/s

aarch64 appears to generally benefit from 4-way vectorization.

Verified on Apple Silicon, but also on a Cortex A72.
2023-05-22 20:33:35 +02:00
..
25519 std: fix a bunch of typos 2023-04-30 18:16:04 -07:00
aes Move std.crypto.config options to std.options (#14906) 2023-03-14 06:40:23 +00:00
Certificate Ignore certificates with unknown OID (#15539) 2023-05-22 16:13:34 +02:00
pcurves std.crypto: expose Fe isOdd & add basic parity tests for each pcurve (#15734) 2023-05-21 13:00:48 +02:00
tls std.crypto.ff - Alloc-free, constant-time field arithmetic for crypto (#15795) 2023-05-22 16:11:06 +02:00
aegis.zig crypto.AegisMac: fix a regression from s/mem.copy/@memcpy/ (#15733) 2023-05-16 23:51:47 +00:00
aes.zig cbe: fix remaining aarch64 issues 2023-04-21 16:36:31 -04:00
aes_gcm.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
aes_ocb.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
argon2.zig std: update to use @memcpy directly 2023-04-28 13:24:43 -07:00
ascon.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
bcrypt.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
benchmark.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
blake2.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
blake3.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
Certificate.zig std.crypto.ff - Alloc-free, constant-time field arithmetic for crypto (#15795) 2023-05-22 16:11:06 +02:00
chacha20.zig std.crypto.chacha: support larger vectors on AVX2 and AVX512 targets (#15809) 2023-05-22 20:33:35 +02:00
cmac.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
ecdsa.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
errors.zig std: fix a bunch of typos 2023-04-30 18:16:04 -07:00
ff.zig std.crypto.ff - Alloc-free, constant-time field arithmetic for crypto (#15795) 2023-05-22 16:11:06 +02:00
ghash_polyval.zig cbe: fix remaining aarch64 issues 2023-04-21 16:36:31 -04:00
hash_composition.zig std.crypto.hash: allow creating hash functions from compositions (#11965) 2022-07-01 11:37:41 +02:00
hkdf.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
hmac.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
isap.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
keccak_p.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
kyber_d00.zig std: fix a bunch of typos 2023-04-30 18:16:04 -07:00
md5.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
modes.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
pbkdf2.zig Fix PBKDF2 docstring comment 2023-05-01 22:14:51 +03:00
phc_encoding.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
poly1305.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
salsa20.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
scrypt.zig std: update to use @memcpy directly 2023-04-28 13:24:43 -07:00
sha1.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
sha2.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
sha3.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
siphash.zig Zir: eliminate field_call_bind and field_call_bind_named 2023-05-20 12:27:48 -07:00
test.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
tlcsprng.zig Remove Gimli and Xoodoo from the standard library (#14928) 2023-03-21 04:54:10 +00:00
tls.zig std: update to use @memcpy directly 2023-04-28 13:24:43 -07:00
utils.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00