Expand description
Import prelude for this crate: includes important traits.
Enums§
- Possible errors in variable-time integer decoding methods.
- Random
Bits Error rand_core
Possible errors of the methods inRandomBits
trait.
Traits§
- Compute
self + rhs mod p
. - Array
Decoding hybrid-array
Support for decoding aArray
as a big integer. - Array
Encoding hybrid-array
Support for encoding a big integer as aArray
. - Bit counting and bit operations.
- Integers whose representation takes a bounded amount of space.
- Checked addition.
- Checked division.
- Checked multiplication.
- Checked subtraction.
- Concatenate two numbers into a “wide” double-width value, using the
hi
value as the most significant portion of the resulting value. - Concatenate two numbers into a “wide” combined-width value, using the
hi
value as the most significant value. - Defines an associated constant representing the additive identity element for
Self
. - Trait for types which are conditionally selectable in constant time.
- Trait for associating constant values with a type.
- Support for optimized division by a single limb.
- Encoding support.
- Fixed-width integers.
- Compute the greatest common divisor of two integers.
- Integer trait: represents common functionality of integer types provided by this crate.
- Compute
1 / self mod p
. - Constant-time inversion.
- Trait impl’d by precomputed modular inverters obtained via the
PrecomputeInverter
trait. - A representation of an integer optimized for the performance of modular operations.
- Compute
self * rhs mod p
. - Performs modular multi-exponentiation using Montgomery’s ladder.
- Performs modular multi-exponentiation using Montgomery’s ladder.
exponent_bits
represents the number of bits to take into account for the exponent. - Compute
-self mod p
. - Constant-time exponentiation.
- Constant-time exponentiation with exponent of a bounded bit size.
- Obtain a precomputed inverter for efficiently computing modular inversions for a given modulus.
- Random
rand_core
Random number generation support. - Random
Bits rand_core
Random bits generation support. - Random
Mod rand_core
Modular random number generation support. - Support for optimized division by a single limb.
- Left shifts, variable time in
shift
. - Right shifts, variable time in
shift
. - Split a number in half, returning the least significant half followed by the most significant.
- Split a number into parts, returning the least significant part followed by the most significant.
- Support for optimized squaring
- Support for optimized squaring in-place
- Support for calucaling square roots.
- Compute
self - rhs mod p
. - Widening multiply: returns a value with a number of limbs equal to the sum of the inputs.
- Performs addition that wraps around on overflow.
- Performs multiplication that wraps around on overflow.
- Performs a negation that does not panic.
- Performs a left shift that does not panic.
- Performs a right shift that does not panic.
- Performs subtraction that wraps around on overflow.
- Zero values.