proofs/crypto/secp256k1/proof_recover.bend

bend-collections-laws-crypto@1.0.0.0 · 14 lines · 0 definitions

1import Base
2import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/laws_recover.bend as Laws
3import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/prec.bend as PR
4import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/pecr.bend as PEC
5
6# Public key recovery and Ethereum's ECRECOVER precompile of
7# src/crypto/secp256k1.bend (laws.bend Recover.correct, Ecrecover.correct):
8# `bend proofs/crypto/secp256k1/proof_recover.bend`.
9
10def Laws.Recover.correct(one, h1, h, sig):
11  PR.recover_v(one, h1, h, sig)
12
13def Laws.Ecrecover.correct(one, h1, input):
14  PEC.ecrecover_v(one, h1, input)