Browse Source

return comment to deterministicK

patch-2
Manuel Araoz 10 years ago
parent
commit
225ade6c7a
  1. 3
      lib/crypto/ecdsa.js

3
lib/crypto/ecdsa.js

@ -75,6 +75,9 @@ ECDSA.prototype.randomK = function() {
// https://tools.ietf.org/html/rfc6979#section-3.2 // https://tools.ietf.org/html/rfc6979#section-3.2
ECDSA.prototype.deterministicK = function(badrs) { ECDSA.prototype.deterministicK = function(badrs) {
/* jshint maxstatements: 25 */ /* jshint maxstatements: 25 */
// if r or s were invalid when this function was used in signing,
// we do not want to actually compute r, s here for efficiency, so,
// we can increment badrs. explained at end of RFC 6979 section 3.2
if (_.isUndefined(badrs)) { if (_.isUndefined(badrs)) {
badrs = 0; badrs = 0;
} }

Loading…
Cancel
Save