NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4084 most downloaded on crates.io
Random prime number generation and primality checking library
Last release 3 months ago
10 Jun 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 11 of 11 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
25 releases · first in 2023
One column per quarter.
libm dependency removed, the required functions are now vendored. ([#122])
libm dependency removed, the required functions are now vendored. (#122)All heap allocation is now gated under the alloc feature (enabled by default). ([#118])
alloc feature (enabled by default). (#118)Bumped crypto-bigint to 0.7.0. ([#116])
crypto-bigint to 0.7.0. (#116)Bumped crypto-bigint to 0.7.0-rc.27, rand_core to 0.10, and rand to 0.10. ([#114])
crypto-bigint to 0.7.0-rc.27, rand_core to 0.10, and rand to 0.10. (#114)Bumped rand_core to 0.10.0-rc-7. ([#109])
Bumped crypto-bigint dependency to 0.7.0-rc.21 and rand_core to 0.10.0-rc-5. ([#108])
crypto-bigint dependency to 0.7.0-rc.21 and rand_core to 0.10.0-rc-5. (#108)Bumped crypto-bigint dependency to 0.7.0-rc.16. ([#106])
crypto-bigint dependency to 0.7.0-rc.16. (#106)Added an add_trial_division_test argument to fips::is_prime(). ([#99])
Bumped rand_core to 0.10.0-rc.2 and crypto-bigint to 0.7.0-pre.10. ([#95])
rand_core to 0.10.0-rc.2 and crypto-bigint to 0.7.0-pre.10. (#95)### Fixed - Fixed docs.rs build.
Bumped crypto-bigint dependency to 0.7.0-pre.5. ([#91])
Replaced the default GMP-style primality check with the BPSW'21 check. ([#70])
is_prime_with_rng() and is_safe_prime_with_rng() since the primality check is now deterministic. (#70)SieveIterator removed from the public API. (#79)RandomPrimeWithRng trait. (#79)default-rng features and corresponding API items. (#79)generate_(safe_)prime_with_rng() to random_(safe_)prime(), fips_is_(safe_)prime_with_rng() to fips_is_(safe_)prime(). (#79)multicore module and removed par_ prefixes. (#79)Flavor enum and removed _safe suffixes from functions. (#79)SieveFactory trait moved to hazmat module. (#79)MillerRabin::test_random_base() can now be equal to 2. (#79)Error enum; hazmat functions and method now return it instead of panicking. (#79)SmallPrimesSieveFactory to SmallFactorsSieveFactory. (#79)fips_is_prime() to its own fips submodule and renamed to is_prime. (#79)crypto-bigint to 0.7.0-pre.1 and MSRV to 1.85. (#80)crypto-bigint to 0.7.0-pre.2. (#84)crypto-bigint to 0.7.0-pre.4. (#85)LucasCheck::Regular (the recommended one from the FIPS-186.5 standard). (#72)hamzat::minimum_mr_iterations() (to calculate the number of MR checks according to the FIPS-186.5 standard). (#72)fips_is_prime_with_rng() and fips_is_safe_prime_with_rng(). (#72)estimate_primecount() – estimate the number of prime numbers smaller than x. (#81)Bumped rand-core to 0.9. ([#74])
rand-core to 0.9. (#74)crypto-bigint dependency bumped to 0.6.1.
crypto-bigint dependency bumped to 0.6.1.Relaxed CryptoRngCore bounds to allow ?Sized. ([#76])
CryptoRngCore bounds to allow ?Sized. (#76)Renamed Sieve to SmallPrimesSieve. ([#64])
Bumped crypto-bigint to 0.6.0-rc.6 and MSRV to 1.81. ([#55])
Bumped crypto-bigint to 0.6.0-rc.2 (and pinned, since there is a bug introduced in rc.3). ([#48])
crypto-bigint to 0.6.0-rc.2 (and pinned, since there is a bug introduced in rc.3).
(#48)Bumped crypto-bigint to 0.6.0-pre.7. ([#40])
crypto-bigint to 0.6.0-pre.7. (#40)MillerRabin::new() takes an Odd-wrapped integer by value. random_odd_uint() returns an Odd-wrapped integer. LucasBase::generate() takes an Odd-wrapped integer. lucas_test takes an Odd-wrapped integer. (#36)random_odd_uint() is renamed to random_odd_integer(), takes a NonZeroU32 for bit_length. (#38)u32 instead of usize. (#36)Integer trait instead of Uint specifically. (#38)bits_precision argument. (#40)Set and explicit MSRV 1.65 in Cargo.toml. ([#31])
subtle version requirement relaxed to the (implicit) 2.4, instead of technically requiring 2.5 to compile. ([#30])
subtle version requirement relaxed to the (implicit) 2.4, instead of technically requiring 2.5 to compile. (#30)Sieve::new() now panics when max_bit_length == 0 (which would lead to incorrect results anyway, so it is not considered a breaking change). ([#26])
getrandom is not an explicit dependency anymore. This may break builds with the wasm32-unknown-unknown target which relied on crypto-primes enabling the getrandom/js feature. These builds are advised to do it themselves. (#28)Sieve::new() now panics when max_bit_length == 0 (which would lead to incorrect results anyway, so it is not considered a breaking change). (#26)sieve_once() was removed ([#22]).
sieve_once() was removed (#22).MillerRabin::new() and test_random_base() will panic if the input is invalid. (#22)MillerRabin::check() renamed to test(). (#22)Option<usize> instead of usize, where None means the full size of the Uint. (#19)prime() to generate_prime(), safe_prime() to generate_safe_prime(), prime_with_rng() to generate_prime_with_rng(), safe_prime_with_rng() to generate_safe_prime_with_rng(). (#24)lucas_test(). (#20)Uint. (#19)Bumped MSRV to 1.65 (crypto-bigint requirement). ([#18])
crypto-bigint requirement). (#18)crypto-bigint to 0.5 with the corresponding changes in the API. (#13, #18)Sieve::new() now does not panic; if the parameters imply an empty output, that's what the iterator generates. (#14)RandomPrimeWithRng trait for use in generic code. (#12)[0.1.0]: https://github.com/entropyxyz/crypto-primes/releases/tag/v0.1.0 [0.2.0]: https://github.com/entropyxyz/crypto-primes/releases/tag/v0.2.0 [0.3
Initial release.
Your coding agent can read these notes before it upgrades. Set up the MCP server →