Skip to content

Commit

Permalink
Correct error in fixed window exponentiation.
Browse files Browse the repository at this point in the history
If window size > 1, the result was incorrect :(

GH #754
  • Loading branch information
randombit committed Dec 14, 2016
1 parent 1eb0252 commit 1a0f41b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/math/numbertheory/powm_fw.cpp
Expand Up @@ -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]);
}

/*
Expand Down

0 comments on commit 1a0f41b

Please sign in to comment.