Skip to main content

interpolate_at

Function interpolate_at 

Source
pub fn interpolate_at(
    points: &[(u64, FieldElement)],
    target_x: u64,
    op_eval: &impl Fn(i128) -> i128,
    op_mul: &impl Fn(i128, i128) -> i128,
    op_add: &impl Fn(i128, i128) -> i128,
    op_div: &impl Fn(i128, i128) -> i128,
) -> FieldElement
Expand description

Compute the new share for party at index target_x given existing (x, y) pairs and arithmetic ops. This is the core of re-sharing.