commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
f9b500928167e8de651e3521766296e2fe0b0da6
Maxim Evtush
2026-01-09T16:26:42
primeorder: simplify conversion (#1598)
diff --git a/primeorder/src/projective.rs b/primeorder/src/projective.rs index 60fe823d..a7833791 100644 --- a/primeorder/src/projective.rs +++ b/primeorder/src/projective.rs @@ -584,7 +584,7 @@ where type Error = Error; fn try_from(point: ProjectivePoint<C>) -> Result<PublicKey<C>> { - AffinePoint::...
1
1
1
68f2d1496d7a1346f09ffe047c05266d03b7e09a
Tony Arcieri
2026-01-08T18:11:13
Cut new prereleases (#1597) Releases the following: - `bignp256` v0.14.0-rc.4 - `bp256` v0.14.0-rc.4 - `bp384` v0.14.0-rc.4 - `ed448-goldilocks` v0.14.0-pre.7 - `hash2curve` v0.14.0-rc.7 - `k256` v0.14.0-rc.4 - `p192` v0.14.0-rc.4 - `p224` v0.14.0-rc.4 - `p256` v0.14.0-rc.4 - `p384` v0.14.0-rc.4 - `p521` v0.14.0-rc.4...
diff --git a/Cargo.lock b/Cargo.lock index ea94b5b8..e5ba3577 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,7 +70,7 @@ dependencies = [ [[package]] name = "bignp256" -version = "0.14.0-rc.3" +version = "0.14.0-rc.4" dependencies = [ "belt-hash", "criterion", @@ -141,7 +141,7 @@ dependencies = [ [[package]...
17
101
102
24559b52b7ddd7792aa93b099eb124b39757e0aa
Tony Arcieri
2026-01-08T01:08:09
sm2: add SM2DSA benchmarks (#1595) Adapted from the `ecdsa` crate (perhaps we should just put them in `signature` since they pretty much work for any signature system which uses its traits)
diff --git a/sm2/Cargo.toml b/sm2/Cargo.toml index 74d5e3c9..fba57e6b 100644 --- a/sm2/Cargo.toml +++ b/sm2/Cargo.toml @@ -52,6 +52,11 @@ pem = ["elliptic-curve/pem", "pkcs8"] pkcs8 = ["elliptic-curve/pkcs8", "der"] serde = ["elliptic-curve/serde", "primeorder?/serde", "serdect"] +[[bench]] +name = "dsa" +harness =...
2
50
0
a64c16face690c9210e5cd0baeceb87cf3eefa98
Fibonacci747
2026-01-08T00:23:38
primefield: align `monty_field_element!` docs with actual API (#1593)
diff --git a/primefield/src/macros.rs b/primefield/src/macros.rs index 8e2f082f..17b8da1c 100644 --- a/primefield/src/macros.rs +++ b/primefield/src/macros.rs @@ -92,8 +92,6 @@ macro_rules! monty_field_params { /// - `Mul` /// - `MulAssign` /// - `Neg` -/// - `Shr` -/// - `ShrAssign` /// - `Invert` #[macro_export]...
1
3
5
8a3900d440b4e4d9c70dad6750bf2d1a653bf63a
Tony Arcieri
2026-01-07T21:23:12
p256: use `ecdsa::bench_ecdsa!` macro (#1591) Uses the macro introduced in RustCrypto/signtaures#1142 to write a basic ECDSA benchmark that tests both signing and verification
diff --git a/Cargo.lock b/Cargo.lock index d805adb2..3137fd39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -419,7 +419,7 @@ dependencies = [ [[package]] name = "ecdsa" version = "0.17.0-rc.11" -source = "git+https://github.com/RustCrypto/signatures#d669c66b4ab443c0b7b82b2ab449ee7b15704a66" +source = "git+https://gith...
5
30
4
aa68e9bfd4793e857f1238bf87dfcc7e5a859039
Tony Arcieri
2026-01-07T19:18:34
bp384: add benchmarks (#1589) Adds benchmarks written with the `primefield::bench_field!` and `elliptic_curve::bench_projective!` macros, ala the ones introduced to `bp256` in #1587 and #1588
diff --git a/Cargo.lock b/Cargo.lock index a56f064b..d805adb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -156,6 +156,7 @@ dependencies = [ name = "bp384" version = "0.14.0-rc.3" dependencies = [ + "criterion", "ecdsa", "elliptic-curve", "primefield", diff --git a/bp256/benches/point.rs b/bp256/benches/point.r...
6
86
7
76685c9c8b79af1e58b1310aa76d24f5df081151
Tony Arcieri
2026-01-06T23:07:51
primefield: add `bench_field!` macro; use in `bp256` (#1587) This adds a macro to the `primefield::dev` macro for writing field benchmarks, and uses them to write a basic set of benchmarks for the `FieldElement` and `Scalar` types in `bp256`. We should roll these out to the other crates that currently lack benchmarks...
diff --git a/Cargo.lock b/Cargo.lock index 31be2196..2de14038 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,6 +144,7 @@ dependencies = [ name = "bp256" version = "0.14.0-rc.3" dependencies = [ + "criterion", "ecdsa", "elliptic-curve", "primefield", diff --git a/bp256/Cargo.toml b/bp256/Cargo.toml index 92c9...
5
116
0
1056cb2af2a6ec1919e306732e45d11dfce5c896
Tony Arcieri
2026-01-06T15:45:31
primefield: add `monty_field_reduce!` (#1585) Adds a macro for writing `Reduce` impls for `Curve::Uint` and for the associated `Array<u8, _>` for serialized field elements. For some reason this macro doesn't work in cases where there are also `Reduce<Array<u8, _>>` impls defined for e.g. `hash2curve` and its says the...
diff --git a/bignp256/src/arithmetic/scalar.rs b/bignp256/src/arithmetic/scalar.rs index 1b333d83..280d4867 100644 --- a/bignp256/src/arithmetic/scalar.rs +++ b/bignp256/src/arithmetic/scalar.rs @@ -17,14 +17,12 @@ mod scalar_impl; use self::scalar_impl::*; -use crate::{BignP256, FieldBytes, ORDER_HEX, U256}; +use ...
6
68
114
b8a8222469e853632a3c7db3175203083d521b27
Tony Arcieri
2026-01-05T17:43:28
primefield: remove precomputed `ROOT_OF_UNITY` support (#1582) We're now able to compute `ROOT_OF_UNITY` at compile time for all fields and don't actually use this anymore, so it can be removed
diff --git a/primefield/src/macros.rs b/primefield/src/macros.rs index 21ad4f2c..224f777c 100644 --- a/primefield/src/macros.rs +++ b/primefield/src/macros.rs @@ -34,30 +34,6 @@ macro_rules! monty_field_params { byte_order: $byte_order:expr, multiplicative_generator: $multiplicative_generator:expr, ...
2
1
32
14aa045c6e7c58854ad39f8de26008616dba68a4
Tony Arcieri
2026-01-05T17:13:13
primefield: name args for `fiat_bernstein_yang_invert!` (#1581) Follows the pattern used by the other fiat-crypto macros in `primefield` where each argument is named because there are so many arguments. This makes it easier to see what arguments need to be updated if they ever change.
diff --git a/primefield/src/macros/fiat.rs b/primefield/src/macros/fiat.rs index 99bc6561..d5a5df87 100644 --- a/primefield/src/macros/fiat.rs +++ b/primefield/src/macros/fiat.rs @@ -163,20 +163,20 @@ macro_rules! fiat_monty_field_arithmetic { /// Does not check that self is non-zero. const fn...
1
32
32
e6b0805e5141ea6776eeb0a448bc32d8138536fc
Tony Arcieri
2026-01-05T16:53:00
primefield: add `invert_vartime` impls (#1580) Adds `MontyFieldElement::invert_vartime` which delegates to the ultimately variable-time implementation of safegcd-bounds, and has the macros write a wrapper for it and impl the `Invert::invert_vartime` method as well.
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index 7729eb16..07506345 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -106,6 +106,11 @@ impl FieldElement { self.0.invert().map(Self) } + /// Returns the multiplicative inverse of self, if self...
3
28
1
8fa97dc79a7d67181cda5adeccff08e2a43c75f4
Tony Arcieri
2026-01-05T16:34:27
p256: use `crypto-bigint` to implement scalar inversions (#1578) Like #1549 did for base field inversions, this uses `crypto-bigint` to implement scalar inversions, with massive performance gains: scalar operations/invert time: [2.4918 µs 2.4950 µs 2.4982 µs] chan...
diff --git a/p256/src/arithmetic/scalar.rs b/p256/src/arithmetic/scalar.rs index f11fa64f..14a41564 100644 --- a/p256/src/arithmetic/scalar.rs +++ b/p256/src/arithmetic/scalar.rs @@ -92,28 +92,32 @@ impl Scalar { Self(self.0.wrapping_shr_vartime(shift)) } - /// Returns the multiplicative inverse of s...
2
25
75
d312553529a7fae7c79957e04473b43154b6b01b
Galoretka
2026-01-05T15:29:16
p256: fix Barrett reduction docs in scalar32 and scalar64 (#1481)
diff --git a/p256/src/arithmetic/scalar/scalar32.rs b/p256/src/arithmetic/scalar/scalar32.rs index d72367df..ebc5e874 100644 --- a/p256/src/arithmetic/scalar/scalar32.rs +++ b/p256/src/arithmetic/scalar/scalar32.rs @@ -25,13 +25,13 @@ const MU: [Limb; 9] = [ /// The general algorithm is: /// ```text /// p = n = orde...
2
4
4
27d7627a0eaf14ee70a501737407c56c3ed29338
Tony Arcieri
2026-01-05T06:02:23
p521: use `crypto-bigint` to impl field inversions (#1574) Uses the optimized safegcd-bounds algorithm in `crypto-bigint`. Like other similar conversions, it's massively faster: field element operations/invert time: [7.3158 µs 7.3394 µs 7.3624 µs] change: [−57.69...
diff --git a/p521/src/arithmetic/field.rs b/p521/src/arithmetic/field.rs index cfb6111b..56925126 100644 --- a/p521/src/arithmetic/field.rs +++ b/p521/src/arithmetic/field.rs @@ -30,6 +30,7 @@ use core::{ }; use elliptic_curve::{ Error, FieldBytesEncoding, + array::Array, bigint::{Word, modular::Retrieve...
1
62
39
c971eaa95a1664a298add84c581de00b92ddc92b
Tony Arcieri
2026-01-05T05:23:21
k256: use `crypto-bigint` to impl scalar inversions (#1573) Uses the optimized safegcd-bounds algorithm in `crypto-bigint`. Like other similar conversions, it's massively faster: scalar operations/invert time: [2.6595 µs 2.7676 µs 2.9068 µs] change: [−80.024% −79...
diff --git a/k256/src/arithmetic/field.rs b/k256/src/arithmetic/field.rs index 9a2ec2e9..83835dad 100644 --- a/k256/src/arithmetic/field.rs +++ b/k256/src/arithmetic/field.rs @@ -173,27 +173,25 @@ impl FieldElement { } /// Returns the multiplicative inverse of self, if self is non-zero. + /// /// Th...
2
31
129
abaa6f0280957b3611d811c75ec4d790179e16db
Tony Arcieri
2026-01-05T05:11:03
primeorder: add `Retrieve` bound to `FieldElement` (#1572)
diff --git a/k256/src/arithmetic/field.rs b/k256/src/arithmetic/field.rs index cad03c1a..9a2ec2e9 100644 --- a/k256/src/arithmetic/field.rs +++ b/k256/src/arithmetic/field.rs @@ -37,7 +37,7 @@ use core::{ ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}, }; use elliptic_curve::{ - bigint::Odd, + ...
2
15
3
b5da6c989dbcf175b86dc77ce0e6adaf0c69eb13
Tony Arcieri
2026-01-05T04:53:36
Bump `elliptic-curve` to v0.14.0-rc.20 (#1571) Adds `Retrieve` bounds to `Scalar` types
diff --git a/Cargo.lock b/Cargo.lock index 34a7bf66..8c60a579 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -363,9 +363,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.13" +version = "0.7.0-rc.14" source = "registry+https://gi...
16
35
19
ba4624ee7d9c7f5641e24a1fff126ebecafafcbe
Tony Arcieri
2026-01-05T03:58:22
primefield: add basic test for `MULTIPLICATIVE_GENERATOR` (#1570) Uses `JacobiSymbol` to test that the specified `MULTIPLICATIVE_GENERATOR` constant is a quadratic non-residue of the `MODULUS`. This isn't a fully comprehensive test but would've caught #1569.
diff --git a/p256/src/arithmetic/scalar.rs b/p256/src/arithmetic/scalar.rs index f3edea82..f11fa64f 100644 --- a/p256/src/arithmetic/scalar.rs +++ b/p256/src/arithmetic/scalar.rs @@ -13,7 +13,7 @@ use core::{ }; use elliptic_curve::{ Curve, - bigint::{ArrayEncoding, Integer, Limb, Odd, U256, Uint}, + bigin...
5
59
10
80997bbb585f740f74c7dddef58152abb4659692
Tony Arcieri
2026-01-04T17:34:26
p521: fix `multiplicative_generator` for `Scalar` (#1569) This was originally correctly computed as `3` in #760. Somewhere along the way it got changed to `2`. This is why the `sqrt` impl wasn't working: it was correctly selecting Tonelli-Shanks, but if multiplicative generator is incorrect it will miscompute `ROOT_O...
diff --git a/p521/src/arithmetic/scalar.rs b/p521/src/arithmetic/scalar.rs index d18f1256..742abbc1 100644 --- a/p521/src/arithmetic/scalar.rs +++ b/p521/src/arithmetic/scalar.rs @@ -26,7 +26,7 @@ primefield::monty_field_params! { modulus: ORDER_HEX, uint: Uint, byte_order: primefield::ByteOrder::BigEndi...
1
2
5
d61e1bf590e4e52059a10a9400e97bb2e5c64340
Tony Arcieri
2026-01-04T17:04:27
Impl `primefield::test_fiat_monty_field_arithmetic!` (#1568) For all crates that use `word-by-word-montgomery` field implementations synthesized by `fiat-crypto`, adds this test macro (from #1567) to ensure that the field representations used by `crypto_bigint::modular` and `fiat-crypto` match up in all cases, as we u...
diff --git a/bignp256/src/arithmetic/field.rs b/bignp256/src/arithmetic/field.rs index 0745b92a..6ab43bf3 100644 --- a/bignp256/src/arithmetic/field.rs +++ b/bignp256/src/arithmetic/field.rs @@ -75,5 +75,19 @@ primefield::fiat_monty_field_arithmetic! { #[cfg(test)] mod tests { use super::{FieldElement, U256}; + ...
13
170
1
c25a48d23276ea734cc9077b518d574a764ccb95
Snezhkko
2026-01-04T16:55:09
hash2curve: remove unnecessary `Default` bound on `T` in `hash_to_field` (#1528)
diff --git a/hash2curve/src/hash2field.rs b/hash2curve/src/hash2field.rs index 304b93f7..37cdc97f 100644 --- a/hash2curve/src/hash2field.rs +++ b/hash2curve/src/hash2field.rs @@ -29,7 +29,7 @@ pub fn hash_to_field<const N: usize, E, K, T, L>( ) -> Result<[T; N], E::Error> where E: ExpandMsg<K>, - T: Reduce<Ar...
1
1
1
2ee79cab879dcc051fb46fe41bace8b3ec87ccad
radik878
2026-01-04T16:54:04
chore(k256): replace single-iteration loop with direct assignment in isogeny (#1541)
diff --git a/k256/src/arithmetic/hash2curve.rs b/k256/src/arithmetic/hash2curve.rs index 5e6da3aa..0ef28ebb 100644 --- a/k256/src/arithmetic/hash2curve.rs +++ b/k256/src/arithmetic/hash2curve.rs @@ -257,9 +257,7 @@ fn isogeny(x: FieldElement, y: FieldElement) -> (FieldElement, FieldElement) { xs[0] = FieldElement:...
1
1
3
0977aba7c2f8bf5805d2e0327974b3e8367d19dd
Tony Arcieri
2026-01-04T15:41:41
primefield: add `test_fiat_monty_field_arithmetic!` macro (#1567) Adds a macro which tests that `crypto-bigint` and `fiat-crypto` use equivalent Montgomery form representations. There seem to be some odd edge cases, particularly curves where the number of 32-bit limbs * 2 != the number of 64-bit limbs (e.g. P-224, P-...
diff --git a/p384/src/arithmetic/field.rs b/p384/src/arithmetic/field.rs index 761af7d9..c47bf4f9 100644 --- a/p384/src/arithmetic/field.rs +++ b/p384/src/arithmetic/field.rs @@ -72,5 +72,22 @@ primefield::fiat_monty_field_arithmetic! { #[cfg(test)] mod tests { use super::{FieldElement, U384}; + #[cfg(not(p38...
3
86
0
34ad3646e600c32afcb5cbb19c1cb0add290b27b
Tony Arcieri
2026-01-04T14:52:57
primefield: rename `fiat_monty_field_arithmetic!` (#1566) Renames from `monty_field_fiat_arithmetic!`. Places the `fiat_` part first for emphasis so it's grouped with other `fiat_*!` macros in rustdoc.
diff --git a/bignp256/src/arithmetic/field.rs b/bignp256/src/arithmetic/field.rs index a3f3014d..0745b92a 100644 --- a/bignp256/src/arithmetic/field.rs +++ b/bignp256/src/arithmetic/field.rs @@ -53,7 +53,7 @@ primefield::monty_field_element! { doc: "Element in the bign-curve256v1 finite field modulo p = 2^{256} − ...
16
18
17
c77dc8e01b80995a9a035d7344aaba1c0a2499dc
Tony Arcieri
2026-01-04T06:32:53
Cut new prereleases (#1564) Releases the following which include an `elliptic-curve` 0.14.0-rc.19 upgrade with new `ctutils` bounds on point and scalar types, as well as an upgraded `ctutils`-based `sec1` crate: - `bignp256` v0.14.0-rc.3 - `bp256` v0.14.0-rc.3 - `bp384` v0.14.0-rc.3 - `ed448-goldilocks` v0.14.0-pre.6...
diff --git a/Cargo.lock b/Cargo.lock index 657dd52e..34a7bf66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,7 +76,7 @@ dependencies = [ [[package]] name = "bignp256" -version = "0.14.0-rc.2" +version = "0.14.0-rc.3" dependencies = [ "belt-hash", "criterion", @@ -148,7 +148,7 @@ dependencies = [ [[package]...
16
62
62
fa7db80d7dfc88b01c6958a66d25d84ab46d03ab
Tony Arcieri
2026-01-04T06:08:20
Bump `elliptic-curve` to v0.14.0-rc.19 (#1563) Notably this adds `ctutils::{CtEq, CtSelect}` requirements to affine points, projective points, and scalar types, in addition to the existing `subtle` requirements. This shouldn't affect existing `subtle` users but gives people the option to directly use `ctutils` traits...
diff --git a/Cargo.lock b/Cargo.lock index 01337ee6..657dd52e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -421,9 +421,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0-rc.10" +version = "0.17.0-rc.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6378f4db5c3e64d1c0...
29
283
47
10c338b78a2b9e2f14708ae0b943944f4efe26c5
Tony Arcieri
2026-01-04T01:14:38
Bump `sec1` to v0.8.0-rc.11 (#1562) Begins migrating from `subtle` to `ctutils`
diff --git a/Cargo.lock b/Cargo.lock index 53ce6557..01337ee6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -46,6 +46,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b59d472eab27ade8d770dcb11da7201c11234bef9f82ce7aa517be028d462b" +[[package]] +name = "base16ct" +...
7
55
43
e56e6abf8f6932a3a7e35f4845acad2db8e7762f
Tony Arcieri
2025-12-30T05:13:05
Cut new prereleases (#1561) Releases the following which include an upgrade to `crypto-bigint` v0.7.0-rc.13 and the `ctutils` crate: - `bignp256` v0.14.0-rc.2 - `bp256` v0.14.0-rc.2 - `bp384` v0.14.0-rc.2 - `ed448-goldilocks` v0.14.0-pre.5 - `hash2curve` v0.14.0-rc.5 - `k256` v0.14.0-rc.2 - `p192` v0.14.0-rc.2 - `p22...
diff --git a/Cargo.lock b/Cargo.lock index 576851e2..53ce6557 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,7 +70,7 @@ dependencies = [ [[package]] name = "bignp256" -version = "0.14.0-rc.1" +version = "0.14.0-rc.2" dependencies = [ "belt-hash", "criterion", @@ -142,7 +142,7 @@ dependencies = [ [[package]...
16
58
58
8d5781792dc13552ed3c847b8b43d9cf49cf1fb8
Bashmunta
2025-12-29T14:31:48
p521: fix sqn(0) off-by-one (#1538)
diff --git a/p521/src/arithmetic/field.rs b/p521/src/arithmetic/field.rs index 91db425f..8042061b 100644 --- a/p521/src/arithmetic/field.rs +++ b/p521/src/arithmetic/field.rs @@ -256,13 +256,7 @@ impl FieldElement { /// Returns self^(2^n) mod p const fn sqn(&self, n: usize) -> Self { - let mut x = se...
1
9
7
369e0e702fdf2989314dda0204025f92ec812d38
Tony Arcieri
2025-12-24T22:25:36
k256: use `crypto-bigint` to implement field inversions (#1554) Leverages the safegcd-bounds implementation from `crypto-bigint`, using the `U256` conversions introduced in #1552, and then invoking `invert_odd_mod` on the resulting value. Also adds `FieldElement::invert_vartime` which can leverage the variable-time i...
diff --git a/k256/src/arithmetic/field.rs b/k256/src/arithmetic/field.rs index 4ef2384d..fd1d051b 100644 --- a/k256/src/arithmetic/field.rs +++ b/k256/src/arithmetic/field.rs @@ -37,6 +37,7 @@ use core::{ ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}, }; use elliptic_curve::{ + bigint::Odd, ...
2
63
35
8472af613fa515fb4c72bd2fca0144b345bd6097
Andrew Whitehead
2025-12-22T22:01:01
k256: conversions to/from U256 for field elements (#1552) This slightly improves the speed of conversion between native and byte representations and helps bridge to `crypto-bigint`. Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
diff --git a/k256/benches/field.rs b/k256/benches/field.rs index c941bf86..39f30d0c 100644 --- a/k256/benches/field.rs +++ b/k256/benches/field.rs @@ -63,6 +63,19 @@ fn bench_field_element_invert<'a, M: Measurement>(group: &mut BenchmarkGroup<'a, group.bench_function("invert", |b| b.iter(|| black_box(x).invert()))...
3
126
156
968cca71cad04e663688793576ceaa0aeb6a1f7a
Tony Arcieri
2025-12-17T14:04:03
p256: use `crypto-bigint` to implement inversions (#1549) Leverages the safegcd-bounds implementation in that library. The benchmarks show quite an improvement: field element operations/invert time: [2.5440 µs 2.6270 µs 2.7282 µs] change: [−68.332% −67.644% −66.84...
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index e21438a2..7729eb16 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -103,30 +103,7 @@ impl FieldElement { /// Returns the multiplicative inverse of self, if self is non-zero. pub fn invert(&self) ->...
1
1
24
e3985360d2c8cc5aa243697c62539a636e022fc4
Tony Arcieri
2025-12-16T18:21:14
primefield: add `monty_field_arithmetic!` macro (#1547) Previously the only option for adding a field arithmetic backend was the `monty_field_fiat_arithmetic!` macro, which is designed to plug into `fiat-crypto` synthesized code. In the past we have only used fiat-crypto for our field element implementations (aside fr...
diff --git a/primefield/src/macros.rs b/primefield/src/macros.rs index 082a2090..f8244f70 100644 --- a/primefield/src/macros.rs +++ b/primefield/src/macros.rs @@ -95,13 +95,6 @@ macro_rules! monty_field_params_with_root_of_unity { /// - `pub fn is_zero` /// - `pub fn double` /// -/// NOTE: field implementations must...
2
95
10
16ab98fc5ac670e6a7b4e24f099995f48553bfee
Tony Arcieri
2025-11-25T03:39:28
Cargo.lock: bump dependencies (#1536)
diff --git a/Cargo.lock b/Cargo.lock index a08251f8..b36b227e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,9 +15,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f192...
1
107
135
f5f0b88d12775a5420b72923f84c7362c5344360
Tony Arcieri
2025-11-25T03:16:28
Cut v0.14.0-rc.1 releases (#1535) Cuts releases of the following with an rc.1 version number: - `bignp256` - `bp256` - `bp384` - `k256` - `p192` - `p224` - `p256` - `p384` - `p521` - `primefield` - `primeorder` - `sm2`
diff --git a/bignp256/Cargo.toml b/bignp256/Cargo.toml index c76a3e07..112737aa 100644 --- a/bignp256/Cargo.toml +++ b/bignp256/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bignp256" -version = "0.14.0-rc.0" +version = "0.14.0-rc.1" description = """ Pure Rust implementation of the Bign P-256 (a.k.a. bign-curve256v...
12
38
38
c1c29e9f04251bf96609bf86a299e367f092a928
Galoretka
2025-11-24T21:29:47
x448: clamp `StaticSecret` on `serde` deserialization (#1534)
diff --git a/x448/src/lib.rs b/x448/src/lib.rs index 167dacd1..e74d7ca9 100644 --- a/x448/src/lib.rs +++ b/x448/src/lib.rs @@ -260,7 +260,7 @@ impl<'de> serdect::serde::Deserialize<'de> for StaticSecret { { let mut bytes = Array::default(); serdect::array::deserialize_hex_or_bin(&mut bytes, d)?; ...
1
1
1
0ddb2182fac7fa08b40bec251a835e01f445b14b
Tony Arcieri
2025-11-22T23:10:25
hash2curve v0.14.0-rc.4 (#1531)
diff --git a/Cargo.lock b/Cargo.lock index 92c9ff60..a08251f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -534,7 +534,7 @@ dependencies = [ [[package]] name = "hash2curve" -version = "0.14.0-rc.3" +version = "0.14.0-rc.4" dependencies = [ "digest", "elliptic-curve", diff --git a/ed448-goldilocks/Cargo.toml b/e...
7
7
7
073e856f40d37cb225f2a8087be1ba3ff37170a0
Tony Arcieri
2025-11-22T21:29:49
hash2curve: remove unused dependencies (#1530)
diff --git a/Cargo.lock b/Cargo.lock index ea548a38..92c9ff60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -492,16 +492,6 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" -[[package]] -name = "ff" -vers...
2
0
14
3f5416f5396ecc7a6f59127120652650c19bb550
Tony Arcieri
2025-11-22T02:35:59
Bump `elliptic-curve` dependency to v0.14.0-rc.17 (#1529) This uses the `rustcrypto-ff` and `rustcrypto-group` crate releases Also bumps `ecdsa` to v0.17.0-rc.9
diff --git a/Cargo.lock b/Cargo.lock index 69afc207..ea548a38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -397,8 +397,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0-rc.8" -source = "git+https://github.com/RustCrypto/signatures#9fe087a8e90156e08cc8a1b68872f123fb2ee189" +version = "0.17.0-rc.9" +...
16
78
68
f0cf38f3ea832a4548a717a73e108d8bcbb8c65f
sashass1315
2025-11-21T23:29:38
sm2: avoid `Vec` reallocations in `decrypt` and `decrypt_der_digest` (#1527)
diff --git a/sm2/src/pke/decrypting.rs b/sm2/src/pke/decrypting.rs index f46cf52c..c906fab6 100644 --- a/sm2/src/pke/decrypting.rs +++ b/sm2/src/pke/decrypting.rs @@ -116,7 +116,7 @@ impl DecryptingKey { Mode::C1C3C2 => [prefix, &x, &y, cipher.digest, cipher.cipher].concat(), }; - Ok(self...
1
2
2
90888b6c5fed0796e261cc171f496da7effc8e1e
phrwlk
2025-11-12T19:58:31
p521: remove `allow(dead_code)` from `Scalar::from_hex_unchecked` (#1526) The function is referenced by `PrimeField::ROOT_OF_UNITY`
diff --git a/p521/src/arithmetic/scalar.rs b/p521/src/arithmetic/scalar.rs index 3b2b719f..fcb0e992 100644 --- a/p521/src/arithmetic/scalar.rs +++ b/p521/src/arithmetic/scalar.rs @@ -122,7 +122,6 @@ impl Scalar { /// Does *not* perform a check that the field element does not overflow the order. /// /// T...
1
0
1
2afc0254f24a60253eda533852c8f4291731c05a
Tony Arcieri
2025-11-06T15:45:21
Bump `crypto-bigint` to v0.7.0-rc.10 (#1517) This includes the `rand_core` v0.10-rc* upgrade
diff --git a/Cargo.lock b/Cargo.lock index 8e3e36a1..30c8a731 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -351,8 +351,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.9" -source = "git+https://github.com/RustCrypto/crypto-bigi...
3
5
5
429b13ca5b3d5e8c8106494eba4b0b49c06c25c3
Tony Arcieri
2025-11-05T17:15:33
primeorder: fix typo
diff --git a/primeorder/src/osswu.rs b/primeorder/src/osswu.rs index 3c7bd4bc..16352a8d 100644 --- a/primeorder/src/osswu.rs +++ b/primeorder/src/osswu.rs @@ -1,6 +1,6 @@ //! Optimized simplified Shallue-van de Woestijne-Ulas methods. //! -//! <hhttps://www.rfc-editor.org/rfc/rfc9380.html#name-simplified-swu-method> ...
1
1
2
c6d3980348570036c2861cd652aeb2a19321bbf0
GarmashAlex
2025-11-04T16:48:50
ix(ed448): set Scalar PrimeField::NUM_BITS to 446 (#1512)
diff --git a/ed448-goldilocks/src/field/scalar.rs b/ed448-goldilocks/src/field/scalar.rs index 607c0cb6..71f4b819 100644 --- a/ed448-goldilocks/src/field/scalar.rs +++ b/ed448-goldilocks/src/field/scalar.rs @@ -339,7 +339,7 @@ impl<C: CurveWithScalar> PrimeField for Scalar<C> { Choice::from((self.scalar.to_wor...
1
1
1
2b045069846bb58d5e46f4bb86827db1daccf8da
Alexandr Kitaev
2025-11-02T16:43:55
`bignp256`: fixes (#1503) - extract in ecdh is now generic for usage with `bash-hash` - constant-time compare, fix deprecated
diff --git a/Cargo.lock b/Cargo.lock index d82b786f..870468f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,6 +89,7 @@ dependencies = [ "rfc6979", "sec1", "signature", + "subtle", ] [[package]] diff --git a/bignp256/Cargo.toml b/bignp256/Cargo.toml index 644ee7ba..7993c49f 100644 --- a/bignp256/Cargo.toml +...
6
17
22
c2c5e92c78c95aef154402e8bd0dcd695ad5911e
daxpedda
2025-11-02T16:42:06
ed448-goldilocks: rename `FieldElement::sqrt()` to `unchecked_sqrt()` (#1510)
diff --git a/ed448-goldilocks/src/edwards/extended.rs b/ed448-goldilocks/src/edwards/extended.rs index c376cbe4..7ada340e 100644 --- a/ed448-goldilocks/src/edwards/extended.rs +++ b/ed448-goldilocks/src/edwards/extended.rs @@ -460,7 +460,7 @@ impl EdwardsPoint { let u2 = u.double().double(); let w2 = ...
2
6
6
8431af89ba00337a47a0b9eb2c4172fc17703650
Tony Arcieri
2025-10-25T22:46:23
primefield: fix warning comments (#1506)
diff --git a/primefield/src/monty.rs b/primefield/src/monty.rs index fba756a5..b2bb0c31 100644 --- a/primefield/src/monty.rs +++ b/primefield/src/monty.rs @@ -181,7 +181,7 @@ where /// Create [`MontyFieldElement`] from a [`Uint`] which is already in Montgomery form. /// - /// #⚠️Warning + /// # ⚠️ War...
1
2
2
d6322a8a2a580f017fe119112ee49e5159a8a0a9
Tony Arcieri
2025-10-23T22:07:51
bignp256+sm2 v0.14.0-rc.0 (#1502)
diff --git a/Cargo.lock b/Cargo.lock index 216add01..d82b786f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,7 +70,7 @@ dependencies = [ [[package]] name = "bignp256" -version = "0.14.0-pre.0" +version = "0.14.0-rc.0" dependencies = [ "belt-hash", "criterion", @@ -1230,7 +1230,7 @@ dependencies = [ [[packa...
3
4
4
ff8941caea68b1a93819fd408c79e85e9d1b1f97
Tony Arcieri
2025-10-23T21:08:20
p192+p224+p256+p384+p521 v0.14.0-rc.0 (#1501)
diff --git a/Cargo.lock b/Cargo.lock index b052659e..216add01 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -741,7 +741,7 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "p192" -version = "0.14.0-pre" +version = "0.14.0-rc.0" dependencies = [ "ecdsa", "elliptic...
6
10
10
81496b8237fd96e3fedf39f36b145be723d7cf55
Tony Arcieri
2025-10-23T20:48:03
k256 v0.14.0-rc.0 (#1500)
diff --git a/Cargo.lock b/Cargo.lock index 1ffa235f..b052659e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -625,7 +625,7 @@ dependencies = [ [[package]] name = "k256" -version = "0.14.0-pre.11" +version = "0.14.0-rc.0" dependencies = [ "cfg-if", "criterion", diff --git a/k256/Cargo.toml b/k256/Cargo.toml index ...
3
2
3
f5e0aba9bb29cadc8a44b0a1afc3e33f9ebcb8b0
Tony Arcieri
2025-10-23T20:26:27
bp256+bp384 v0.14.0-rc.0 (#1499)
diff --git a/Cargo.lock b/Cargo.lock index f71f06c4..1ffa235f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -141,7 +141,7 @@ dependencies = [ [[package]] name = "bp256" -version = "0.14.0-pre.0" +version = "0.14.0-rc.0" dependencies = [ "ecdsa", "elliptic-curve", @@ -152,7 +152,7 @@ dependencies = [ [[package...
3
4
4
c424f830b594b34d9d0ecbbf05ee17aa8871af71
Tony Arcieri
2025-10-23T20:04:21
Cargo.toml(s): remove `rustdoc-args` (#1498) For docs.rs: the `docsrs` cfg is now set implicitly
diff --git a/bignp256/Cargo.toml b/bignp256/Cargo.toml index 24f5f6d7..576d72d2 100644 --- a/bignp256/Cargo.toml +++ b/bignp256/Cargo.toml @@ -64,3 +64,6 @@ harness = false [[bench]] name = "scalar" harness = false + +[package.metadata.docs.rs] +all-features = true diff --git a/bp256/Cargo.toml b/bp256/Cargo.toml in...
13
10
11
1c2253cd048a95b25172e67433471364962634a6
Tony Arcieri
2025-10-23T19:27:12
primeorder v0.14.0-rc.0 (#1497)
diff --git a/Cargo.lock b/Cargo.lock index f9990402..f71f06c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -546,7 +546,7 @@ dependencies = [ [[package]] name = "hash2curve" -version = "0.14.0-rc.2" +version = "0.14.0-rc.3" dependencies = [ "digest", "elliptic-curve", @@ -893,7 +893,7 @@ dependencies = [ [[pa...
13
34
34
b1f57f0e4e4d34b6b67d3e63d9d5b4b61a137d50
Tony Arcieri
2025-10-23T19:03:26
hash2curve v0.14.0-rc.3 (#1496)
diff --git a/hash2curve/Cargo.toml b/hash2curve/Cargo.toml index de3fc910..52f63724 100644 --- a/hash2curve/Cargo.toml +++ b/hash2curve/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hash2curve" -version = "0.14.0-rc.2" +version = "0.14.0-rc.3" description = "hash2curve algorithm implementation" authors = ["RustCrypt...
1
1
1
25c412f013a4e8d9b6eb182e5d2d12fb5e193b6a
Tony Arcieri
2025-10-23T18:22:53
primefield v0.14.0-rc.0 (#1495)
diff --git a/Cargo.lock b/Cargo.lock index 95bf03fe..f9990402 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -882,7 +882,7 @@ dependencies = [ [[package]] name = "primefield" -version = "0.14.0-pre.6" +version = "0.14.0-rc.0" dependencies = [ "crypto-bigint", "ff", diff --git a/bignp256/Cargo.toml b/bignp256/Carg...
11
12
12
0401fcefc616d38cf330c7bf53eccc6ee05baccb
Tony Arcieri
2025-10-23T16:55:19
Bump `ecdsa` to v0.17.0-rc.8 (#1493)
diff --git a/Cargo.lock b/Cargo.lock index 3f357422..95bf03fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -373,8 +373,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0-rc.7" -source = "git+https://github.com/RustCrypto/signatures.git#305bad5a0067712634089e2aa948aaf1f75bd023" +version = "0.17.0-rc....
10
20
21
a88c84b92b9c30f895e50660fd54bc4dca3a2cb2
Tony Arcieri
2025-10-22T16:23:06
Bump `elliptic-curve` to v0.14.0-rc.16 (#1490)
diff --git a/Cargo.lock b/Cargo.lock index e442aab7..92eac8e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,9 +327,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.8" +version = "0.7.0-rc.9" source = "registry+https://gith...
15
20
20
6150d43cd7e258b300c07777debdd3eee97522a1
Tony Arcieri
2025-10-13T19:19:38
sm2: fix typos (#1486)
diff --git a/sm2/src/pke/decrypting.rs b/sm2/src/pke/decrypting.rs index 3955fb17..f46cf52c 100644 --- a/sm2/src/pke/decrypting.rs +++ b/sm2/src/pke/decrypting.rs @@ -23,7 +23,7 @@ use super::{Cipher, Mode, encrypting::EncryptingKey, kdf, vec}; #[derive(Clone)] pub struct DecryptingKey { secret_scalar: NonZeroSc...
1
4
4
73e250d8b63a01e0052c876aed7e05584a3ee1c9
Tony Arcieri
2025-09-29T20:57:02
Switch from `doc_auto_cfg` to `doc_cfg` (#1479) The former was removed from nightly. See RustCrypto/traits#2028
diff --git a/bignp256/src/lib.rs b/bignp256/src/lib.rs index 40fc051d..d51f8c7e 100644 --- a/bignp256/src/lib.rs +++ b/bignp256/src/lib.rs @@ -1,5 +1,5 @@ #![no_std] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![cfg_attr(docsrs, feature(doc_cfg))] #![doc = include_str!("../README.md")] #![doc( html_logo_url ...
14
14
14
58eac1ab3a42c92774acc15980f806744e5e687f
Tony Arcieri
2025-09-29T19:49:53
k256: extract lookup tables into `elliptic-curve` (#1476) Companion PR to RustCrypto/traits#2023, which extracts the lookup table code originally from `k256` but modifies it to be generic over curve point types and thus generally reusable. This commit changes `k256` to use the generic implementation, which should oth...
diff --git a/Cargo.lock b/Cargo.lock index f1845771..e442aab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -636,7 +636,6 @@ dependencies = [ "hex-literal", "num-bigint 0.4.6", "num-traits", - "once_cell", "primeorder", "proptest", "rand_core", diff --git a/k256/Cargo.toml b/k256/Cargo.toml index a01bb2a6..90...
3
13
82
f87b5163cad0a153ed1f4391a9463ff31cb659ab
Tony Arcieri
2025-09-29T19:22:18
Bump `elliptic-curve` dependency to v0.14.0-rc.15 (#1477)
diff --git a/Cargo.lock b/Cargo.lock index ebf0537f..f1845771 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,9 +327,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.6" +version = "0.7.0-rc.8" source = "registry+https://gith...
15
24
22
85fb0d10da37387c62ef9f960563ad8a623a5f38
Arthur Gautier
2025-09-27T15:19:03
x448: Add `StaticSecret` in a feature-flag (#1454) Some implementations (like rpgp) will serialize a secret and can use static secret similar to what we can find in x25519. This is a fixup on RustCrypto/elliptic-curves#1378 which removed that support
diff --git a/Cargo.lock b/Cargo.lock index 8d83675a..ebf0537f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1501,6 +1501,7 @@ dependencies = [ "ed448-goldilocks", "rand", "rand_core", + "serdect", "zeroize", ] diff --git a/x448/Cargo.toml b/x448/Cargo.toml index 56ebf45d..217bf406 100644 --- a/x448/Cargo.toml...
3
118
0
ab9a3d12212eca7be44dfde0de39f91b4498029a
Tony Arcieri
2025-09-27T03:35:19
primefield: better field element hex parsing (#1473) Ensures hex strings are always sized appropriately to the modulus, which also ensures the size is consistent on 32-bit and 64-bit targets. Notably this impacts P-224 where there was previously some special casing on `target_pointer_width`.
diff --git a/p224/src/arithmetic.rs b/p224/src/arithmetic.rs index 077f855f..ddf2f61c 100644 --- a/p224/src/arithmetic.rs +++ b/p224/src/arithmetic.rs @@ -41,41 +41,17 @@ impl PrimeCurveParams for NistP224 { const EQUATION_A: FieldElement = FieldElement::from_u64(3).neg(); /// b = 0xb4050a85 0c04b3ab f54132...
2
29
27
7c6f89813b591cad00b7c8015fed95703e5d0d27
Tony Arcieri
2025-09-25T00:39:47
primefield: support precomputed `ROOT_OF_UNITY` constant (#1469) Being able to compute `ROOT_OF_UNITY` at compile time is super cool! The only problem is we're running `modpow` at compile time, and miri is slow. For large fields, it may be impractically slow. This makes it possible to define field parameters that inc...
diff --git a/primefield/src/macros.rs b/primefield/src/macros.rs index 747793f9..b65a3b67 100644 --- a/primefield/src/macros.rs +++ b/primefield/src/macros.rs @@ -34,6 +34,30 @@ macro_rules! monty_field_params { byte_order: $byte_order:expr, multiplicative_generator: $multiplicative_generator:expr, ...
2
33
2
662081cb6c15bfd4691938902028a9ce8822bbc2
Tony Arcieri
2025-09-24T21:34:47
subtle: enable `const-generics` feature (#1468) Our 1.85 MSRV bump amply supports it, and it's useful for downstream crates e.g. #1467
diff --git a/primefield/Cargo.toml b/primefield/Cargo.toml index 5d068e1b..ddf0a202 100644 --- a/primefield/Cargo.toml +++ b/primefield/Cargo.toml @@ -16,6 +16,6 @@ rust-version = "1.85" [dependencies] bigint = { package = "crypto-bigint", version = "0.7.0-rc.6", default-features = false, features = ["hybrid-array"] ...
1
1
1
5982403da6708bd3e9023c1aa5ba4a579daba31e
daxpedda
2025-09-24T18:11:33
ed448-goldilocks: use Jacobi Symbol for `FieldElement::is_square` (#1461)
diff --git a/ed448-goldilocks/src/edwards/extended.rs b/ed448-goldilocks/src/edwards/extended.rs index 20de36c3..c376cbe4 100644 --- a/ed448-goldilocks/src/edwards/extended.rs +++ b/ed448-goldilocks/src/edwards/extended.rs @@ -784,8 +784,7 @@ mod tests { use super::*; use elliptic_curve::Field; use hex_l...
2
28
18
0ef29cd70ac925e7f6c12a21025a4e9fd8b6080d
Tony Arcieri
2025-09-24T16:30:18
primefield: have `pow_vartime` skip "leading" zeros (#1466) Small optimization for the case the input has leading zeros
diff --git a/primefield/src/monty.rs b/primefield/src/monty.rs index e0e49a58..98d87a41 100644 --- a/primefield/src/monty.rs +++ b/primefield/src/monty.rs @@ -344,26 +344,36 @@ where /// /// **This operation is variable time with respect to the exponent `exp`.** /// - /// If the exponent is fixed, thi...
1
17
7
4868520482a18fdea5267bc83057a6ba2c8dae53
Tony Arcieri
2025-09-23T23:43:32
primefield: use named params for `monty_field_fiat_arithmetic!` (#1459) Follows the argument style from #1458, which is particularly helpful with the excessively large (16) parameters this macro takes. Using named parameters should make it much easier to figure out what needs to be changed if macro arguments are adde...
diff --git a/bignp256/src/arithmetic/field.rs b/bignp256/src/arithmetic/field.rs index b51adfca..a3f3014d 100644 --- a/bignp256/src/arithmetic/field.rs +++ b/bignp256/src/arithmetic/field.rs @@ -53,24 +53,24 @@ primefield::monty_field_element! { doc: "Element in the bign-curve256v1 finite field modulo p = 2^{256} ...
15
270
270
8a3e30109de001fc84699ea97cbaa07da3e35746
daxpedda
2025-09-23T21:35:07
ed448-goldilocks: fix `EdwardsScalar::from_canonical_bytes()` overflow (#1457)
diff --git a/Cargo.lock b/Cargo.lock index a0ba9af4..8d83675a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -237,6 +237,15 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dabb6555f92fb9ee4140454eb5dcd14c7960e1225c6d1a6cc361f032947713e" +[[package]] +name = "convert_...
4
47
17
5fbe8bf464e0def7fd02be1218f7f3f3ac0ed5d9
Tony Arcieri
2025-09-23T21:27:19
primefield: have `monty_field_element!` define field type (#1458) Previously the macro only wrote a series of `impl`s but didn't actually write the struct type. If nothing else, this is inconsistent with `monty_field_params!`. But also, changes to the definition of the struct lead to tedious field-by-field changes, w...
diff --git a/bignp256/src/arithmetic/field.rs b/bignp256/src/arithmetic/field.rs index 116a72b6..b51adfca 100644 --- a/bignp256/src/arithmetic/field.rs +++ b/bignp256/src/arithmetic/field.rs @@ -37,23 +37,21 @@ use elliptic_curve::{ /// Constant representing the modulus: p = 2^{256} − 189 const MODULUS_HEX: &str = "f...
23
196
342
ca2da44a92472995191fc982a6557068fe830eb5
Tony Arcieri
2025-09-18T22:19:12
Cargo.lock: bump dependencies (#1453) Updates the following dependencies: $ cargo update Updating crates.io index Locking 28 packages to latest compatible versions Updating belt-hash v0.2.0-rc.0 -> v0.2.0-rc.1 Updating errno v0.3.13 -> v0.3.14 Updating hybrid-array v0.4.0 -> v0.4.1 Updati...
diff --git a/Cargo.lock b/Cargo.lock index 44c06ec1..a0ba9af4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -60,9 +60,9 @@ checksum = "d9aa1eef3994e2ccd304a78fe3fea4a73e5792007f85f09b79bb82143ca5f82b" [[package]] name = "belt-hash" -version = "0.2.0-rc.0" +version = "0.2.0-rc.1" source = "registry+https://github.com...
1
74
117
a06b626cbd64def95a4f72dc39c5162a2f5a301d
Tony Arcieri
2025-09-18T21:35:29
Bump `der` to v0.8.0-rc.9 (#1452) Notably this needed some `OctetStringRef`-related changes to `sm2`
diff --git a/Cargo.lock b/Cargo.lock index ec6b1b62..44c06ec1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -340,9 +340,9 @@ dependencies = [ [[package]] name = "der" -version = "0.8.0-rc.8" +version = "0.8.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7050e8041c28720851f7db83...
2
8
8
ea3802ab6c42865fc35c2be1c6625c4c05bbe002
Tony Arcieri
2025-09-17T22:28:36
primefield: add a `sqrt::Algorithm` enum (#1449) Enumerates the available square root algorithms as `enum Algorithm`. Notably this makes it easy to test which algorithm is selected for a particular modulus.
diff --git a/primefield/src/monty/sqrt.rs b/primefield/src/monty/sqrt.rs index 77d398f6..5dafbcf7 100644 --- a/primefield/src/monty/sqrt.rs +++ b/primefield/src/monty/sqrt.rs @@ -1,11 +1,37 @@ //! Modular square root implementations, adapted from <https://eprint.iacr.org/2012/685.pdf>. -// TODO(tarcieri): Atkins' algo...
1
91
52
792c35e7f500942857ae3bc399ec703ca88b2431
Tony Arcieri
2025-09-17T20:30:15
primefield: add Atkins sqrt algorithm (#1448) Adds a generic implementation of Atkins algorithm for computing modular square root where q ≡ 5 (mod 8)
diff --git a/primefield/src/monty/sqrt.rs b/primefield/src/monty/sqrt.rs index 0478edc1..77d398f6 100644 --- a/primefield/src/monty/sqrt.rs +++ b/primefield/src/monty/sqrt.rs @@ -13,21 +13,23 @@ where MontyFieldBytes<MOD, LIMBS>: Copy, { /// Returns the square root of self mod p, or `None` if no square root ...
1
52
4
7d7af646990439c4424aef2c62bb5f8379395427
Tony Arcieri
2025-09-17T19:39:02
primefield: sqrt improvements (#1447) - Extracts `sqrt` implementations into their own module - Ensures all constants are computed using `const` - Extracts algorithms into their own function; test individually - Adds internal `mod_residue` for algorithm selection
diff --git a/primefield/src/monty.rs b/primefield/src/monty.rs index cc4745ac..09e6bfa0 100644 --- a/primefield/src/monty.rs +++ b/primefield/src/monty.rs @@ -1,6 +1,8 @@ //! Field elements which use an internal Montgomery form representation, implemented using //! `crypto-bigint`'s [`MontyForm`]. +mod sqrt; + use...
2
147
65
5d231296b4b493967bdedddfdc7b194b46a9d120
Tony Arcieri
2025-09-17T18:11:31
primefield: generic implementation of `sqrt` (#1446) Adapts the implementation of `sqrt` from the `ff_derive` crate: https://github.com/zkcrypto/ff/blob/f77b814/ff_derive/src/lib.rs#L509 ...which is in turn adapted from this paper: https://eprint.iacr.org/2012/685.pdf For the most part the sqrt impls replaced are ...
diff --git a/bignp256/src/arithmetic/field.rs b/bignp256/src/arithmetic/field.rs index 89e3ca7b..116a72b6 100644 --- a/bignp256/src/arithmetic/field.rs +++ b/bignp256/src/arithmetic/field.rs @@ -74,19 +74,6 @@ primefield::monty_field_fiat_arithmetic!( fiat_bignp256_selectznz ); -impl FieldElement { - /// Ret...
20
76
482
e08389e86e56a0237af12280c6c4c7efebdf24b7
Tony Arcieri
2025-09-17T15:16:38
primefield: make exponent of `pow_vartime` a `Uint` (#1444) Previously it was `&[u64]`, which dates back to the original code which was adapted from `ff_derive`. This changes the argument to be a `Uint` (which can be a different number of limbs from `Self`), and also changes `MontyFieldParams::T` to be a `Uint` as we...
diff --git a/bignp256/src/arithmetic/field.rs b/bignp256/src/arithmetic/field.rs index 091a9956..89e3ca7b 100644 --- a/bignp256/src/arithmetic/field.rs +++ b/bignp256/src/arithmetic/field.rs @@ -78,14 +78,11 @@ impl FieldElement { /// Returns the square root of self mod p, or `None` if no square root /// exis...
18
201
192
537df26377f4d7ce2392e138935d404128fa0b02
Tony Arcieri
2025-09-16T14:39:17
primefield: impl `ConstMontyParams` for field element types (#1440) - Adds an impl to `primefield::MontyFieldElement` - Also emits an impl from the `monty_field_element!` macro
diff --git a/p384/src/arithmetic/hash2curve.rs b/p384/src/arithmetic/hash2curve.rs index 89d975c3..5aa31607 100644 --- a/p384/src/arithmetic/hash2curve.rs +++ b/p384/src/arithmetic/hash2curve.rs @@ -97,7 +97,7 @@ mod tests { use elliptic_curve::{ Curve, array::Array, - bigint::{ArrayEncodi...
3
22
10
74b6c4774ce8beaaf9714bd10a8ec6613104e560
daxpedda
2025-09-16T14:01:03
ed448-goldilocks: replace `Digest + Update` with underlying traits (#1439)
diff --git a/ed448-goldilocks/src/sign/signing_key.rs b/ed448-goldilocks/src/sign/signing_key.rs index 007320f3..423e43fc 100644 --- a/ed448-goldilocks/src/sign/signing_key.rs +++ b/ed448-goldilocks/src/sign/signing_key.rs @@ -214,7 +214,7 @@ impl TryFrom<Box<[u8]>> for SigningKey { impl<D> signature::DigestSigner<D...
2
6
6
ad9aa617f0f5873a22cad188b3b7600d50140dc0
Tony Arcieri
2025-09-16T00:49:29
primefield: write `TryFrom` impls for `Uxyz`/`&Uyz` (#1438) Replaces the ones that were defined on a field-by-field basis. Doing this necessitates defining an `Error` type for the first time, along with a `Result` type.
diff --git a/bignp256/src/arithmetic/scalar.rs b/bignp256/src/arithmetic/scalar.rs index 4f8d5870..e07a639d 100644 --- a/bignp256/src/arithmetic/scalar.rs +++ b/bignp256/src/arithmetic/scalar.rs @@ -19,7 +19,7 @@ mod scalar_impl; use self::scalar_impl::*; use crate::{BignP256, FieldBytes, ORDER_HEX, U256}; use ellip...
10
49
128
3bc77cba21437f4509cc5d60addbf46a7ddaed1b
Tony Arcieri
2025-09-15T23:36:17
primefield: change `:tt` to `:path` in macros (#1436) More restrictive and should generate better errors
diff --git a/primefield/src/macros.rs b/primefield/src/macros.rs index 8bebb6de..141ed494 100644 --- a/primefield/src/macros.rs +++ b/primefield/src/macros.rs @@ -113,7 +113,7 @@ macro_rules! monty_field_params { /// - `Invert` #[macro_export] macro_rules! monty_field_element { - ($fe:tt, $params:ty, $uint:tt) =>...
1
2
2
708bc5cd63238f16aad209c6ab7b2e4b555e4e4e
Tony Arcieri
2025-09-15T17:27:26
x448: add back `PublicKey::as_bytes` (#1435) Accidentally removed in #1378, but we still want the bytes of the *public* key to be accessible.
diff --git a/x448/src/lib.rs b/x448/src/lib.rs index aaf43ce4..40cd456c 100644 --- a/x448/src/lib.rs +++ b/x448/src/lib.rs @@ -66,6 +66,11 @@ impl PublicKey { Some(PublicKey(point)) } + + /// Converts a public key into a byte slice + pub fn as_bytes(&self) -> &[u8; 56] { + self.0.as_bytes()...
1
5
0
76b9644c45cd82ef7b71416f90fe1bd48a66d083
Tony Arcieri
2025-09-15T14:07:11
bignp256 v0.14.0-pre.0 (#1434)
diff --git a/Cargo.lock b/Cargo.lock index 28ddf2a0..c1d36818 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,7 +70,7 @@ dependencies = [ [[package]] name = "bignp256" -version = "0.14.0-pre" +version = "0.14.0-pre.0" dependencies = [ "belt-hash", "criterion", diff --git a/bignp256/Cargo.toml b/bignp256/Cargo....
2
2
2
2b30aa8d5dc3427e46e891ec9495bac46aa14296
Tony Arcieri
2025-09-14T01:26:43
New prereleases (#1432) Cuts the following prereleases: - `ed448-goldilocks` v0.14.0-pre.4 - `k256` v0.14.0-pre.11 - `p256` v0.14.0-pre.11 - `p384` v0.14.0-pre.11 - `p521` v0.14.0-pre.11 - `sm2` v0.14.0-pre.0 - `x448` v0.14.0-pre.1
diff --git a/Cargo.lock b/Cargo.lock index 7f193294..c78b7abb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -391,7 +391,7 @@ dependencies = [ [[package]] name = "ed448-goldilocks" -version = "0.14.0-pre.3" +version = "0.14.0-pre.4" dependencies = [ "criterion", "ed448", @@ -613,7 +613,7 @@ dependencies = [ [[...
8
15
15
8c5b42fec2fd61d486d7b33e22c95bf56c392db5
Tony Arcieri
2025-09-13T21:29:08
k256: split Schnorr `from_bytes`/`from_slice`; fix #1070 (#1429) This changes `k256::schnorr::{SigningKey, VerifyingKey}` to have separate `from_bytes` and `from_slice` methods where the `from_bytes` method takes `&FieldBytes` as an argument (i.e. `from_bytes` has effectively been renamed to `from_slice`). Additional...
diff --git a/k256/src/schnorr.rs b/k256/src/schnorr.rs index 77ea6692..5c1766a9 100644 --- a/k256/src/schnorr.rs +++ b/k256/src/schnorr.rs @@ -293,7 +293,7 @@ mod tests { #[test] fn bip340_sign_vectors() { for vector in BIP340_SIGN_VECTORS { - let sk = SigningKey::from_bytes(&vector.secret...
3
59
18
a309b7988e4f23a3bfa5d0180620e8b01ef3610c
Tony Arcieri
2025-09-13T20:29:33
hash2curve v0.14.0-rc.2 (#1428)
diff --git a/Cargo.lock b/Cargo.lock index cd3753a3..93c61d68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -529,7 +529,7 @@ dependencies = [ [[package]] name = "hash2curve" -version = "0.14.0-rc.1" +version = "0.14.0-rc.2" dependencies = [ "digest", "elliptic-curve", diff --git a/ed448-goldilocks/Cargo.toml b/e...
7
7
7
47456978c2068b538ee712c9a0107a45bb9fc1b0
Tony Arcieri
2025-09-13T19:57:00
primeorder v0.14.0-pre.9 (#1427)
diff --git a/Cargo.lock b/Cargo.lock index b8a26d1f..cd3753a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -880,7 +880,7 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.14.0-pre.8" +version = "0.14.0-pre.9" dependencies = [ "elliptic-curve", "serdect", diff --git a/bign256/Cargo.toml b/bign256...
12
18
18
91a5e94109ae7f152b5537ef9ad8ca607d3643ad
Tony Arcieri
2025-09-13T19:17:47
primefield v0.14.0-pre.6 (#1425)
diff --git a/Cargo.lock b/Cargo.lock index ea2204fb..b8a26d1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -869,7 +869,7 @@ dependencies = [ [[package]] name = "primefield" -version = "0.14.0-pre.5" +version = "0.14.0-pre.6" dependencies = [ "crypto-bigint", "ff", diff --git a/bign256/Cargo.toml b/bign256/Cargo...
11
12
12
8ef3fc24bca818db2c87db3459f944916ee37b43
Tony Arcieri
2025-09-13T19:17:38
p256+p384: use `MontyFieldElement::sqn_vartime` (#1426) Uses a common upstream implementation rather than a copy-pasted one
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index 49f252c1..855b0e00 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -94,17 +94,6 @@ impl FieldElement { self.multiply(self) } - /// Returns self^(2^n) mod p - const fn sqn(&self, n: usize)...
4
12
25
10e07e7c058282177881044f86ebab5eac715359
Tony Arcieri
2025-09-13T18:21:43
p256: use `ConstMontyParms` as source of field modulus (#1424)
diff --git a/p256/src/arithmetic/field.rs b/p256/src/arithmetic/field.rs index 6e3b1a39..49f252c1 100644 --- a/p256/src/arithmetic/field.rs +++ b/p256/src/arithmetic/field.rs @@ -8,14 +8,13 @@ mod field_impl; use core::ops::Mul; use elliptic_curve::{ - bigint::{NonZero, U256}, + bigint::U256, ff::PrimeFi...
4
69
123
74364ee5fe1cebd0922a2188555a59ea139342a1
Arthur Gautier
2025-09-13T18:20:05
x448: make secret an ephemeralsecret (#1378) This rewrites `Secret` to an opaque object to make sure they are not reused.
diff --git a/x448/src/lib.rs b/x448/src/lib.rs index 4f8467c1..aaf43ce4 100644 --- a/x448/src/lib.rs +++ b/x448/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] -use core::array::TryFromSliceError; use ed448_goldilocks::{ MontgomeryPoint, elliptic_curve::{ @@ -14,21 +13,10 @@ use zeroize::Zeroize; type Montgomery...
1
50
86
2d8e0250cfbfa2ea8d47817f440c12f96e8e24e9
Tony Arcieri
2025-09-13T18:18:28
primefield: conversions to/from `MontyFieldElement` (#1421) The `monty_field_element!` macro writes a newtype for `MontyFieldElement`. This commit changes those macros to write `From` impls for converting those newtypes to/from `MontyFieldelement`.
diff --git a/primefield/src/macros.rs b/primefield/src/macros.rs index 2516f622..8bebb6de 100644 --- a/primefield/src/macros.rs +++ b/primefield/src/macros.rs @@ -446,6 +446,18 @@ macro_rules! monty_field_element { } } + impl From<$crate::MontyFieldElement::<$params, { <$params>::LIMBS }>...
1
12
0
7ae747d367025ccc4bc335623eee8ec28b06abf8
Tony Arcieri
2025-09-13T17:28:46
Bump `signature` to v3.0.0-rc.4 (#1423) Also bumps `ecdsa` to v0.17.0-rc.7 This brings `*DigestSigner`/`*DigestVerifier` changes introduced in RustCrypto/traits#2004
diff --git a/Cargo.lock b/Cargo.lock index 1d4da7f2..ea2204fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -363,8 +363,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0-rc.6" -source = "git+https://github.com/RustCrypto/signatures?rev=2cd53cf4fbe82c61c2e2ac7b2099ba743b01074e#2cd53cf4fbe82c61c2e2ac7...
18
116
85
8471bc7ac876f12b33ef57f28c1a2785936eed5e
Tony Arcieri
2025-09-13T03:13:24
primefield: rename field macros (#1420) Renames the following: - `field_element_type!` => `monty_field_element!` - `fiat_field_arithmetic!` => `monty_field_fiat_arithmetic!`
diff --git a/bign256/src/arithmetic/field.rs b/bign256/src/arithmetic/field.rs index c40cf1f8..316a8ed5 100644 --- a/bign256/src/arithmetic/field.rs +++ b/bign256/src/arithmetic/field.rs @@ -53,9 +53,9 @@ pub struct FieldElement( pub(super) primefield::MontyFieldElement<FieldParams, { FieldParams::LIMBS }>, ); ...
17
31
31
1248f53873d133d9cbe4cc0eea2400b63feeebf2
Tony Arcieri
2025-09-13T03:05:39
primefield: bump `crypto-bigint` to v0.7.0-rc.6 (#1419)
diff --git a/primefield/Cargo.toml b/primefield/Cargo.toml index 438f72b4..a05842e6 100644 --- a/primefield/Cargo.toml +++ b/primefield/Cargo.toml @@ -14,7 +14,7 @@ edition = "2024" rust-version = "1.85" [dependencies] -bigint = { package = "crypto-bigint", version = "0.7.0-rc.4", default-features = false, features...
1
1
1
ae3c30b9753a4e89717cbf8ed1e1469628ef6f40
Tony Arcieri
2025-09-13T02:50:28
Bump `elliptic-curve` to v0.14.0-rc.14 (#1418)
diff --git a/Cargo.lock b/Cargo.lock index fcb1e873..1d4da7f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -318,9 +318,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.5" +version = "0.7.0-rc.6" source = "registry+https://gith...
15
20
20
1e1a00c2a2e892fec86cf3ec3f46b7d1491a5046
Tony Arcieri
2025-09-13T01:15:53
elliptic-curve: rename `ScalarPrimitive` => `ScalarValue` (#1417) Companion PR to RustCrypto/traits#2008
diff --git a/Cargo.lock b/Cargo.lock index 7a23e6e6..fcb1e873 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -318,8 +318,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.0-rc.4" -source = "git+https://github.com/RustCrypto/crypto-bigi...
22
63
64
8c4fad716cf27c080710c8c65e2260e970719bcb
Tony Arcieri
2025-09-12T23:37:44
Update `Curve::ORDER` to be `Odd` (#1416) Companion PR to https://RustCrypto/traits#2006
diff --git a/Cargo.lock b/Cargo.lock index c1225245..7a23e6e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -418,7 +418,7 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" version = "0.14.0-rc.13" -source = "git+https://github.com/RustCrypto/traits#b93...
21
57
53
796789ac09d0ac24009c8c6cfc4a6a3d6984e783
Tony Arcieri
2025-09-12T20:44:42
primefield: use `sqn_vartime` to compute `PrimeField::DELTA` (#1415)
diff --git a/primefield/src/monty.rs b/primefield/src/monty.rs index 047d4daa..ed5daa7a 100644 --- a/primefield/src/monty.rs +++ b/primefield/src/monty.rs @@ -373,20 +373,17 @@ where res } - /// Compute the [`PrimeField::DELTA`] constant. - const fn compute_delta() -> Self - where - Self...
1
12
15
fa94b6b4fd161ededfc6624edd356e8f927bfa95
Tony Arcieri
2025-09-11T21:24:11
primefield: move macros to `macros` module (#1411) Now that this crate is more than just a bag of macros, factoring the existing macros under a `macros` module makes sense.
diff --git a/primefield/src/lib.rs b/primefield/src/lib.rs index 2120ca90..1fe09026 100644 --- a/primefield/src/lib.rs +++ b/primefield/src/lib.rs @@ -9,7 +9,7 @@ #![doc = include_str!("../README.md")] mod dev; -mod fiat; +mod macros; mod monty; pub use crate::monty::{MontyFieldElement, MontyFieldParams, comput...
3
459
456