PackageTrack
Sign in Get early access

ff

Library for building and interfacing with finite fields

0.14.0 216M downloads/mo #471 most downloaded on crates.io zkcrypto/ff

What this package is like to depend on

Last release 2 months ago

30 May 2026

Ships unpredictably

gaps range from 8 days to 2.3 years

Some releases are documented

notes for 11 of 20 stable releases

Nothing withdrawn

no release was ever pulled

9 years old

22 releases · first in 2017

2 releases in the last 12 months

see the full history below

Release timeline

22 releases · Jun 2017 to May 2026
2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 22
  1. 0.14.0 30 May 2026
    Release notes

    Added

    • ff::Field::try_random<R: TryRng + ?Sized>(rng: &mut R) -> Result<Self, R::Error>, a new trait method that must be implemented by downstreams. It samples a field element using a fallible RNG and propagates the RNG's error.

    Changed

    • MSRV is now 1.85.0.
    • Migrated to rand_core 0.10.
    • ff::Field::random(rng: impl RngCore) -> Self has been changed back to Field::random<R: Rng + ?Sized>(rng: &mut R) -> Self, to enable passing a trait object as the RNG. It now has a default implementation in terms of Field::try_random.

    Removed

    • derive_bits feature flag (use bits instead).
    Open source →
  2. 0.14.0-pre.1 21 May 2026 pre-release

    Nothing published for this version

  3. 0.14.0-pre.0 17 Apr 2025 pre-release

    Nothing published for this version

  4. 0.13.1 09 Mar 2025
    Release notes

    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.
    Open source →
  5. 0.13.0 06 Dec 2022
    Release notes

    Added

    • ff::Field::{ZERO, ONE}
    • ff::Field::pow
    • ff::Field::{sqrt_ratio, sqrt_alt}
    • core::iter::{Sum, Product} bounds on ff::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

    Changed

    • ff::Field::sqrt is now a provided method that uses the Field::sqrt_ratio method. Implementors of the Field trait can choose to implement Field::sqrt_ratio and use the provided ff::Field::sqrt method, especially if it is more efficient in practice, or they can keep their own implementation of Field::sqrt and implement Field::sqrt_ratio in terms of that implementation using the ff::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 for PrimeField::TWO_INV to exist.

    Removed

    • ff::Field::{zero, one} (use ff::Field::{ZERO, ONE} instead).
    • ff::PrimeField::{multiplicative_generator, root_of_unity} (use ff::PrimeField::{MULTIPLICATIVE_GENERATOR, ROOT_OF_UNITY} instead).
    Open source →
  6. 0.12.1 28 Oct 2022
    Release notes

    Fixed

    • ff_derive previously generated a Field::random implementation that would overflow for fields that needed a full 64-bit spare limb.
    Open source →
  7. 0.12.0 04 May 2022
    Release notes

    Changed

    • MSRV is now 1.56.0.
    • Bumped bitvec to 1.0.
    Open source →
  8. 0.11.1 04 May 2022
    Release notes

    Fixed

    • ff_derive procedural macro can now be invoked within regular macros.
    • Previously, ff_derive's procedural macro would generate implementations of PrimeFieldBits even when the bits crate feature was disabled. ff_derive can now be used without a dependency on bitvec by disabling feature features. The new crate feature derive_bits can be used to force the generation of PrimeFieldBits implementations. This new crate feature will be removed once our MSRV is at least 1.60 and we have access to weak dependency features.
    Open source →
  9. 0.11.0 02 Sep 2021
    Release notes

    Added

    • subtle::ConstantTimeEq bound on ff::Field
    • Copy + Send + Sync + 'static bounds on ff::PrimeField::Repr
    • ff::derive module behind the derive feature flag, containing dependencies for the PrimeField 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

    Changed

    • ff::Field::is_zero now returns subtle::Choice.
    • ff::PrimeField::{is_odd, is_even} now return subtle::Choice.
    • ff::PrimeField::from_repr now return subtle::CtOption<Self>.
    • ff::PrimeField::from_str has been renamed to PrimeField::from_str_vartime.

    Removed

    • ff::{adc, mac_with_carry, sbb} (replaced by ff::derive::{adc, mac, sbb}).
    Open source →
  10. 0.10.1 11 Aug 2021
    Release notes

    Added

    • 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 new alloc feature flag.
    • ff::BatchInverter struct, which provides methods for non-allocating batch inversion of field elements contained within slices.
    Open source →
  11. 0.10.0 01 Jun 2021
    Release notes

    Added

    • ff::PrimeFieldBits: PrimeField trait, behind a bits feature flag.

    Changed

    • MSRV is now 1.51.0.
    • Bumped bitvec to 0.22 to enable fixing a performance regression in ff 0.9. The bitvec::view::BitView re-export has been replaced by bitvec::view::BitViewSized.
    • The bitvec dependency and its re-exports have been gated behind the bits feature flag.

    Removed

    • ff::PrimeField::{ReprBits, char_le_bits, to_le_bits} (replaced by ff::PrimeFieldBits trait).

    Fixed

    • #[derive(PrimeField)] now works on small moduli (that fit in a single u64 limb).
    Open source →
  12. 0.9.0 05 Jan 2021
    Release notes

    Added

    • Re-export of bitvec::view::BitView.
    • ff::FieldBits<V> type alias for the return type of ff::PrimeField::{char_le_bits, to_le_bits}.

    Changed

    • Bumped bitvec to 0.20, rand_core to 0.6.

    Removed

    • From<Self> and From<&Self> bounds on ff::PrimeField::Repr.
    Open source →
  13. 0.8.0 08 Sep 2020
    Release notes

    Added

    • ff::PrimeField::{ReprBits, char_le_bits, to_le_bits}, and a public dependency on bitvec 0.18.
    • ff::Field::cube method with provided implementation.
    • Send + Sync bounds on ff::PrimeField::ReprBits

    Changed

    • MSRV is now 1.44.0.
    • ff::Field::random<R: RngCore + ?Sized>(rng: &mut R) -> Self has been changed to Field::random(rng: impl RngCore) -> Self, to align with group::Group::random.

    Removed

    • fmt::Display bound on ff::Field.
    • ff::PrimeField::char (replaced by ff::PrimeField::char_le_bits).
    • ff::{BitIterator, Endianness, PrimeField::ReprEndianness (replaced by ff::PrimeField::to_le_bits).
    Open source →
  14. 0.7.0 24 Aug 2020

    Nothing published for this version

  15. 0.6.0 13 Mar 2020

    Nothing published for this version

  16. 0.5.2 08 Jan 2020

    Nothing published for this version

  17. 0.5.1 21 Dec 2019

    Nothing published for this version

  18. 0.5.0 08 Oct 2019

    Nothing published for this version

  19. 0.4.0 03 Jul 2018

    Nothing published for this version

  20. 0.3.0 02 Jul 2018

    Nothing published for this version

  21. 0.2.0 27 Jun 2017

    Nothing published for this version

  22. 0.1.0 26 Jun 2017

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive