mirror of https://github.com/zcash/halo2.git
Fix length of output Vec for `SharedSecret::batch_to_affine`
It was too long, and `group::Curve::batch_normalize` panics if its inputs are not the same length (which would be the case if a batch included an output with an invalid `ephemeral_key`).
This commit is contained in:
parent
8e13986101
commit
c79acc0e08
|
@ -573,7 +573,7 @@ impl SharedSecret {
|
|||
.iter()
|
||||
.filter_map(|s| s.as_ref().map(|s| *(s.0)))
|
||||
.collect();
|
||||
let mut secrets_affine = vec![pallas::Affine::identity(); shared_secrets.len()];
|
||||
let mut secrets_affine = vec![pallas::Affine::identity(); secrets.len()];
|
||||
group::Curve::batch_normalize(&secrets, &mut secrets_affine);
|
||||
secrets_affine
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue