From 1a0f41b9053ca472b11f5b5775a1bac867e5f477 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Wed, 14 Dec 2016 17:38:12 -0500 Subject: [PATCH] Correct error in fixed window exponentiation. If window size > 1, the result was incorrect :( GH #754 --- src/math/numbertheory/powm_fw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/numbertheory/powm_fw.cpp b/src/math/numbertheory/powm_fw.cpp index 8c6d7b65d3f..02dc0863589 100644 --- a/src/math/numbertheory/powm_fw.cpp +++ b/src/math/numbertheory/powm_fw.cpp @@ -31,7 +31,7 @@ void Fixed_Window_Exponentiator::set_base(const BigInt& base) g[1] = base; for(size_t i = 2; i != g.size(); ++i) - g[i] = reducer.multiply(g[i-1], g[0]); + g[i] = reducer.multiply(g[i-1], g[1]); } /*