From b73e44baf2f8f78b57bcb35afd6a23d562f8e5d6 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 21 Nov 2025 15:05:10 -0700 Subject: [PATCH] Fork crates as `rustcrypto-ff`/`rustcrypto-ff_derive` Adds a `rustcrypto*` prefix to the crate names, allowing us to release forks since we're having trouble getting updates merged upstream: zkcrypto/ff#147 --- .github/workflows/ci.yml | 8 +-- Cargo.lock | 52 ++++++++--------- Cargo.toml | 6 +- README.md | 4 +- ff_derive/Cargo.toml | 4 +- ff_derive/src/lib.rs | 120 +++++++++++++++++++-------------------- src/lib.rs | 6 +- tests/derive.rs | 2 +- 8 files changed, 102 insertions(+), 100 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be7b028..e3c7e1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ ubuntu-latest, windows-latest, macOS-latest ] steps: - uses: actions/checkout@v4 - name: Run tests @@ -26,7 +26,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ ubuntu-latest, windows-latest, macOS-latest ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable @@ -70,7 +70,7 @@ jobs: - name: Add ff as a dependency of the synthetic crate working-directory: ./ci-build # run: cargo add --no-default-features --path ../crate_root - run: sed -i 's;\[dependencies\];\[dependencies\]\nff = { path = "../crate_root", default-features = false };g' ./Cargo.toml + run: sed -i 's;\[dependencies\];\[dependencies\]\nrustcrypto-ff = { path = "../crate_root", default-features = false };g' ./Cargo.toml - name: Add target working-directory: ./ci-build run: rustup target add ${{ matrix.target }} @@ -80,7 +80,7 @@ jobs: - name: Enable the bits feature of ff working-directory: ./ci-build # run: cargo add --no-default-features --features bits --path ../crate_root - run: sed -i 's;ff = { path = "../crate_root", default-features = false };ff = { path = "../crate_root", default-features = false, features = ["bits"] };g' ./Cargo.toml + run: sed -i 's;rustcrypto-ff = { path = "../crate_root", default-features = false };rustcrypto-ff = { path = "../crate_root", default-features = false, features = ["bits"] };g' ./Cargo.toml - name: Build for target with the bits feature working-directory: ./ci-build run: cargo build --verbose --target ${{ matrix.target }} diff --git a/Cargo.lock b/Cargo.lock index ab552c6..1c95337 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,32 +78,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" -[[package]] -name = "ff" -version = "0.14.0-pre.0" -dependencies = [ - "bitvec", - "blake2b_simd", - "byteorder", - "ff_derive", - "rand", - "rand_core", - "subtle", -] - -[[package]] -name = "ff_derive" -version = "0.14.0-pre.0" -dependencies = [ - "addchain", - "num-bigint", - "num-integer", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "funty" version = "2.0.0" @@ -220,6 +194,32 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rustcrypto-ff" +version = "0.14.0-pre" +dependencies = [ + "bitvec", + "blake2b_simd", + "byteorder", + "rand", + "rand_core", + "rustcrypto-ff_derive", + "subtle", +] + +[[package]] +name = "rustcrypto-ff_derive" +version = "0.14.0-pre" +dependencies = [ + "addchain", + "num-bigint", + "num-integer", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "subtle" version = "2.6.1" diff --git a/Cargo.toml b/Cargo.toml index a5f7f7c..c37117b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "ff" -version = "0.14.0-pre.0" +name = "rustcrypto-ff" +version = "0.14.0-pre" 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.14.0-pre.0", path = "ff_derive", optional = true } +ff_derive = { version = "=0.14.0-pre", package = "rustcrypto-ff_derive", path = "ff_derive", optional = true } rand_core = { version = "0.9", default-features = false } subtle = { version = "2.2.1", default-features = false, features = ["i128"] } diff --git a/README.md b/README.md index 763769f..9a279ee 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ -# ff +# RustCrypto: ff `ff` is a finite field library written in pure Rust, with no `unsafe{}` code. +This is a fork of https://github.com/zkcrypto/ff + ## RFC process This crate follows the [zkcrypto RFC process](https://zkcrypto.github.io/rfcs/). diff --git a/ff_derive/Cargo.toml b/ff_derive/Cargo.toml index 6ae2aa0..b98da69 100644 --- a/ff_derive/Cargo.toml +++ b/ff_derive/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "ff_derive" -version = "0.14.0-pre.0" +name = "rustcrypto-ff_derive" +version = "0.14.0-pre" authors = [ "Sean Bowe ", "Jack Grigg ", diff --git a/ff_derive/src/lib.rs b/ff_derive/src/lib.rs index 53bc6ea..0f0d31b 100644 --- a/ff_derive/src/lib.rs +++ b/ff_derive/src/lib.rs @@ -51,16 +51,16 @@ impl ReprEndianness { fn from_repr(&self, name: &syn::Ident, limbs: usize) -> proc_macro2::TokenStream { let read_repr = match self { ReprEndianness::Big => quote! { - ::ff::derive::byteorder::BigEndian::read_u64_into(r.as_ref(), &mut inner[..]); + ::rustcrypto_ff::derive::byteorder::BigEndian::read_u64_into(r.as_ref(), &mut inner[..]); inner.reverse(); }, ReprEndianness::Little => quote! { - ::ff::derive::byteorder::LittleEndian::read_u64_into(r.as_ref(), &mut inner[..]); + ::rustcrypto_ff::derive::byteorder::LittleEndian::read_u64_into(r.as_ref(), &mut inner[..]); }, }; quote! { - use ::ff::derive::byteorder::ByteOrder; + use ::rustcrypto_ff::derive::byteorder::ByteOrder; let r = { let mut inner = [0u64; #limbs]; @@ -81,15 +81,15 @@ impl ReprEndianness { let write_repr = match self { ReprEndianness::Big => quote! { r.0.reverse(); - ::ff::derive::byteorder::BigEndian::write_u64_into(&r.0, &mut repr[..]); + ::rustcrypto_ff::derive::byteorder::BigEndian::write_u64_into(&r.0, &mut repr[..]); }, ReprEndianness::Little => quote! { - ::ff::derive::byteorder::LittleEndian::write_u64_into(&r.0, &mut repr[..]); + ::rustcrypto_ff::derive::byteorder::LittleEndian::write_u64_into(&r.0, &mut repr[..]); }, }; quote! { - use ::ff::derive::byteorder::ByteOrder; + use ::rustcrypto_ff::derive::byteorder::ByteOrder; let mut r = *self; r.mont_reduce( @@ -336,8 +336,8 @@ fn prime_field_repr_impl( #[derive(Copy, Clone)] pub struct #repr(pub [u8; #bytes]); - impl ::ff::derive::subtle::ConstantTimeEq for #repr { - fn ct_eq(&self, other: &#repr) -> ::ff::derive::subtle::Choice { + impl ::rustcrypto_ff::derive::subtle::ConstantTimeEq for #repr { + fn ct_eq(&self, other: &#repr) -> ::rustcrypto_ff::derive::subtle::Choice { self.0 .iter() .zip(other.0.iter()) @@ -348,7 +348,7 @@ fn prime_field_repr_impl( impl ::core::cmp::PartialEq for #repr { fn eq(&self, other: &#repr) -> bool { - use ::ff::derive::subtle::ConstantTimeEq; + use ::rustcrypto_ff::derive::subtle::ConstantTimeEq; self.ct_eq(other).into() } } @@ -515,7 +515,7 @@ fn prime_field_constants_and_sqrt( ); quote! { - use ::ff::derive::subtle::ConstantTimeEq; + use ::rustcrypto_ff::derive::subtle::ConstantTimeEq; // Because r = 3 (mod 4) // sqrt can be done with only one exponentiation, @@ -524,7 +524,7 @@ fn prime_field_constants_and_sqrt( #mod_plus_1_over_4 }; - ::ff::derive::subtle::CtOption::new( + ::rustcrypto_ff::derive::subtle::CtOption::new( sqrt, (sqrt * &sqrt).ct_eq(self), // Only return Some if it's the square root. ) @@ -540,7 +540,7 @@ fn prime_field_constants_and_sqrt( quote! { // 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}; + use ::rustcrypto_ff::derive::subtle::{ConditionallySelectable, ConstantTimeEq}; // w = self^((t - 1) // 2) let w = { @@ -557,7 +557,7 @@ fn prime_field_constants_and_sqrt( for max_v in (1..=S).rev() { let mut k = 1; let mut tmp = b.square(); - let mut j_less_than_v: ::ff::derive::subtle::Choice = 1.into(); + let mut j_less_than_v: ::rustcrypto_ff::derive::subtle::Choice = 1.into(); for j in 2..max_v { let tmp_is_one = tmp.ct_eq(&#name::ONE); @@ -576,7 +576,7 @@ fn prime_field_constants_and_sqrt( v = k; } - ::ff::derive::subtle::CtOption::new( + ::rustcrypto_ff::derive::subtle::CtOption::new( x, (x * &x).ct_eq(self), // Only return Some if it's the square root. ) @@ -689,14 +689,14 @@ fn prime_field_impl( let temp = get_temp(i); gen.extend(quote! { let k = #temp.wrapping_mul(INV); - let (_, carry) = ::ff::derive::mac(#temp, k, MODULUS_LIMBS.0[0], 0); + let (_, carry) = ::rustcrypto_ff::derive::mac(#temp, k, MODULUS_LIMBS.0[0], 0); }); } for j in 1..limbs { let temp = get_temp(i + j); gen.extend(quote! { - let (#temp, carry) = ::ff::derive::mac(#temp, k, MODULUS_LIMBS.0[#j], carry); + let (#temp, carry) = ::rustcrypto_ff::derive::mac(#temp, k, MODULUS_LIMBS.0[#j], carry); }); } @@ -704,11 +704,11 @@ fn prime_field_impl( if i == 0 { gen.extend(quote! { - let (#temp, carry2) = ::ff::derive::adc(#temp, 0, carry); + let (#temp, carry2) = ::rustcrypto_ff::derive::adc(#temp, 0, carry); }); } else { gen.extend(quote! { - let (#temp, carry2) = ::ff::derive::adc(#temp, carry2, carry); + let (#temp, carry2) = ::rustcrypto_ff::derive::adc(#temp, carry2, carry); }); } } @@ -737,11 +737,11 @@ fn prime_field_impl( let temp = get_temp(i + j); if i == 0 { gen.extend(quote! { - let (#temp, carry) = ::ff::derive::mac(0, #a.0[#i], #a.0[#j], carry); + let (#temp, carry) = ::rustcrypto_ff::derive::mac(0, #a.0[#i], #a.0[#j], carry); }); } else { gen.extend(quote! { - let (#temp, carry) = ::ff::derive::mac(#temp, #a.0[#i], #a.0[#j], carry); + let (#temp, carry) = ::rustcrypto_ff::derive::mac(#temp, #a.0[#i], #a.0[#j], carry); }); } } @@ -783,16 +783,16 @@ fn prime_field_impl( let temp1 = get_temp(i * 2 + 1); if i == 0 { gen.extend(quote! { - let (#temp0, carry) = ::ff::derive::mac(0, #a.0[#i], #a.0[#i], 0); + let (#temp0, carry) = ::rustcrypto_ff::derive::mac(0, #a.0[#i], #a.0[#i], 0); }); } else { gen.extend(quote! { - let (#temp0, carry) = ::ff::derive::mac(#temp0, #a.0[#i], #a.0[#i], carry); + let (#temp0, carry) = ::rustcrypto_ff::derive::mac(#temp0, #a.0[#i], #a.0[#i], carry); }); } gen.extend(quote! { - let (#temp1, carry) = ::ff::derive::adc(#temp1, 0, carry); + let (#temp1, carry) = ::rustcrypto_ff::derive::adc(#temp1, 0, carry); }); } @@ -828,11 +828,11 @@ fn prime_field_impl( if i == 0 { gen.extend(quote! { - let (#temp, carry) = ::ff::derive::mac(0, #a.0[#i], #b.0[#j], carry); + let (#temp, carry) = ::rustcrypto_ff::derive::mac(0, #a.0[#i], #b.0[#j], carry); }); } else { gen.extend(quote! { - let (#temp, carry) = ::ff::derive::mac(#temp, #a.0[#i], #b.0[#j], carry); + let (#temp, carry) = ::rustcrypto_ff::derive::mac(#temp, #a.0[#i], #b.0[#j], carry); }); } } @@ -864,7 +864,7 @@ fn prime_field_impl( let mod_minus_2 = pow_fixed::generate(&a, modulus - BigUint::from(2u64)); quote! { - use ::ff::derive::subtle::ConstantTimeEq; + use ::rustcrypto_ff::derive::subtle::ConstantTimeEq; // By Euler's theorem, if `a` is coprime to `p` (i.e. `gcd(a, p) = 1`), then: // a^-1 ≡ a^(phi(p) - 1) mod p @@ -876,7 +876,7 @@ fn prime_field_impl( #mod_minus_2 }; - ::ff::derive::subtle::CtOption::new(inv, !#a.is_zero()) + ::rustcrypto_ff::derive::subtle::CtOption::new(inv, !#a.is_zero()) } } @@ -912,21 +912,21 @@ fn prime_field_impl( let prime_field_bits_impl = if cfg!(feature = "bits") { let to_le_bits_impl = ReprEndianness::Little.to_repr( - quote! {::ff::derive::bitvec::array::BitArray::new}, + quote! {::rustcrypto_ff::derive::bitvec::array::BitArray::new}, &mont_reduce_self_params, limbs, ); Some(quote! { - impl ::ff::PrimeFieldBits for #name { + impl ::rustcrypto_ff::PrimeFieldBits for #name { type ReprBits = REPR_BITS; - fn to_le_bits(&self) -> ::ff::FieldBits { + fn to_le_bits(&self) -> ::rustcrypto_ff::FieldBits { #to_le_bits_impl } - fn char_le_bits() -> ::ff::FieldBits { - ::ff::FieldBits::new(MODULUS) + fn char_le_bits() -> ::rustcrypto_ff::FieldBits { + ::rustcrypto_ff::FieldBits::new(MODULUS) } } }) @@ -947,21 +947,21 @@ fn prime_field_impl( impl ::core::default::Default for #name { fn default() -> #name { - use ::ff::Field; + use ::rustcrypto_ff::Field; #name::ZERO } } - impl ::ff::derive::subtle::ConstantTimeEq for #name { - fn ct_eq(&self, other: &#name) -> ::ff::derive::subtle::Choice { - use ::ff::PrimeField; + impl ::rustcrypto_ff::derive::subtle::ConstantTimeEq for #name { + fn ct_eq(&self, other: &#name) -> ::rustcrypto_ff::derive::subtle::Choice { + use ::rustcrypto_ff::PrimeField; self.to_repr().ct_eq(&other.to_repr()) } } impl ::core::cmp::PartialEq for #name { fn eq(&self, other: &#name) -> bool { - use ::ff::derive::subtle::ConstantTimeEq; + use ::rustcrypto_ff::derive::subtle::ConstantTimeEq; self.ct_eq(other).into() } } @@ -971,7 +971,7 @@ fn prime_field_impl( impl ::core::fmt::Debug for #name { fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - use ::ff::PrimeField; + use ::rustcrypto_ff::PrimeField; write!(f, "{}({:?})", stringify!(#name), self.to_repr()) } } @@ -1012,20 +1012,20 @@ fn prime_field_impl( impl From<#name> for #repr { fn from(e: #name) -> #repr { - use ::ff::PrimeField; + use ::rustcrypto_ff::PrimeField; e.to_repr() } } impl<'a> From<&'a #name> for #repr { fn from(e: &'a #name) -> #repr { - use ::ff::PrimeField; + use ::rustcrypto_ff::PrimeField; e.to_repr() } } - impl ::ff::derive::subtle::ConditionallySelectable for #name { - fn conditional_select(a: &#name, b: &#name, choice: ::ff::derive::subtle::Choice) -> #name { + impl ::rustcrypto_ff::derive::subtle::ConditionallySelectable for #name { + fn conditional_select(a: &#name, b: &#name, choice: ::rustcrypto_ff::derive::subtle::Choice) -> #name { let mut res = [0u64; #limbs]; for i in 0..#limbs { res[i] = u64::conditional_select(&a.0[i], &b.0[i], choice); @@ -1039,7 +1039,7 @@ fn prime_field_impl( #[inline] fn neg(self) -> #name { - use ::ff::Field; + use ::rustcrypto_ff::Field; let mut ret = self; if !ret.is_zero_vartime() { @@ -1172,7 +1172,7 @@ fn prime_field_impl( impl> ::core::iter::Sum for #name { fn sum>(iter: I) -> Self { - use ::ff::Field; + use ::rustcrypto_ff::Field; iter.fold(Self::ZERO, |acc, item| acc + item.borrow()) } @@ -1180,31 +1180,31 @@ fn prime_field_impl( impl> ::core::iter::Product for #name { fn product>(iter: I) -> Self { - use ::ff::Field; + use ::rustcrypto_ff::Field; iter.fold(Self::ONE, |acc, item| acc * item.borrow()) } } - impl ::ff::PrimeField for #name { + impl ::rustcrypto_ff::PrimeField for #name { type Repr = #repr; - fn from_repr(r: #repr) -> ::ff::derive::subtle::CtOption<#name> { + fn from_repr(r: #repr) -> ::rustcrypto_ff::derive::subtle::CtOption<#name> { #from_repr_impl // Try to subtract the modulus let borrow = r.0.iter().zip(MODULUS_LIMBS.0.iter()).fold(0, |borrow, (a, b)| { - ::ff::derive::sbb(*a, *b, borrow).1 + ::rustcrypto_ff::derive::sbb(*a, *b, borrow).1 }); // If the element is smaller than MODULUS then the // subtraction will underflow, producing a borrow value // of 0xffff...ffff. Otherwise, it'll be zero. - let is_some = ::ff::derive::subtle::Choice::from((borrow as u8) & 1); + let is_some = ::rustcrypto_ff::derive::subtle::Choice::from((borrow as u8) & 1); // Convert to Montgomery form by computing // (a.R^0 * R^2) / R = a.R - ::ff::derive::subtle::CtOption::new(r * &R2, is_some) + ::rustcrypto_ff::derive::subtle::CtOption::new(r * &R2, is_some) } fn from_repr_vartime(r: #repr) -> Option<#name> { @@ -1222,7 +1222,7 @@ fn prime_field_impl( } #[inline(always)] - fn is_odd(&self) -> ::ff::derive::subtle::Choice { + fn is_odd(&self) -> ::rustcrypto_ff::derive::subtle::Choice { let mut r = *self; r.mont_reduce( #mont_reduce_self_params @@ -1230,7 +1230,7 @@ fn prime_field_impl( // TODO: This looks like a constant-time result, but r.mont_reduce() is // currently implemented using variable-time code. - ::ff::derive::subtle::Choice::from((r.0[0] & 1) as u8) + ::rustcrypto_ff::derive::subtle::Choice::from((r.0[0] & 1) as u8) } const MODULUS: &'static str = MODULUS_STR; @@ -1254,12 +1254,12 @@ fn prime_field_impl( #prime_field_bits_impl - impl ::ff::Field for #name { + impl ::rustcrypto_ff::Field for #name { const ZERO: Self = #name([0; #limbs]); const ONE: Self = R; /// Computes a uniformly random element using rejection sampling. - fn try_from_rng(rng: &mut R) -> ::core::result::Result { + fn try_from_rng(rng: &mut R) -> ::core::result::Result { loop { let mut tmp = { let mut repr = [0u64; #limbs]; @@ -1306,7 +1306,7 @@ fn prime_field_impl( ret } - fn invert(&self) -> ::ff::derive::subtle::CtOption { + fn invert(&self) -> ::rustcrypto_ff::derive::subtle::CtOption { #invert_impl } @@ -1316,11 +1316,11 @@ fn prime_field_impl( #squaring_impl } - fn sqrt_ratio(num: &Self, div: &Self) -> (::ff::derive::subtle::Choice, Self) { - ::ff::helpers::sqrt_ratio_generic(num, div) + fn sqrt_ratio(num: &Self, div: &Self) -> (::rustcrypto_ff::derive::subtle::Choice, Self) { + ::rustcrypto_ff::helpers::sqrt_ratio_generic(num, div) } - fn sqrt(&self) -> ::ff::derive::subtle::CtOption { + fn sqrt(&self) -> ::rustcrypto_ff::derive::subtle::CtOption { #sqrt_impl } } @@ -1355,7 +1355,7 @@ fn prime_field_impl( let mut carry = 0; for (a, b) in self.0.iter_mut().zip(other.0.iter()) { - let (new_a, new_carry) = ::ff::derive::adc(*a, *b, carry); + let (new_a, new_carry) = ::rustcrypto_ff::derive::adc(*a, *b, carry); *a = new_a; carry = new_carry; } @@ -1366,7 +1366,7 @@ fn prime_field_impl( let mut borrow = 0; for (a, b) in self.0.iter_mut().zip(other.0.iter()) { - let (new_a, new_borrow) = ::ff::derive::sbb(*a, *b, borrow); + let (new_a, new_borrow) = ::rustcrypto_ff::derive::sbb(*a, *b, borrow); *a = new_a; borrow = new_borrow; } diff --git a/src/lib.rs b/src/lib.rs index 4ffb982..c8a61ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -405,7 +405,7 @@ pub trait WithSmallOrderMulGroup: PrimeField { /// # #[cfg(feature = "derive")] { /// # // Fake this so we don't actually need a dev-dependency on bls12_381. /// # mod bls12_381 { -/// # use ff::{Field, PrimeField}; +/// # use rustcrypto_ff::{Field, PrimeField}; /// # /// # #[derive(PrimeField)] /// # #[PrimeFieldModulus = "52435875175126190479447740508185965837690552500527637822603658699938581184513"] @@ -413,7 +413,7 @@ pub trait WithSmallOrderMulGroup: PrimeField { /// # #[PrimeFieldReprEndianness = "little"] /// # pub struct Scalar([u64; 4]); /// # -/// # impl ff::FromUniformBytes<64> for Scalar { +/// # impl rustcrypto_ff::FromUniformBytes<64> for Scalar { /// # fn from_uniform_bytes(_bytes: &[u8; 64]) -> Self { /// # // Fake impl for doctest /// # Scalar::ONE @@ -423,7 +423,7 @@ pub trait WithSmallOrderMulGroup: PrimeField { /// # /// use blake2b_simd::blake2b; /// use bls12_381::Scalar; -/// use ff::FromUniformBytes; +/// use rustcrypto_ff::FromUniformBytes; /// /// // `bls12_381::Scalar` implements `FromUniformBytes<64>`, and BLAKE2b (by default) /// // produces a 64-byte hash. diff --git a/tests/derive.rs b/tests/derive.rs index 29800f1..90a4549 100644 --- a/tests/derive.rs +++ b/tests/derive.rs @@ -3,7 +3,7 @@ //! of the APIs provided by `ff`, such as batch inversion. #[macro_use] -extern crate ff; +extern crate rustcrypto_ff as ff; /// The BLS12-381 scalar field. #[derive(PrimeField)]