crypto_bigint

Module prelude

source
Expand description

Import prelude for this crate: includes important traits.

Enums§

Traits§

  • Compute self + rhs mod p.
  • ArrayDecodinghybrid-array
    Support for decoding a Array as a big integer.
  • ArrayEncodinghybrid-array
    Support for encoding a big integer as a Array.
  • 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.
  • Randomrand_core
    Random number generation support.
  • RandomBitsrand_core
    Random bits generation support.
  • RandomModrand_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.