Skip to content

Commit 79402f0

Browse files
authored
add assert in OpeningKey (#282)
1 parent 94cf18b commit 79402f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cryptography/kzg_multi_open/src/opening_key.rs

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ impl OpeningKey {
4444
// For all of our purposes and for any useful applications, this will be the case.
4545
let g2_gen = g2s[0];
4646

47+
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`");
48+
4749
Self {
4850
g1s,
4951
g2s,

0 commit comments

Comments
 (0)