From 18755f6f94fc6378fa91b1fcab9765ae82d1290c Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 14 Jun 2018 13:36:33 -0400 Subject: 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. --- src/lib/pubkey/ec_group/point_mul.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 ws(PointGFp::WORKSPACE_SIZE); -- cgit v1.2.3