Expand description
Import prelude for this crate: includes important traits.
Enums§
- Decode
Error - Possible errors in variable-time integer decoding methods.
- Random
Bits Error rand_core
- Possible errors of the methods in
RandomBits
trait.
Traits§
- AddMod
- Compute
self + rhs mod p
. - Array
Decoding hybrid-array
- Support for decoding a
Array
as a big integer. - Array
Encoding hybrid-array
- Support for encoding a big integer as a
Array
. - BitOps
- Bit counting and bit operations.
- Bounded
- Integers whose representation takes a bounded amount of space.
- Checked
Add - Checked addition.
- Checked
Div - Checked division.
- Checked
Mul - Checked multiplication.
- Checked
Sub - Checked subtraction.
- Concat
- Concatenate two numbers into a “wide” double-width value, using the
hi
value as the most significant portion of the resulting value. - Concat
Mixed - Concatenate two numbers into a “wide” combined-width value, using the
hi
value as the most significant value. - Const
Zero - Defines an associated constant representing the additive identity element
for
Self
. - Constant
Time Select - Trait for types which are conditionally selectable in constant time.
- Constants
- Trait for associating constant values with a type.
- DivRem
Limb - Support for optimized division by a single limb.
- Encoding
- Encoding support.
- Fixed
Integer - Fixed-width integers.
- Gcd
- Compute the greatest common divisor of two integers.
- Integer
- Integer trait: represents common functionality of integer types provided by this crate.
- InvMod
- Compute
1 / self mod p
. - Invert
- Constant-time inversion.
- Inverter
- Trait impl’d by precomputed modular inverters obtained via the
PrecomputeInverter
trait. - Monty
- A representation of an integer optimized for the performance of modular operations.
- MulMod
- Compute
self * rhs mod p
. - Multi
Exponentiate - Performs modular multi-exponentiation using Montgomery’s ladder.
- Multi
Exponentiate Bounded Exp - Performs modular multi-exponentiation using Montgomery’s ladder.
exponent_bits
represents the number of bits to take into account for the exponent. - NegMod
- Compute
-self mod p
. - Pow
- Constant-time exponentiation.
- PowBounded
Exp - Constant-time exponentiation with exponent of a bounded bit size.
- Precompute
Inverter - 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.
- RemLimb
- Support for optimized division by a single limb.
- RemMixed
- Support for calculating the remainder of two differently sized integers.
- ShlVartime
- Left shifts, variable time in
shift
. - ShrVartime
- Right shifts, variable time in
shift
. - Split
- Split a number in half, returning the least significant half followed by the most significant.
- Split
Mixed - Split a number into parts, returning the least significant part followed by the most significant.
- Square
- Support for optimized squaring
- Square
Assign - Support for optimized squaring in-place
- Square
Root - Support for calucaling square roots.
- SubMod
- Compute
self - rhs mod p
. - Widening
Mul - Widening multiply: returns a value with a number of limbs equal to the sum of the inputs.
- Wrapping
Add - Performs addition that wraps around on overflow.
- Wrapping
Mul - Performs multiplication that wraps around on overflow.
- Wrapping
Neg - Performs a negation that does not panic.
- Wrapping
Shl - Performs a left shift that does not panic.
- Wrapping
Shr - Performs a right shift that does not panic.
- Wrapping
Sub - Performs subtraction that wraps around on overflow.
- Zero
- Zero values.