aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/math/bigint/bigint.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-23 08:11:52 -0500
committerJack Lloyd <[email protected]>2018-02-23 08:11:52 -0500
commit6fbe80af97d6788f82ae3e570e7279801ca6d9bf (patch)
tree38a8598ad7ba7f4a08ba1338682b7d49128b2102 /src/lib/math/bigint/bigint.cpp
parente8bd6207f9de23c5a2709b9a8ad45cb5cf71beb3 (diff)
Minor optimizations in BigInt memory handling
Makes 4-6% difference for ECDSA
Diffstat (limited to 'src/lib/math/bigint/bigint.cpp')
-rw-r--r--src/lib/math/bigint/bigint.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp
index b63bd9be8..e5f8974d5 100644
--- a/src/lib/math/bigint/bigint.cpp
+++ b/src/lib/math/bigint/bigint.cpp
@@ -23,7 +23,7 @@ BigInt::BigInt(uint64_t n)
const size_t limbs_needed = sizeof(uint64_t) / sizeof(word);
- m_reg.resize(4*limbs_needed);
+ m_reg.resize(limbs_needed);
for(size_t i = 0; i != limbs_needed; ++i)
m_reg[i] = ((n >> (i*MP_WORD_BITS)) & MP_WORD_MASK);
}