Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

sqr_mod

Function that performs modular multiplication.

Arguments

  • a - Left hand side of multiplication.
  • b - Right hand side of multiplication.
  • modulo - modulo.

Returns

  • u256 - result of modular multiplication

Fully qualified path: alexandria_math::mod_arithmetics::sqr_mod

pub fn sqr_mod(a: u256, mod_non_zero: NonZero<u256>) -> u256