aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-25 18:18:49 -0500
committerJack Lloyd <[email protected]>2018-02-25 18:18:49 -0500
commit2ccc0c1efb44c8756b346ba5874c219790b606cf (patch)
tree61b9f3aa1cdfc7a62fa758d2b4604a2a3b964d1b /src/lib/math/bigint
parent8c3ce8fba6802b821ce1307e3ca10b06d82a04ce (diff)
Use reduce_below in PointGFp
Improves ECDSA times by 2-3%
Diffstat (limited to 'src/lib/math/bigint')
-rw-r--r--src/lib/math/bigint/bigint.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp
index 50e93c38d..c822a94e1 100644
--- a/src/lib/math/bigint/bigint.cpp
+++ b/src/lib/math/bigint/bigint.cpp
@@ -260,6 +260,8 @@ void BigInt::reduce_below(const BigInt& p, secure_vector<word>& ws)
if(ws.size() < p_words + 1)
ws.resize(p_words + 1);
+ clear_mem(ws.data(), ws.size());
+
for(;;)
{
word borrow = bigint_sub3(ws.data(), data(), p_words + 1, p.data(), p_words);