Skip to content

Commit

Permalink
Just for investigation purposes: check what transcripts are correct
Browse files Browse the repository at this point in the history
Note that this makes the test to trivially pass, but we're interested in the console output. Run with `cargo test --no-default-features parse_file -- --nocapture`
  • Loading branch information
cygnusv committed Jul 24, 2024
1 parent 28fd1d6 commit 59bf3d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ferveo/src/pvss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,13 @@ pub fn do_verify_full<E: Pairing>(
// We verify that e(G, Y_i) = e(A_i, ek_i) for validator i
// See #4 in 4.2.3 section of https://eprint.iacr.org/2022/898.pdf
// e(G,Y) = e(A, ek)
E::pairing(pvss_params.g, *y_i) == E::pairing(a_i, ek_i)
let r = E::pairing(pvss_params.g, *y_i) == E::pairing(a_i, ek_i);
if !r {
println!("Failed transc {} ({})", share_index, validator.address);
} else {
println!("All good with {} ({})", share_index, validator.address);
}
true
})
}

Expand Down

0 comments on commit 59bf3d0

Please sign in to comment.