diff options
author | Jack Lloyd <[email protected]> | 2018-06-14 13:36:33 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-06-14 13:36:33 -0400 |
commit | 18755f6f94fc6378fa91b1fcab9765ae82d1290c (patch) | |
tree | 696167eb19984c966c7614c45e135e6c3fad88b3 /src/lib/pubkey/ec_group/point_mul.cpp | |
parent | 49456a1d149d3aecad3801db5776ee8fd4108e41 (diff) |
Avoid overallocation of memory for EC base point multiples
The size is rounded up to next 8 words so there was substantial
slack here.
No noticable perf difference.
Diffstat (limited to 'src/lib/pubkey/ec_group/point_mul.cpp')
-rw-r--r-- | src/lib/pubkey/ec_group/point_mul.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/ec_group/point_mul.cpp b/src/lib/pubkey/ec_group/point_mul.cpp index 17087a6ed..c6014f81d 100644 --- a/src/lib/pubkey/ec_group/point_mul.cpp +++ b/src/lib/pubkey/ec_group/point_mul.cpp @@ -43,7 +43,7 @@ PointGFp_Base_Point_Precompute::PointGFp_Base_Point_Precompute(const PointGFp& b const Modular_Reducer& mod_order) : m_base_point(base), m_mod_order(mod_order), - m_p_words(base.get_curve().get_p().size()), + m_p_words(base.get_curve().get_p().sig_words()), m_T_size(base.get_curve().get_p().bits() + PointGFp_SCALAR_BLINDING_BITS + 1) { std::vector<BigInt> ws(PointGFp::WORKSPACE_SIZE); |