Skip to content

Commit

Permalink
apply pr suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-roslaniec committed Feb 21, 2024
1 parent 6fd65bd commit 6fe62c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ferveo/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@ mod test_ferveo_api {
dkg.aggregate_transcripts(not_enough_messages).unwrap();
let result = insufficient_aggregate.verify(validators_num, &messages);
assert!(result.is_err());
assert!(matches!(
result,
Err(Error::InvalidAggregateVerificationParameters(_, _))
));

// Unexpected transcripts in the aggregate or transcripts from a different ritual
// Using same DKG parameters, but different DKG instances and validators
Expand Down
5 changes: 3 additions & 2 deletions ferveo/src/pvss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ impl<E: Pairing, T> PubliclyVerifiableSS<E, T> {
.values()
.map(|validator| {
// ek_{i}^{eval_i}, i = validator index
// TODO: Replace with regular, single-element exponentiation
fast_multiexp(
// &evals.evals[i..i] = &evals.evals[i]
&[evals[validator.share_index as usize]], // one share per validator
Expand Down Expand Up @@ -399,9 +400,9 @@ pub(crate) fn aggregate<E: Pairing>(

let mut shares = batch_to_projective_g2::<E>(&first_pvss.shares);

// So now we're iterating over the PVSS instances, and adding their coefficients and shares, and their sigma
// So now we're iterating over the PVSS instances, and adding their coefficients and shares, and their
// sigma is the sum of all the sigma_i, which is the proof of knowledge of the secret polynomial
// Aggregating is just adding the corresponding values in PVSS instances, so PVSS_i = PVSS_(i-1) PVSS_i
// Aggregating is just adding the corresponding values in PVSS instances, so PVSS = PVSS + PVSS_i
for next_pvss in pvss_iter {
sigma = (sigma + next_pvss.sigma).into();
coeffs
Expand Down

0 comments on commit 6fe62c8

Please sign in to comment.