pub trait QuinticExtendableAlgebra<F: Field>: Algebra<F> {
// Provided methods
fn quintic_mul(a: &[Self; 5], b: &[Self; 5], res: &mut [Self; 5]) { ... }
fn quintic_square(a: &[Self; 5], res: &mut [Self; 5]) { ... }
fn quintic_add(a: &[Self; 5], b: &[Self; 5]) -> [Self; 5] { ... }
fn quintic_sub(a: &[Self; 5], b: &[Self; 5]) -> [Self; 5] { ... }
fn quintic_base_mul(lhs: [Self; 5], rhs: Self) -> [Self; 5] { ... }
}Expand description
Trait for algebras supporting quintic extension arithmetic over A[X]/(X^5 + X^2 - 1).
Implementors may override the default methods with optimized versions (e.g., SIMD implementations for packed fields).
Provided Methods§
Sourcefn quintic_mul(a: &[Self; 5], b: &[Self; 5], res: &mut [Self; 5])
fn quintic_mul(a: &[Self; 5], b: &[Self; 5], res: &mut [Self; 5])
Multiply two elements in the quintic extension ring.
Computes a * b mod (X^5 + X^2 - 1) and stores the result in res.
Sourcefn quintic_square(a: &[Self; 5], res: &mut [Self; 5])
fn quintic_square(a: &[Self; 5], res: &mut [Self; 5])
Square an element in the quintic extension ring.
Computes a^2 mod (X^5 + X^2 - 1) and stores the result in res.
Uses optimized formulas exploiting the symmetry a_i * a_j = a_j * a_i.
Sourcefn quintic_add(a: &[Self; 5], b: &[Self; 5]) -> [Self; 5]
fn quintic_add(a: &[Self; 5], b: &[Self; 5]) -> [Self; 5]
Add two elements in the quintic extension ring.
Addition is coefficient-wise and independent of the modulus polynomial.
Sourcefn quintic_sub(a: &[Self; 5], b: &[Self; 5]) -> [Self; 5]
fn quintic_sub(a: &[Self; 5], b: &[Self; 5]) -> [Self; 5]
Subtract two elements in the quintic extension ring.
Subtraction is coefficient-wise and independent of the modulus polynomial.
Sourcefn quintic_base_mul(lhs: [Self; 5], rhs: Self) -> [Self; 5]
fn quintic_base_mul(lhs: [Self; 5], rhs: Self) -> [Self; 5]
Multiply a quintic extension element by a base field scalar.
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.