Expand description
Lagrange interpolation in the P-256 scalar field.
Both DKG verification and signing combine T per-party values that
were generated as evaluations of a degree-T-1 polynomial. The
combination is a Lagrange-basis-weighted sum evaluated at x = 0:
f(0) = \sum_i \lambda_i \cdot y_i, where
\lambda_i = \prod_{j \ne i} \frac{-x_j}{x_i - x_j} and x_k is
party k’s 1-based roster index.
Functions§
- lagrange_
basis_ scalar - Compute the Lagrange basis coefficient
\lambda_ifor evaluating the polynomial atx = 0, given the full set of participating x-coordsxsand the specific coordinatexi. - lagrange_
weighted_ sum - Apply Lagrange interpolation at
x = 0to(x_i, y_i)pairs.