k should be 32 bytes, not 8 bytes
@ -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;