proofs/crypto/secp256k1/laws_schnorr.bend
bend-collections-laws-crypto@1.0.0.0 · 41 lines · 3 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 SchnorrPubkey.correct:
22 for +one: Nat
23 for +h1: {one == 1n : Nat}
24 for +sk: List<&2, U32>
25 {K.schnorr_pubkey(sk) == SS.pubkey(one, sk) : Maybe<&2, List<&2, U32>>}
26
27law SchnorrSign.correct:
28 for +one: Nat
29 for +h1: {one == 1n : Nat}
30 for +sk: List<&2, U32>
31 for +msg: List<&2, U32>
32 for +aux: List<&2, U32>
33 {K.schnorr_sign(sk, msg, aux) == SS.sign(one, sk, msg, aux) : Maybe<&2, List<&2, U32>>}
34
35law SchnorrVerify.correct:
36 for +one: Nat
37 for +h1: {one == 1n : Nat}
38 for +pk: List<&2, U32>
39 for +msg: List<&2, U32>
40 for +sig: List<&2, U32>
41 {K.schnorr_verify(pk, msg, sig) == SS.verify(one, pk, msg, sig) : Bool}