bls, modular: lint

This commit is contained in:
Paul Miller 2023-08-18 21:09:53 +00:00
parent 1545230ee5
commit ca99179bd8
No known key found for this signature in database
GPG Key ID: 697079DA6878B89B
2 changed files with 1 additions and 2 deletions

@ -122,7 +122,6 @@ export function bls<Fp2, Fp6, Fp12>(
// 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

@ -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);
}