proofs/crypto/secp256k1/laws_recover.bend
bend-collections-laws-crypto@1.0.0.0 · 33 lines · 2 definitions
1import Base
2import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1.bend as K
3import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as ES
4import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/schnorr.bend as SS
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21law Recover.correct:
22 for +one: Nat
23 for +h1: {one == 1n : Nat}
24 for +h: List<&2, U32>
25 for +sig: List<&2, U32>
26 {K.recover(h, sig) == ES.recover(one, h, sig) : Maybe<&2, List<&2, U32>>}
27
28
29law Ecrecover.correct:
30 for +one: Nat
31 for +h1: {one == 1n : Nat}
32 for +input: List<&2, U32>
33 {K.ecrecover(input) == ES.ecrecover(one, input) : Maybe<&2, List<&2, U32>>}