bitcoinjs/bitcoinjs-lib — pull request #250 by dcousens (2014-07-29 13:50:36+00:00)
Title: Negative R,S value checking

This pull request enforces across all the ECDSA functions that interact with a signature, that it is validated first by enforcing that the `r` and `s` values are within the correct range.
The error checking previously had been written with the assumption that `r` and `s` are always positive, which is a valid assumption in the correct use case, but may be a problem if anyone is blindly accepting `ECSignature`s in their program.

I also added further tests for `recoverPubKey` in terms of the exceptions it throws.