Documentation

QedShare.Poly.Lagrange

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).

Product of a list of field elements.

Equations
Instances For

    Sum of a list of field elements.

    Equations
    Instances For

      The Lagrange weight at zero of point number i among the points xs: wᵢ = Π_{j ≠ i} xⱼ / (xⱼ + xᵢ). The test j = i is on public indices, not on secret data.

      Equations
      Instances For

        The Lagrange weights at zero for the points xs, one per point.

        Equations
        Instances For

          Dot product Σᵢ wᵢ · yᵢ (extra entries in the longer list are ignored).

          Equations
          Instances For

            The value at 0 of the polynomial through (xᵢ, yᵢ), by Lagrange interpolation.

            Equations
            Instances For

              The Lagrange weight at z of point number i among the points xs: wᵢ(z) = Π_{j ≠ i} (z + xⱼ) / (xᵢ + xⱼ). As in weight, the test j = i is on public indices.

              Equations
              Instances For

                The Lagrange weights at z for the points xs, one per point.

                Equations
                Instances For

                  The value at z of the polynomial through (xᵢ, yᵢ), by Lagrange interpolation.

                  Equations
                  Instances For