Skip to main content

Module int

Module int 

Source
Expand description

Stack-allocated big signed integers.

ModulesΒ§

add πŸ”’
Int addition operations.
bit_and πŸ”’
Int bitwise AND operations.
bit_not πŸ”’
Int bitwise NOT operations.
bit_or πŸ”’
Int bitwise OR operations.
bit_xor πŸ”’
Int bitwise XOR operations.
cmp πŸ”’
Int comparisons.
ct πŸ”’
Constant-time support: impls of Ct* traits and constant-time const fn operations.
div πŸ”’
Int division operations.
div_unsigned πŸ”’
Operations related to dividing an Int by a Uint.
encoding πŸ”’
Const-friendly decoding/encoding operations for Int.
from πŸ”’
From-like conversions for Int.
gcd πŸ”’
This module implements (a constant variant of) the Optimized Extended Binary GCD algorithm, which is described by Pornin in β€œOptimized Binary GCD for Modular Inversion”. Ref: https://eprint.iacr.org/2020/972.pdf
invert_mod πŸ”’
Operations related to computing the inverse of an Int modulo a Uint.
mod_symbol πŸ”’
Support for computing modular symbols.
mul πŸ”’
Int multiplication operations.
mul_unsigned πŸ”’
neg πŸ”’
Int negation-related operations.
rand πŸ”’
Random number generator support
resize πŸ”’
shl πŸ”’
Int bitwise left shift operations.
shr πŸ”’
Int bitwise right shift operations.
sign πŸ”’
sqrt πŸ”’
Int square root operations.
sub πŸ”’
Int subtraction operations.
types πŸ”’
Selection of Int types. todo: replace with macro implementation once serde is set up.

StructsΒ§

Int
Stack-allocated big signed integer. See Uint for unsigned integers.