bitcoinjs/bitcoinjs-lib — pull request #184 by dcousens (2014-05-17 05:04:25+00:00)
Title: ECDSA cleanup  

This final pull request completely restructures the `ecdsa` module to force users to always provide EC parameters.
This was previously ignored, and the entire `ecdsa` module was inherently only usable for the `sep256k1` curve only.

It also makes a few changes so that all functions have consistent parameter ordering, and the need to deal with serialized signatures is only forced on the user if they specifically use the serialization function (`ecdsa.sign` now returns the signature `r, s` values specifically).

Lastly, it correctly uses `ec.multiplyTwo`, which is the correctly implemented equivalent of `implShamirsTrick`, and is by default shipped with `JSBN`.

It is advised to review this commit by commit, as 77f92bc moves a lot of the functions around and is difficult to review.