calcPubKeyRecoveryParam static method
Find the public key recovery factor
Implementation
static int calcPubKeyRecoveryParam(BigInt e, ECSignature ecSig, AMAXPublicKey publicKey) {
for (int i = 0; i < 4; i++) {
ECPoint? Qprime = recoverPubKey(e, ecSig, i);
if (Qprime == publicKey.q) {
return i;
}
}
throw 'Unable to find valid recovery factor';
}