mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-07 22:34:28 +00:00
* std.crypto.onetimeauth.ghash: faster GHASH on modern CPUs Carryless multiplication was slow on older Intel CPUs, justifying the need for using Karatsuba multiplication. This is not the case any more; using 4 multiplications to multiply two 128-bit numbers is actually faster than 3 multiplications + shifts and additions. This is also true on aarch64. Keep using Karatsuba only when targeting x86 (granted, this is a bit of a brutal shortcut, we should really list all the CPU models that had a slow clmul instruction). Also remove useless agg_2 treshold and restore the ability to precompute only H and H^2 in ReleaseSmall. Finally, avoid using u256. Using 128-bit registers is actually faster. * Use a switch, add some comments |
||
|---|---|---|
| .. | ||
| 25519 | ||
| aes | ||
| pcurves | ||
| aegis.zig | ||
| aes.zig | ||
| aes_gcm.zig | ||
| aes_ocb.zig | ||
| argon2.zig | ||
| bcrypt.zig | ||
| benchmark.zig | ||
| blake2.zig | ||
| blake3.zig | ||
| chacha20.zig | ||
| ecdsa.zig | ||
| errors.zig | ||
| ghash.zig | ||
| gimli.zig | ||
| hash_composition.zig | ||
| hkdf.zig | ||
| hmac.zig | ||
| isap.zig | ||
| md5.zig | ||
| modes.zig | ||
| pbkdf2.zig | ||
| phc_encoding.zig | ||
| poly1305.zig | ||
| salsa20.zig | ||
| scrypt.zig | ||
| sha1.zig | ||
| sha2.zig | ||
| sha3.zig | ||
| siphash.zig | ||
| test.zig | ||
| tlcsprng.zig | ||
| utils.zig | ||
| xoodoo.zig | ||