bitcoin/secp256k1 — pull request #134 by sipa (2014-12-03 17:31:44+00:00)
Title: Make scalar_add_bit test's overflow detection exact

The current test does not detect an addition that would end up between the order and 2^256, and very occasionally makes the unit tests fail.

Do the overflow detection in secp256k1_scalar_add instead, where it can trivially be exact, and use that. Add some bounds checking too.