Skip to content

Commit 31a6e7a

Browse files
authored
fix(schnorr-protocol): refuse to prove unsound proofs (#64)
Signed-off-by: Michele Orrù <[email protected]>
1 parent 87b2a37 commit 31a6e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/schnorr_protocol.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ where
7979
}
8080

8181
// If the relation being proven is trivial, refuse to prove the statement.
82-
if self.0.image()?.iter().all(|&x| x == G::identity()) {
82+
if self.0.image()?.iter().any(|&x| x == G::identity()) {
8383
return Err(Error::InvalidInstanceWitnessPair);
8484
}
8585

0 commit comments

Comments
 (0)