Skip to content

Commit

Permalink
add assert in OpeningKey (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray authored Sep 26, 2024
1 parent 94cf18b commit 79402f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cryptography/kzg_multi_open/src/opening_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ impl OpeningKey {
// For all of our purposes and for any useful applications, this will be the case.
let g2_gen = g2s[0];

assert!(coset_size < g2s.len(), "The coset size must be less than the amount of g2 elements as the verifier needs to do a g2 msm of size `coset_size`");

Self {
g1s,
g2s,
Expand Down

0 comments on commit 79402f0

Please sign in to comment.