mod_arithmetics
Fully qualified path: alexandria_math::mod_arithmetics
Free functions
| add_mod | Function that performs modular addition. Will panick if result is > u256 max… |
| mult_inverse | Function that return the modular multiplicative inverse. Disclaimer: this function should only be used with a prime modulo…. |
| add_inverse_mod | Function that return the modular additive inverse…. |
| sub_mod | Function that performs modular subtraction…. |
| mult_mod | Function that performs modular multiplication…. |
| u256_wide_sqr | Computes the square of a u256 value and returns the result as u512 to handle overflow This function performs wide multiplication to compute a^2 without losing precision,… |
| sqr_mod | Function that performs modular multiplication…. |
| div_mod | Function that performs modular division…. |
| pow_mod | Function that performs modular exponentiation…. |
| equality_mod | Checks if two u256 values are congruent modulo a given modulus This function computes whether a ≡ b (mod modulo) by comparing their remainders… |