Function crypto::shamir::poly_eval

source ·
fn poly_eval(f: &[gf256], x: gf256) -> gf256
Expand description

This function takes a polynomial and evaluates it. The polynomial is passed in in reverse order: Normally, polynomials are written as ax2+bx+cax^2 + bx + c, but this function takes the y-intercept first, and then the unknowns, like c+bx+ax2c + bx + ax^2.