diff --git a/src/engine_multiexp.js b/src/engine_multiexp.js index 3db5ac4..38d813f 100644 --- a/src/engine_multiexp.js +++ b/src/engine_multiexp.js @@ -110,6 +110,7 @@ export default function buildMultiexp(curve, groupName) { } const nPoints = Math.floor(buffBases.byteLength / sGIn); + if (nPoints == 0) return G.zero; const sScalar = Math.floor(buffScalars.byteLength / nPoints); if( sScalar * nPoints != buffScalars.byteLength) { throw new Error("Scalar size does not match");