bitcoinjs/bitcoinjs-lib — pull request #89 by Dcousens (2014-03-24 17:48:50+00:00)
Title: Adds ECPubKey.verify and tests for ECKey signing

The following pull request adds `ECPubKey.verify` functions for checking a signature.

It also moves the `ECKey.[sign/verify]` functions to the relevant section of the code in `eckey.js`.
Of interest is the following test case:

```
it('should not verify against the wrong private key', function() {
var priv1 = new ECKey(hpriv)
var priv2 = new ECKey('1111111111111111111111111111111111111111111111111111111111111111')

var signature = priv1.sign(message)

assert.fail(priv2.verify(message, signature))
})
```

I have not investigated this yet, but have added it in this pull request, to be resolved.

```
1 failing

1) ECKey signing should not verify against the wrong private key:
AssertionError: false undefined "undefined"
at Context. (/home/-/bitcoinjs-lib/test/eckey.js:168:16)
...
```