From 27530769de146d035e93caa608f7da14878b733d Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 May 2023 13:56:01 +0200 Subject: [PATCH] sqrt formular improvements --- src/math/gallois.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/math/gallois.rs b/src/math/gallois.rs index 5a7e1e5..1ca7428 100644 --- a/src/math/gallois.rs +++ b/src/math/gallois.rs @@ -196,6 +196,7 @@ impl GalloisFiled { for index in 0..l { // l-(i+1) tmp = l - (index+1); + tmp = modexp::modular_exponentiation_wrapper(2, tmp, self.base, false); c[index as usize] = a.pow(2u32.pow((self.reduce(l as u128 - (index as u128 + 1)) * t) as u32) as u32) * b.pow(n[index as usize] as u32); if self.verbose { println!("{index}.\tc_{index} = {}", c[index as usize]);