Browse Source

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

k should be 32 bytes, not 8 bytes
patch-2
Manuel Aráoz 11 years ago
parent
commit
3b60170e9f
  1. 3
      lib/common/Key.js

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

Loading…
Cancel
Save