diff --git a/src/math/src/mod_arithmetics.cairo b/src/math/src/mod_arithmetics.cairo index 106c1985..9b7ec186 100644 --- a/src/math/src/mod_arithmetics.cairo +++ b/src/math/src/mod_arithmetics.cairo @@ -146,7 +146,7 @@ pub fn pow_mod(mut base: u256, mut pow: u256, mod_non_zero: NonZero) -> u2 result = mult_mod(result, base, mod_non_zero); } pow = q; - base = mult_mod(base, base, mod_non_zero); + base = sqr_mod(base, mod_non_zero); }; result