Skip to main content

Module backend

Module backend 

Expand description

Abstract big integer backend. This module makes no guarantees of applicability, all methods are considered internal, except for conversion functions:

Likewise, the serde serialization format is also well-defined and stable, even compatible with older versions of this library.

To select a backend, use a feature flag:

  • backend-num-bigint (default) - use num-bigit
  • backend-rug - use rug

When both features are enabled at once, num-bigint is used

Modules§

num_bigintbackend-num-bigint
rugbackend-rug

Structs§

Integer
Big integer type used in this crate

Enums§

IsPrime
Whether a number is prime. See Integer::is_probably_prime method
Sign
Sign of a number, to distinguish positives and zero from negatives

Functions§

sieve_generate_safe_primes
Generate a random safe prime with a given sieve parameter.