../../.cargo/katex-header.html

Trait winter_math::ExtensibleField

source ·
pub trait ExtensibleField<const N: usize>: StarkField {
    // Required methods
    fn mul(a: [Self; N], b: [Self; N]) -> [Self; N];
    fn mul_base(a: [Self; N], b: Self) -> [Self; N];
    fn frobenius(x: [Self; N]) -> [Self; N];

    // Provided methods
    fn square(a: [Self; N]) -> [Self; N] { ... }
    fn is_supported() -> bool { ... }
}
Expand description

Defines basic arithmetic in an extension of a StarkField of a given degree.

This trait defines how to perform multiplication and compute a Frobenius automorphisms of an element in an extension of degree N for a given StarkField. It as assumed that an element in degree N extension field can be represented by N field elements in the base field.

Implementation of this trait implicitly defines the irreducible polynomial over which the extension field is defined.

Required Methods§

source

fn mul(a: [Self; N], b: [Self; N]) -> [Self; N]

Returns a product of a and b in the field defined by this extension.

source

fn mul_base(a: [Self; N], b: Self) -> [Self; N]

Returns a product of a and b in the field defined by this extension. b represents an element in the base field.

source

fn frobenius(x: [Self; N]) -> [Self; N]

Returns Frobenius automorphisms for x in the field defined by this extension.

Provided Methods§

source

fn square(a: [Self; N]) -> [Self; N]

Returns the square of a in the field defined by this extension.

source

fn is_supported() -> bool

Returns true if this extension is supported for the underlying base field.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ExtensibleField<2> for winter_math::fields::f62::BaseElement

Defines a quadratic extension of the base field over an irreducible polynomial x2 - x - 1. Thus, an extension element is defined as α + β * φ, where φ is a root of this polynomial, and α and β are base field elements.

source§

impl ExtensibleField<2> for winter_math::fields::f64::BaseElement

Defines a quadratic extension of the base field over an irreducible polynomial x2 - x + 2. Thus, an extension element is defined as α + β * φ, where φ is a root of this polynomial, and α and β are base field elements.

source§

impl ExtensibleField<2> for winter_math::fields::f128::BaseElement

Defines a quadratic extension of the base field over an irreducible polynomial x2 - x - 1. Thus, an extension element is defined as α + β * φ, where φ is a root of this polynomial, and α and β are base field elements.

source§

impl ExtensibleField<3> for winter_math::fields::f62::BaseElement

Defines a cubic extension of the base field over an irreducible polynomial x3 + 2x + 2. Thus, an extension element is defined as α + β * φ + γ * φ^2, where φ is a root of this polynomial, and α, β and γ are base field elements.

source§

impl ExtensibleField<3> for winter_math::fields::f64::BaseElement

Defines a cubic extension of the base field over an irreducible polynomial x3 - x - 1. Thus, an extension element is defined as α + β * φ + γ * φ^2, where φ is a root of this polynomial, and α, β and γ are base field elements.

source§

impl ExtensibleField<3> for winter_math::fields::f128::BaseElement

Cubic extension for this field is not implemented as quadratic extension already provides sufficient security level.