def decompress_y

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/secp256k1/curve.bend:271

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/curve.bend as Curve
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as FS

271def decompress_y(+p: Nat, +x: Nat, +par: Nat, +y: Nat) -> Maybe<&2, SPoint>:
272  decompress_if(x, pick_parity(p, y, par), Nat.is_eq(FS.mmul(p, y, y), rhs(p, x)))

Uses (8)

Used by (1)