Skip to main content

generate_refresh_contributions

Function generate_refresh_contributions 

Source
pub fn generate_refresh_contributions(
    threshold: u32,
    party_count: u32,
) -> Vec<RefreshContribution>
Expand description

Generate refresh contributions for all (N-1) × N party pairs.

Each party i generates a random polynomial g_i(x) of degree T-1 with g_i(0) = 0, evaluates it at every party index 1..=N, and produces a RefreshContribution for each.

The returned vector has N × N entries (including self-directed contributions, which parties apply to themselves). Sort by (to_party, from_party) to route to the right recipient.