Lagrange interpolation at zero #
Given points (x₀, y₀), …, (x_{m−1}, y_{m−1}) with distinct nonzero xᵢ, the value at 0 of the
unique polynomial of degree < m through them is
f(0) = Σᵢ yᵢ · wᵢ, wᵢ = Π_{j ≠ i} xⱼ / (xⱼ − xᵢ)
In GF(2⁸), xⱼ − xᵢ = xⱼ + xᵢ. The weights wᵢ depend only on the (public) xᵢ, so they are
computed once and reused for every byte of the secret.
Correctness of this formula is interpolate_correct, proved in the proofs/ package with
Mathlib.
interpolateAt z is the same at any point z: wᵢ(z) = Π_{j ≠ i} (z − xⱼ) / (xᵢ − xⱼ).
combine uses it to check that extra shares lie on the polynomial rebuilt from the first k
(README: Forged shares).