diff options
-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); |