Skip to content

Commit

Permalink
check if iterators have the same size in multiscalar mul (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
conradoplg authored Aug 28, 2023
1 parent 60d9942 commit f3fd910
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frost-core/src/scalar_mul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ where
.map(|P_opt| P_opt.map(|P| LookupTable5::<C, Element<C>>::from(&P)))
.collect::<Option<Vec<_>>>()?;

if nafs.len() != lookup_tables.len() {
return None;
}

let mut r = <C::Group>::identity();

// All NAFs will have the same size, so get it from the first
Expand Down

0 comments on commit f3fd910

Please sign in to comment.