def verify_aff
bend-collections-laws-crypto@1.0.0.0 · src/crypto/secp256k1/schnorr.bend:46
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/schnorr.bend as Schnorr
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field.bend as F
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/point.bend as P
46def verify_aff(+r: List<&2, Nat>, inf: Bool, a: P.Affine) -> Bool:
47 match a:
48 case P.Affine{x, +y}: Bool.and(Bool.not(inf), Bool.and(Nat.is_eq(is_odd(y), 0n), F.eq(x, r)))