Skip to main content

BinaryFieldExtras

Trait BinaryFieldExtras 

Source
pub trait BinaryFieldExtras: TowerField {
    // Required method
    fn solve_quadratic(c: Self) -> Option<Self>;

    // Provided methods
    fn square(&self) -> Self { ... }
    fn frobenius(&self, k: u32) -> Self { ... }
    fn trace(&self) -> Bit { ... }
}
Expand description

Binary-field operations beyond core TowerField: Frobenius, absolute trace, and the Artin-Schreier solver underpinning the Cantor/FFT substrate.

Required Methods§

Source

fn solve_quadratic(c: Self) -> Option<Self>

A root of x^2 + x = c, or None iff Tr(c) != 0 (then it has no solution). When solvable, the roots are the result and result + ONE. The value path is constant-time; only the Some/None choice reveals Tr(c).

Provided Methods§

Source

fn square(&self) -> Self

Source

fn frobenius(&self, k: u32) -> Self

x^(2^k). k is taken mod the field degree (x^(2^BITS) = x), so any k is valid.

Source

fn trace(&self) -> Bit

Absolute trace Tr_{F/GF(2)}(x) = Σ x^(2^i), always 0 or 1.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§