diff --git a/lib/common/Key.js b/lib/common/Key.js index 160d030..f13ad91 100644 --- a/lib/common/Key.js +++ b/lib/common/Key.js @@ -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;