diff --git a/lib/elliptic/utils.js b/lib/elliptic/utils.js index 627a9f1..568a3e2 100644 --- a/lib/elliptic/utils.js +++ b/lib/elliptic/utils.js @@ -14,7 +14,9 @@ utils.encode = minUtils.encode; // Represent num in a w-NAF form function getNAF(num, w, bits) { var naf = new Array(Math.max(num.bitLength(), bits) + 1); - naf.fill(0); + for (var i = 0; i < naf.length; i += 1) { + naf[i] = 0; + } var ws = 1 << (w + 1); var k = num.clone();