bitpay/bitcore — pull request #289 by ryanxcharles (2014-04-24 22:56:02+00:00)
Title: Sign with SecureRandom

ECDSA signing requires the use of a random number (k). We had been using a non-secure random number in this place. This PR updates the random number used for signing to use the new SecureRandom class which does good secure random number generation, and throws an error if there is not enough entropy.

I've also updated the rng.js vendor bundle so that it actually throws an error if you try to use it. That way we can be sure there is no code using the old RNG.

Some things we still need to do are:
* Remove all the bitcoinjs-lib ECDSA code.
* Expose all the js ECDSA code and link to the OpenSSL equivalents in node and provide a consistent interface between node/browser.

This PR is related to the ongoing work of improving the crypto interface of bitcore: https://github.com/bitpay/bitcore/issues/186