We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf1bb17 commit af0d37bCopy full SHA for af0d37b
src/schnorr_protocol.rs
@@ -99,8 +99,15 @@ where
99
return Err(Error::InvalidInstanceWitnessPair);
100
}
101
102
- // If the relation being proven is trivial, refuse to prove the statement.
103
- if self.0.image.iter().any(|&x| x == G::identity()) {
+ // If the image is the identity, then the relation must be
+ // trivial, or else the proof will be unsound
104
+ if self
105
+ .0
106
+ .image
107
+ .iter()
108
+ .zip(self.0.linear_combinations.iter())
109
+ .any(|(&x, c)| x == G::identity() && !c.is_empty())
110
+ {
111
112
113
0 commit comments