def recover_x

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/secp256k1/ecdsa.bend:222

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as Ecdsa
import Base

222def recover_x(+one: Nat, +e: Nat, +r: Nat, +s: Nat, +id: Nat) -> Maybe<&2, List<&2, U32>>:
223  +x = Nat.add(r, Nat.mul(Nat.div(id, 2n), n(one)))
224  recover_x_if(one, e, r, s, id, x, Nat.is_lt(x, p(one)))

Uses (11)

Used by (1)