pub trait FixedPoint<C: CurveAffine>: Debug + Eq + Clone {
    type FixedScalarKind: FixedScalarKind;

    // Required methods
    fn generator(&self) -> C;
    fn u(&self) -> Vec<[<C::Base as PrimeField>::Repr; 8]>;
    fn z(&self) -> Vec<u64>;

    // Provided method
    fn lagrange_coeffs(&self) -> Vec<[C::Base; 8]> { ... }
}
Expand description

Returns information about a fixed point that is required by EccChip.

For each window required by Self::FixedScalarKind, $z$ is a field element such that for each point $(x, y)$ in the window:

  • $z + y = u^2$ (some square in the field); and
  • $z - y$ is not a square.

TODO: When associated consts can be used as const generics, introduce a const NUM_WINDOWS: usize associated const, and return NUM_WINDOWS-sized arrays instead of Vecs.

Required Associated Types§

source

type FixedScalarKind: FixedScalarKind

The kind of scalar that this fixed point can be multiplied by.

Required Methods§

source

fn generator(&self) -> C

Returns the generator for this fixed point.

source

fn u(&self) -> Vec<[<C::Base as PrimeField>::Repr; 8]>

Returns the $u$ values for this fixed point.

source

fn z(&self) -> Vec<u64>

Returns the $z$ value for this fixed point.

Provided Methods§

source

fn lagrange_coeffs(&self) -> Vec<[C::Base; 8]>

Returns the Lagrange coefficients for this fixed point.

Implementors§