return comment to deterministicK

This commit is contained in:
Manuel Araoz 2014-12-22 17:33:00 -03:00
parent bf09710110
commit 225ade6c7a
1 changed files with 3 additions and 0 deletions

View File

@ -75,6 +75,9 @@ ECDSA.prototype.randomK = function() {
// https://tools.ietf.org/html/rfc6979#section-3.2
ECDSA.prototype.deterministicK = function(badrs) {
/* 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)) {
badrs = 0;
}