All notable changes to this library will be documented in this file.
The format is based on Keep a Changelog, and this library adheres to Rust's notion of Semantic Versioning.
ff::Field::{ZERO, ONE}
ff::Field::pow
ff::Field::{sqrt_ratio, sqrt_alt}
core::iter::{Sum, Product}
bounds onff::Field
ff::PrimeField::from_u128
ff::PrimeField::{MODULUS, TWO_INV}
- Constants related to multiplicative generators:
ff::PrimeField::MULTIPLICATIVE_GENERATOR
ff::PrimeField::{ROOT_OF_UNITY, ROOT_OF_UNITY_INV}
ff::PrimeField::DELTA
ff::WithSmallOrderMulGroup
ff::FromUniformBytes
ff::helpers
:sqrt_tonelli_shanks
sqrt_ratio_generic
ff::Field::sqrt
is now a provided method that uses theField::sqrt_ratio
method. Implementors of theField
trait can choose to implementField::sqrt_ratio
and use the providedff::Field::sqrt
method, especially if it is more efficient in practice, or they can keep their own implementation ofField::sqrt
and implementField::sqrt_ratio
in terms of that implementation using theff::helpers::sqrt_ratio_generic
helper function.ff::PrimeField
is now documented as representing a non-binary field (i.e. its prime is not 2). This was always the intention, but is now a concrete requirement in order forPrimeField::TWO_INV
to exist.
ff::Field::{zero, one}
(useff::Field::{ZERO, ONE}
instead).ff::PrimeField::{multiplicative_generator, root_of_unity}
(useff::PrimeField::{MULTIPLICATIVE_GENERATOR, ROOT_OF_UNITY}
instead).
ff_derive
previously generated aField::random
implementation that would overflow for fields that needed a full 64-bit spare limb.
- MSRV is now 1.56.0.
- Bumped
bitvec
to 1.0.
ff_derive
procedural macro can now be invoked within regular macros.- Previously,
ff_derive
's procedural macro would generate implementations ofPrimeFieldBits
even when thebits
crate feature was disabled.ff_derive
can now be used without a dependency onbitvec
by disabling feature features. The new crate featurederive_bits
can be used to force the generation ofPrimeFieldBits
implementations. This new crate feature will be removed once our MSRV is at least 1.60 and we have access to weak dependency features.
subtle::ConstantTimeEq
bound onff::Field
Copy + Send + Sync + 'static
bounds onff::PrimeField::Repr
ff::derive
module behind thederive
feature flag, containing dependencies for thePrimeField
derive macro:- Re-exports of required crates.
adc, mac, sbb
constant-time const helper functions.
ff::Field::is_zero_vartime
ff::PrimeField::from_repr_vartime
ff::Field::is_zero
now returnssubtle::Choice
.ff::PrimeField::{is_odd, is_even}
now returnsubtle::Choice
.ff::PrimeField::from_repr
now returnsubtle::CtOption<Self>
.ff::PrimeField::from_str
has been renamed toPrimeField::from_str_vartime
.
ff::{adc, mac_with_carry, sbb}
(replaced byff::derive::{adc, mac, sbb}
).
ff::BatchInvert
extension trait, implemented for iterators over mutable field elements which allows those field elements to be inverted in a batch. This trait is behind the newalloc
feature flag.ff::BatchInverter
struct, which provides methods for non-allocating batch inversion of field elements contained within slices.
ff::PrimeFieldBits: PrimeField
trait, behind abits
feature flag.
- MSRV is now 1.51.0.
- Bumped
bitvec
to 0.22 to enable fixing a performance regression inff 0.9
. Thebitvec::view::BitView
re-export has been replaced bybitvec::view::BitViewSized
. - The
bitvec
dependency and its re-exports have been gated behind thebits
feature flag.
ff::PrimeField::{ReprBits, char_le_bits, to_le_bits}
(replaced byff::PrimeFieldBits
trait).
#[derive(PrimeField)]
now works on small moduli (that fit in a singleu64
limb).
- Re-export of
bitvec::view::BitView
. ff::FieldBits<V>
type alias for the return type offf::PrimeField::{char_le_bits, to_le_bits}
.
- Bumped
bitvec
to 0.20,rand_core
to 0.6.
From<Self>
andFrom<&Self>
bounds onff::PrimeField::Repr
.
ff::PrimeField::{ReprBits, char_le_bits, to_le_bits}
, and a public dependency onbitvec 0.18
.ff::Field::cube
method with provided implementation.Send + Sync
bounds onff::PrimeField::ReprBits
- MSRV is now 1.44.0.
ff::Field::random<R: RngCore + ?Sized>(rng: &mut R) -> Self
has been changed toField::random(rng: impl RngCore) -> Self
, to aligh withgroup::Group::random
.
fmt::Display
bound onff::Field
.ff::PrimeField::char
(replaced byff::PrimeField::char_le_bits
).ff::{BitIterator, Endianness, PrimeField::ReprEndianness
(replaced byff::PrimeField::to_le_bits
).