Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: a52eb04aaabfb7f6ec03b8cdab8a432b58fd3862
      
https://github.com/btcsuite/btcd/commit/a52eb04aaabfb7f6ec03b8cdab8a432b58fd3862
  Author: Dave Collins <da...@conformal.com>
  Date:   2016-10-18 (Tue, 18 Oct 2016)

  Changed paths:
    M btcec/field.go

  Log Message:
  -----------
  btcec: Ensure reduction when > P in all cases.

As noted in issue #706, the existing code had an issue where the
normalized result was > P when both the first and second words of the
field representation being normalized were BOTH greater than or equal to
the first and second words of P.  Although this condition is rare in
practice, it needs to be handled properly.

This resolves the issue by comparing the low words in the final
reduction step against the normalized low order prime bits to ensure the
final subtraction occurs correctly any time they're > P.  This approach
retains the constant time property as well.


  Commit: 294b5d46da4ea05bc0df80e4a6b5f46c6ca9c8cb
      
https://github.com/btcsuite/btcd/commit/294b5d46da4ea05bc0df80e4a6b5f46c6ca9c8cb
  Author: Jimmy Song <jaej...@gmail.com>
  Date:   2016-10-18 (Tue, 18 Oct 2016)

  Changed paths:
    M btcec/field_test.go

  Log Message:
  -----------
  btcec: Add regression tests for field.go.

This adds new tests to the TestNormalize, TestMul, TestAdd2 functions
which trigger an issue with modular reduction that was fixed in the
prevous commit to prevent regressions.


Compare: https://github.com/btcsuite/btcd/compare/d009185a5693...294b5d46da4e

Reply via email to