From 32ed5e385ac1f9fe3cbc7c76f2b61a46f25271a3 Mon Sep 17 00:00:00 2001 From: jotabulacios Date: Fri, 20 Dec 2024 16:53:55 -0300 Subject: [PATCH] rename function --- math/src/field/fields/u32_montgomery_backend_prime_field.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/math/src/field/fields/u32_montgomery_backend_prime_field.rs b/math/src/field/fields/u32_montgomery_backend_prime_field.rs index 3e1eb3885..90afc96bb 100644 --- a/math/src/field/fields/u32_montgomery_backend_prime_field.rs +++ b/math/src/field/fields/u32_montgomery_backend_prime_field.rs @@ -265,7 +265,7 @@ impl MontgomeryAlgorithms { /// /// Converts a value from Montgomery domain using reductions mod p #[inline(always)] - const fn monty_reduce(x: u64, mu: &u32, q: &u32) -> u32 { + const fn montgomery_reduction(x: u64, mu: &u32, q: &u32) -> u32 { let t = x.wrapping_mul(*mu as u64) & (u32::MAX as u64); let u = t * (*q as u64); let (x_sub_u, over) = x.overflowing_sub(u); @@ -277,7 +277,7 @@ impl MontgomeryAlgorithms { #[inline(always)] pub const fn mul(a: &u32, b: &u32, q: &u32, mu: &u32) -> u32 { let x = *a as u64 * *b as u64; - Self::monty_reduce(x, mu, q) + Self::montgomery_reduction(x, mu, q) } pub fn exp_power_of_2(a: &u32, power_log: usize, q: &u32, mu: &u32) -> u32 {