diff options
author | Jack Lloyd <[email protected]> | 2018-11-27 11:32:34 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-11-27 11:32:34 -0500 |
commit | cf91494b524b241d8c3db5b797667c803ac6d9dd (patch) | |
tree | 10de78c9d0f928dc34f63e73d9c5abf1ee7cc0b3 /src/lib/math/numbertheory/nistp_redc.cpp | |
parent | 3655faa31fd52a1c624f142420ea5c61a170688b (diff) |
Need to ensure minimum size here
Previously handled by the early exit
Diffstat (limited to 'src/lib/math/numbertheory/nistp_redc.cpp')
-rw-r--r-- | src/lib/math/numbertheory/nistp_redc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/math/numbertheory/nistp_redc.cpp b/src/lib/math/numbertheory/nistp_redc.cpp index 1c7afadc5..a74c4de9f 100644 --- a/src/lib/math/numbertheory/nistp_redc.cpp +++ b/src/lib/math/numbertheory/nistp_redc.cpp @@ -32,6 +32,7 @@ void redc_p521(BigInt& x, secure_vector<word>& ws) bigint_shr2(ws.data(), x.data(), std::min(x.size(), 2*p_words), p_full_words, p_top_bits); x.mask_bits(521); + x.grow_to(p_words); // Word-level carry will be zero word carry = bigint_add3_nc(x.mutable_data(), x.data(), p_words, ws.data(), p_words); |