zig/lib/std/crypto
Frank Denis d8d2aa9af4
crypto.pcurves.common: generalize invert() (#23039)
The Bernstein-Yang inversion code was meant to be used only with the
fields we currently use for the NIST curves.

But people copied that code and were confused that it didn't work as
expected with other field sizes.

It doesn't cost anything to make it work with other field sizes,
that may support in the future. So let's do it.
This also reduces the diff with the example zig code in fiat crypto.

Suggested by @Rexicon226 -- Thank you!
2025-03-02 11:27:04 +01:00
..
25519 crypto.Ed25519.KeyPair: return an error rather than assert 2025-02-21 22:45:38 +01:00
aes x86_64: fix crashes compiling the compiler and tests 2025-01-16 20:47:30 -05:00
asn1 std.crypto.asn1: fix merge conflicts 2025-02-22 17:44:11 -08:00
Certificate rescanMac: Avoid overallocating/overreading by millions of bytes 2025-02-20 22:16:05 +01:00
pcurves crypto.pcurves.common: generalize invert() (#23039) 2025-03-02 11:27:04 +01:00
tls zig build fmt 2025-02-22 17:09:20 -08:00
aegis.zig crypto.auth.Aegis128X*Mac: properly absorb tags in the first lane (#22922) 2025-02-17 17:56:09 +00:00
aes.zig std.crypto.aes: introduce AES block vectors (#22023) 2024-11-22 10:00:49 +01:00
aes_gcm.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
aes_ocb.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
argon2.zig argon2: bail out if m < 8p (#22232) 2024-12-14 19:26:55 +00:00
ascon.zig crypto.ascon: support up to 16 rounds, and update links (#21953) 2024-11-10 20:43:09 +00:00
asn1.zig std.crypto.asn1: fix merge conflicts 2025-02-22 17:44:11 -08:00
bcrypt.zig crypto.pwhash.bcrypt: make silently_truncate_password a member of Params (#22792) 2025-02-19 22:37:51 +01:00
benchmark.zig crypto.pwhash.bcrypt: make silently_truncate_password a member of Params (#22792) 2025-02-19 22:37:51 +01:00
blake2.zig std: update eval branch quotas after bdbc485 2024-08-21 01:30:46 +01:00
blake3.zig x86_64: implement more shuffles 2024-02-25 11:22:10 +01:00
Certificate.zig std.crypto.tls: implement TLSv1.2 2024-11-07 20:25:26 -05:00
chacha20.zig x86_64: looped instructions 2025-01-16 20:42:08 -05:00
cmac.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
ecdsa.zig std.crypto: make the key pair API creation consistent (#21955) 2024-11-19 18:05:09 +01:00
errors.zig crypto.edwards25519: add the ability to check for group membership (#20175) 2024-06-04 10:11:05 +02:00
ff.zig std: update std.builtin.Type fields to follow naming conventions 2024-08-28 08:39:59 +01:00
ghash_polyval.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
hash_composition.zig x86_64: implement enough to pass unicode tests 2023-10-23 22:42:18 -04:00
hkdf.zig closes #21824 (#21832) 2024-10-28 14:54:02 +00:00
hmac.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
isap.zig std.crypto: better names for everything in utils 2024-08-09 19:47:06 -07:00
keccak_p.zig crypto.keccak.State: add checks to prevent insecure transitions (#22020) 2024-11-20 11:16:09 +01:00
md5.zig Remove redundant test name prefixes now that test names are fully qualified 2024-02-26 15:18:31 -08:00
ml_kem.zig std.crypto: make the key pair API creation consistent (#21955) 2024-11-19 18:05:09 +01:00
modes.zig update codebase to use @memset and @memcpy 2023-04-28 13:24:43 -07:00
pbkdf2.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
phc_encoding.zig crypto/phc-encoding: forbid parameters named 'v' (#22569) 2025-02-06 16:37:42 +01:00
poly1305.zig std: avoid field/decl name conflicts 2024-08-29 20:39:11 +01:00
salsa20.zig std.crypto: make the key pair API creation consistent (#21955) 2024-11-19 18:05:09 +01:00
scrypt.zig std.crypto.pwhash: Add recommended parameters (#20527) 2024-07-07 20:18:33 +00:00
sha1.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
sha2.zig std: fix typos (#20560) 2024-07-09 14:25:42 -07:00
sha3.zig closes #21824 (#21832) 2024-10-28 14:54:02 +00:00
siphash.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
test.zig update std lib and compiler sources to new for loop syntax 2023-02-18 19:17:21 -07:00
timing_safe.zig std.crypto: add the ability to explicitly tag a value as secret (#19907) 2025-02-20 12:32:37 +01:00
tlcsprng.zig std.crypto.tlcsprng: Fix hardcoded use of defaultRandomSeed() 2025-02-22 22:39:40 -05:00
tls.zig std.crypto.tls: advertise all supported signature algorithms 2024-11-07 20:25:26 -05:00