@@ -4,13 +4,13 @@ use rand::{rngs::OsRng, CryptoRng, Rng};
44use sigma_rs:: toolbox:: sigma:: { proof_composition:: OrEnum , AndProtocol , OrProtocol , SigmaProtocol } ;
55use curve25519_dalek:: { ristretto:: RistrettoPoint , scalar:: Scalar } ;
66
7- pub struct LokZkpSchnorr {
7+ pub struct SchnorrZkp {
88 pub generator : RistrettoPoint ,
99 pub target : RistrettoPoint
1010}
1111
1212#[ allow( non_snake_case) ]
13- impl SigmaProtocol for LokZkpSchnorr {
13+ impl SigmaProtocol for SchnorrZkp {
1414 type Witness = Scalar ;
1515 type Commitment = RistrettoPoint ;
1616 type ProverState = ( Scalar , Scalar ) ;
@@ -79,8 +79,8 @@ fn andproof_schnorr_correct() {
7979 let H1 = w1 * G1 ;
8080 let H2 = w2 * G2 ;
8181
82- let p1 = LokZkpSchnorr { generator : G1 , target : H1 } ;
83- let p2 = LokZkpSchnorr { generator : G2 , target : H2 } ;
82+ let p1 = SchnorrZkp { generator : G1 , target : H1 } ;
83+ let p2 = SchnorrZkp { generator : G2 , target : H2 } ;
8484
8585 let and_proof = AndProtocol :: new ( p1, p2) ;
8686
@@ -116,8 +116,8 @@ fn andproof_schnorr_incorrect() {
116116 let H1 = w1 * G1 ;
117117 let H2 = w2 * G2 ;
118118
119- let p1 = LokZkpSchnorr { generator : G1 , target : H1 } ;
120- let p2 = LokZkpSchnorr { generator : G2 , target : H2 } ;
119+ let p1 = SchnorrZkp { generator : G1 , target : H1 } ;
120+ let p2 = SchnorrZkp { generator : G2 , target : H2 } ;
121121
122122 let and_proof = AndProtocol :: new ( p1, p2) ;
123123
@@ -151,8 +151,8 @@ fn orproof_schnorr_correct() {
151151 let H1 = w1 * G1 ;
152152 let H2 = RistrettoPoint :: random ( & mut rng) ; // The witness for this point is unknown
153153
154- let p1 = LokZkpSchnorr { generator : G1 , target : H1 } ;
155- let p2 = LokZkpSchnorr { generator : G2 , target : H2 } ;
154+ let p1 = SchnorrZkp { generator : G1 , target : H1 } ;
155+ let p2 = SchnorrZkp { generator : G2 , target : H2 } ;
156156
157157 let or_proof = OrProtocol :: new ( p1, p2) ;
158158
@@ -186,8 +186,8 @@ fn orproof_schnorr_incorrect() {
186186 let H1 = RistrettoPoint :: random ( & mut rng) ; // The witness for this point is unknown
187187 let H2 = RistrettoPoint :: random ( & mut rng) ; // The witness for this point is unknown
188188
189- let p1 = LokZkpSchnorr { generator : G1 , target : H1 } ;
190- let p2 = LokZkpSchnorr { generator : G2 , target : H2 } ;
189+ let p1 = SchnorrZkp { generator : G1 , target : H1 } ;
190+ let p2 = SchnorrZkp { generator : G2 , target : H2 } ;
191191
192192 let or_proof = OrProtocol :: new ( p1, p2) ;
193193
0 commit comments