diff options
author | Jack Lloyd <[email protected]> | 2016-02-01 12:37:11 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-02-01 13:06:10 -0500 |
commit | 87a59dd0ea8a783540d30bb697b4c86d9b66f7ee (patch) | |
tree | bf2c62842fe9c945bbb6a2546340a51506170fce /src/lib | |
parent | fb22198b9add1f1d46d6b05cc8626b7a8d8ff9c6 (diff) |
Fix two bugs in 1.11.27 which caused test failures.1.11.28
The check on each individual size in curve_mul is too strict since
we rely on redc(x*1) during the on the curve computation.
Fix an off by one in ressol which caused it to occasionally reject
valid values.
Updating version 1.11.28 since existing 1.11.27 tag already pushed :(
Fix an off-by-one in ressol which would cause it to occasionly
give up too early.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/math/ec_gfp/curve_gfp.cpp | 3 | ||||
-rw-r--r-- | src/lib/math/numbertheory/ressol.cpp | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/math/ec_gfp/curve_gfp.cpp b/src/lib/math/ec_gfp/curve_gfp.cpp index 52e5b0b56..9bf2191c6 100644 --- a/src/lib/math/ec_gfp/curve_gfp.cpp +++ b/src/lib/math/ec_gfp/curve_gfp.cpp @@ -83,9 +83,6 @@ void CurveGFp_Montgomery::curve_mul(BigInt& z, const BigInt& x, const BigInt& y, const size_t x_sw = x.sig_words(); const size_t y_sw = y.sig_words(); - BOTAN_ASSERT(x_sw <= m_p_words, "Input in range"); - BOTAN_ASSERT(y_sw <= m_p_words, "Input in range"); - const size_t output_size = 2*m_p_words + 1; ws.resize(2*(m_p_words+2)); diff --git a/src/lib/math/numbertheory/ressol.cpp b/src/lib/math/numbertheory/ressol.cpp index 875d054c3..127dc899e 100644 --- a/src/lib/math/numbertheory/ressol.cpp +++ b/src/lib/math/numbertheory/ressol.cpp @@ -66,7 +66,7 @@ BigInt ressol(const BigInt& a, const BigInt& p) q = mod_p.square(q); ++i; - if(s >= i) + if(i > s) { return -BigInt(1); } |