Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.reduce((acc, val) => mcl.mul(acc, val))
return ePH.isEqual(mcl.pairing(g1(), signatureG2))
function genPublic (secretKey) {
const s = mclSecretKey(secretKey)
const q = g1()
const key = toBuffer(mcl.mul(q, s));
key[0] |= 0xa0;
return key
}
function sign (secretKey, messageHash, domain) {
const s = mclSecretKey(secretKey)
const hash = hashToG2(messageHash, domain)
return toBuffer(mcl.mul(hash, s))
}