Index Mathematics Conjectures nbv lettuce Widgets

ext_eq_eval

stdlib/ext/ext_eq_eval.nbv

ext_eq_eval(rho, r)

eq(rho, r) = prod_j (r_j (2 rho_j - 1) + 1 - rho_j) for a base field point rho and an extension point r of the same length (dags slip eq_eval)

Calls
dilithium/ext/ext_degree, ext/ext_from_base, ext/ext_mul, ext/ext_mul_base, ext/ext_one, slice
Precompiles
assert_eq!, clone!, len!, loop!
Used by
slip/slip_r1cs_arg_verify

Source

# eq(rho, r) = prod_j (r_j (2 rho_j - 1) + 1 - rho_j) for a base field point `rho` and an
# extension point `r` of the same length (dags slip eq_eval)
(rho, r)

static d = ext_degree()
static l = len! rho
assert_eq! d * l, len! r

let mut acc = ext_one()
loop! l, j {
  let term = ext_mul_base(slice((clone! r), d * j, d), 2 * rho[j] - 1) + ext_from_base(1 - rho[j])
  acc = ext_mul(acc, term)
}

acc