zig/lib/std/crypto/pcurves
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
..
p256 std.crypto.pcurves.*: simpler, smaller, faster u64 addition with carry (#19644) 2024-04-14 01:13:22 +02:00
p384 std.crypto.pcurves.*: simpler, smaller, faster u64 addition with carry (#19644) 2024-04-14 01:13:22 +02:00
secp256k1 std.crypto.pcurves.*: simpler, smaller, faster u64 addition with carry (#19644) 2024-04-14 01:13:22 +02:00
tests std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
common.zig crypto.pcurves.common: generalize invert() (#23039) 2025-03-02 11:27:04 +01:00
p256.zig x86_64: fix std test failures 2023-11-03 23:18:21 -04:00
p384.zig compiler: handle eval branch quota in memoized calls 2024-08-21 01:26:55 +01:00
secp256k1.zig std.crypto.pcurves fixes (#19245) 2024-03-11 09:00:15 +01:00