liveBook · Manning

Lagrange polynomial

As explained in Elliptic Curve Cryptography for Developers

A Lagrange polynomial is a polynomial basis function that equals one at its associated interpolation point and zero at the other interpolation points.

A Lagrange polynomial is a basis polynomial associated with interpolation roots. In SNARK construction, these polynomials provide coefficient functions for QAP components such as v_i(x), w_i(x), y_i(x), and h(x). Each polynomial is assembled from root differences: its denominator multiplies every r_i − r_j for j ≠ i, while its numerator omits the corresponding root factor. section 19.5.1

An implementation follows this flow:

  • Compute p_i = product of r_i − r_j for every j ≠ i. section 19.5.1
  • Generate coefficient combinations with an index table, then sum products of the negated roots. section 19.5.1

How Elliptic Curve Cryptography for Developers covers it

How deep it goes
Derives denominators, coefficient combinations, modular inverses, cross terms, and point evaluation routines.
Examples
Uses denominator, coefficient-combination, cross-term, matrix, and polynomial-evaluation routines as concrete implementation examples.
What you can do after
Build polynomial coefficients and evaluate Lagrange products using the provided C-style routines.
How it connects
Connects interpolation roots with polynomial coefficients, QAPs, SNARKs, modular inversion, and elliptic-curve point-order arithmetic.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elliptic Curve Cryptography for Developers. The section links point to the parts of the book it draws on.