diff --git a/src/abstract/bls.ts b/src/abstract/bls.ts index fd56d6e..ba4b6b0 100644 --- a/src/abstract/bls.ts +++ b/src/abstract/bls.ts @@ -122,7 +122,6 @@ export function bls( // Fields are specific for curve, so for now we'll need to pass them with opts const { Fp, Fr, Fp2, Fp6, Fp12 } = CURVE.fields; const BLS_X_LEN = bitLen(CURVE.params.x); - const groupLen = 32; // TODO: calculate; hardcoded for now // Pre-compute coefficients for sparse multiplication // Point addition and point double calculations is reused for coefficients diff --git a/src/abstract/modular.ts b/src/abstract/modular.ts index 285a6b3..29cb64f 100644 --- a/src/abstract/modular.ts +++ b/src/abstract/modular.ts @@ -459,5 +459,5 @@ export function mapHashToField(key: Uint8Array, fieldOrder: bigint, isLE = false const num = isLE ? bytesToNumberBE(key) : bytesToNumberLE(key); // `mod(x, 11)` can sometimes produce 0. `mod(x, 10) + 1` is the same, but no 0 const reduced = mod(num, fieldOrder - _1n) + _1n; - return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen) + return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen); }