Function bls_on_arkworks::verify
source · pub fn verify(
pk: &PublicKey,
message: &Octets,
signature: &Signature,
dst: &Octets
) -> bool
Expand description
(spec link) Checks that a signature is valid for the octet string message under the public key PK.
Implementation:
1. R = signature_to_point(signature)
2. If R is INVALID, return INVALID
3. If signature_subgroup_check(R) is INVALID, return INVALID
4. If KeyValidate(PK) is INVALID, return INVALID
5. xP = pubkey_to_point(PK)
6. Q = hash_to_point(message)
7. C1 = pairing(Q, xP)
8. C2 = pairing(R, P)
9. If C1 == C2, return VALID, else return INVALID
XXX: this function doesn’t take DST as an argument in the spec. It should!