From 1089bd6f92dcea42e61dc7d083ef4ad467839fd6 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 9 Mar 2025 04:55:43 +0000 Subject: [PATCH 1/3] Update lockfile after merging old PRs --- Cargo.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 55a57d2..454470c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,7 +90,6 @@ name = "ff_derive" version = "0.13.0" dependencies = [ "addchain", - "cfg-if", "num-bigint", "num-integer", "num-traits", From f77b814669bc9b277626f3b888ab349179cb26ef Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 9 Mar 2025 04:55:59 +0000 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 7 +++++++ ff_derive/src/lib.rs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 562a80d..bdccd10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this library adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- `ff_derive` now works with all odd primes, not just primes that are either + `3 (mod 4)` or `1 (mod 16)`. + +### Fixed +- A type inference problem when `ff_derive` and `hybrid-array` are in the same + dependency tree has been fixed. ## [0.13.0] - 2022-12-06 ### Added diff --git a/ff_derive/src/lib.rs b/ff_derive/src/lib.rs index 62f5463..0a0b08d 100644 --- a/ff_derive/src/lib.rs +++ b/ff_derive/src/lib.rs @@ -538,7 +538,7 @@ fn prime_field_constants_and_sqrt( }; quote! { - // Tonelli-Shank's algorithm works for every odd prime. + // Tonelli-Shanks algorithm works for every remaining odd prime. // https://eprint.iacr.org/2012/685.pdf (page 12, algorithm 5) use ::ff::derive::subtle::{ConditionallySelectable, ConstantTimeEq}; From 851b0f61bbcf9a5b61027307144d8bd1f9b756ba Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sun, 9 Mar 2025 05:00:47 +0000 Subject: [PATCH 3/3] Release 0.13.1 --- CHANGELOG.md | 2 ++ Cargo.lock | 4 ++-- Cargo.toml | 4 ++-- ff_derive/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdccd10..955e6a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this library adheres to Rust's notion of [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.13.1] - 2025-03-09 ### Changed - `ff_derive` now works with all odd primes, not just primes that are either `3 (mod 4)` or `1 (mod 16)`. diff --git a/Cargo.lock b/Cargo.lock index 454470c..8cbc354 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,7 +74,7 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "ff" -version = "0.13.0" +version = "0.13.1" dependencies = [ "bitvec", "blake2b_simd", @@ -87,7 +87,7 @@ dependencies = [ [[package]] name = "ff_derive" -version = "0.13.0" +version = "0.13.1" dependencies = [ "addchain", "num-bigint", diff --git a/Cargo.toml b/Cargo.toml index 7cbe106..a6af21f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ff" -version = "0.13.0" +version = "0.13.1" authors = [ "Sean Bowe ", "Jack Grigg ", @@ -17,7 +17,7 @@ repository = "https://github.com/zkcrypto/ff" [dependencies] bitvec = { version = "1", default-features = false, optional = true } byteorder = { version = "1", default-features = false, optional = true } -ff_derive = { version = "0.13", path = "ff_derive", optional = true } +ff_derive = { version = "0.13.1", path = "ff_derive", optional = true } rand_core = { version = "0.6", default-features = false } subtle = { version = "2.2.1", default-features = false, features = ["i128"] } diff --git a/ff_derive/Cargo.toml b/ff_derive/Cargo.toml index 92468f6..1933785 100644 --- a/ff_derive/Cargo.toml +++ b/ff_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ff_derive" -version = "0.13.0" +version = "0.13.1" authors = [ "Sean Bowe ", "Jack Grigg ",