15
15
//!
16
16
//! Thus using the protocols for scalar multiplication and point addition, the prover proves:
17
17
//! - Given commitments to `z` and `-z*R`, the scalar multiplication of `z` and `-R` is indeed `-z*R`
18
- //! - Given commitments to `q` and `-z*R`, the sum of `q` and `-z*R` is indeed `-g*t*r^-1`
18
+ //! - Given commitments to `q` and `-z*R`, the sum of `q` and `-z*R` is indeed `-g*t*r^-1`. Note that the `-g*t*r^-1` is public but
19
+ //! the point addition protocol expects all 3 points to be committed so the prover commits to `-g*t*r^-1` and the proof
20
+ //! contains the randomness used in its commitment. The verifier can itself compute `-g*t*r^-1` so using the randomness in the proof,
21
+ //! it computes the same commitment to `-g*t*r^-1` as the prover's. So I could use a point addition protocol where the resulting point
22
+ //! isn't committed but that protocol isn't going to be any better than the currently implemented one.
19
23
//!
20
24
21
25
#![ allow( non_snake_case) ]
@@ -58,7 +62,8 @@ pub struct PoKEcdsaSigCommittedPublicKeyProtocol<const NUM_REPS_SCALAR_MULT: usi
58
62
pub comm_z : Affine ,
59
63
/// Commitment to coordinates of `-z*R`
60
64
pub comm_minus_zR : PointCommitment < crate :: tom256:: Affine > ,
61
- /// Randomness in the commitment to coordinates of `-g*t*r^-1`
65
+ /// Randomness in the commitment to coordinates of `-g*t*r^-1` so verifier can create the same commitment
66
+ /// to `-g*t*r^-1` as the prover.
62
67
pub comm_minus_g_t_r_inv_rand : (
63
68
<crate :: tom256:: Affine as AffineRepr >:: ScalarField ,
64
69
<crate :: tom256:: Affine as AffineRepr >:: ScalarField ,
@@ -78,7 +83,8 @@ pub struct PoKEcdsaSigCommittedPublicKey<const NUM_REPS_SCALAR_MULT: usize = 128
78
83
pub comm_z : Affine ,
79
84
/// Commitment to coordinates of `-z*R`
80
85
pub comm_minus_zR : PointCommitment < crate :: tom256:: Affine > ,
81
- /// Randomness in the commitment to coordinates of `-g*t*r^-1`
86
+ /// Randomness in the commitment to coordinates of `-g*t*r^-1` so verifier can create the same commitment
87
+ /// to `-g*t*r^-1` as the prover.
82
88
pub comm_minus_g_t_r_inv_rand : (
83
89
<crate :: tom256:: Affine as AffineRepr >:: ScalarField ,
84
90
<crate :: tom256:: Affine as AffineRepr >:: ScalarField ,
0 commit comments