def ecrecover_in

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

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

323def ecrecover_in(+one: Nat, +x: List<&2, U32>) -> Maybe<&2, List<&2, U32>>:
324  +vw = CV.first(32n, CV.after(32n, x))
325  +v = CV.head(CV.after(31n, vw))
326  ecrecover_v(one, CV.first(32n, x), CV.after(64n, x), v, Bool.and(all_zero(CV.first(31n, vw)), Bool.or(U32.is_eq(v, 27), U32.is_eq(v, 28))))

Uses (12)

Used by (1)