Trait risc0_zkp::field::RootsOfUnity

source ·
pub trait RootsOfUnity: Sized + 'static {
    const MAX_ROU_PO2: usize;
    const ROU_FWD: &'static [Self];
    const ROU_REV: &'static [Self];
}
Expand description

Roots of unity for the field whose elements are represented by ExtElem and whose subfield elements are represented by Elem

Required Associated Constants§

source

const MAX_ROU_PO2: usize

Maximum root of unity which is a power of 2 (i.e., there is a 2^MAX_ROU_PO2th root of unity, but no 2^(MAX_ROU_PO2+1)th root.

source

const ROU_FWD: &'static [Self]

For each power of 2, the ‘forward’ root of unity for the po2. That is, this list satisfies ROU_FWD[i+1] ^ 2 = ROU_FWD[i] in the prime field, which implies ROU_FWD[i] ^ (2 ^ i) = 1.

source

const ROU_REV: &'static [Self]

For each power of 2, the ‘reverse’ root of unity for the po2. This list satisfies ROU_FWD[i] * ROU_REV[i] = 1 in the prime field F_2013265921.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl RootsOfUnity for risc0_zkp::field::baby_bear::Elem

source§

const MAX_ROU_PO2: usize = 27usize

source§

const ROU_FWD: &'static [Elem] = _

source§

const ROU_REV: &'static [Elem] = _

source§

impl RootsOfUnity for risc0_zkp::field::goldilocks::Elem

source§

const MAX_ROU_PO2: usize = 32usize

source§

const ROU_FWD: &'static [Elem] = _

source§

const ROU_REV: &'static [Elem] = _