Merge pull request #482 from ryanxcharles/bug/k-too-small
k should be 32 bytes, not 8 bytes
This commit is contained in:
commit
3b60170e9f
|
@ -159,7 +159,8 @@ Key.calcPubKeyRecoveryParam = function(e, r, s, Q) {
|
|||
|
||||
Key.genk = function() {
|
||||
//TODO: account for when >= n
|
||||
return new bignum(SecureRandom.getRandomBuffer(8));
|
||||
var k = new bignum(SecureRandom.getRandomBuffer(32))
|
||||
return k;
|
||||
};
|
||||
|
||||
module.exports = Key;
|
||||
|
|
Loading…
Reference in New Issue