Merge pull request #482 from ryanxcharles/bug/k-too-small

k should be 32 bytes, not 8 bytes
This commit is contained in:
Manuel Aráoz 2014-08-11 17:07:11 -03:00
commit 3b60170e9f
1 changed files with 2 additions and 1 deletions

View File

@ -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;