binius_field::binary_field

Trait TowerField

Source
pub trait TowerField: BinaryField + From<Self::Canonical>
where Self::Canonical: From<Self>,
{ type Canonical: TowerField + SerializeBytes + DeserializeBytes; const TOWER_LEVEL: usize = _; // Provided methods fn basis(iota: usize, i: usize) -> Result<Self, Error> { ... } fn mul_primitive(self, iota: usize) -> Result<Self, Error> { ... } }
Expand description

A binary field isomorphic to a binary tower field.

The canonical binary field tower construction is specified in DP23, section 2.3. This is a family of binary fields with extension degree 2ι2^{\iota} for any tower height ι\iota. This trait can be implemented on any binary field isomorphic to the canonical tower field.

Provided Associated Constants§

Source

const TOWER_LEVEL: usize = _

The level ι\iota in the tower, where this field is isomorphic to TιT_{\iota}.

Required Associated Types§

Source

type Canonical: TowerField + SerializeBytes + DeserializeBytes

The canonical field isomorphic to this tower field. Currently for every tower field, the canonical field is Fan-Paar’s binary field of the same degree.

Provided Methods§

Source

fn basis(iota: usize, i: usize) -> Result<Self, Error>

Source

fn mul_primitive(self, iota: usize) -> Result<Self, Error>

Multiplies a field element by the canonical primitive element of the extension Tι+1/TiotaT_{\iota + 1} / T_{iota}.

We represent the tower field Tι+1T_{\iota + 1} as a vector space over TιT_{\iota} with the basis 1,β1(ι){1, \beta^{(\iota)}_1}. This operation multiplies the element by β1(ι)\beta^{(\iota)}_1.

§Throws
  • Error::ExtensionDegreeTooHigh if iota >= Self::TOWER_LEVEL

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl TowerField for AESTowerField8b

Source§

impl TowerField for AESTowerField16b

Source§

impl TowerField for AESTowerField32b

Source§

impl TowerField for AESTowerField64b

Source§

impl TowerField for AESTowerField128b

Source§

impl TowerField for BinaryField128bPolyval

Source§

impl TowerField for BinaryField1b

Source§

impl TowerField for BinaryField2b

Source§

impl TowerField for BinaryField4b

Source§

impl TowerField for BinaryField8b

Source§

impl TowerField for BinaryField16b

Source§

impl TowerField for BinaryField32b

Source§

impl TowerField for BinaryField64b

Source§

impl TowerField for BinaryField128b