pub type SlicedGhashSq256b<U> = SlicedPackedField<GhashSq256b, PackedPrimitiveType<U, BinaryField128bGhash>, 2>;Expand description
A GHASH² packing whose two GHASH coordinates pack into PackedPrimitiveType<U, Ghash128b>.
Aliased Type§
pub struct SlicedGhashSq256b<U>(/* private fields */);Trait Implementations§
Source§impl<U> InvertOrZero for SlicedGhashSq256b<U>where
U: UnderlierType + Divisible<M128>,
PackedPrimitiveType<U, BinaryField128bGhash>: PackedField<Scalar = BinaryField128bGhash>,
impl<U> InvertOrZero for SlicedGhashSq256b<U>where
U: UnderlierType + Divisible<M128>,
PackedPrimitiveType<U, BinaryField128bGhash>: PackedField<Scalar = BinaryField128bGhash>,
Source§fn invert_or_zero(self) -> Self
fn invert_or_zero(self) -> Self
Inverts through the norm of the degree-two extension. The conjugate of u = a + b·Y sends
Y to the other root of Y² + X·Y + X (the roots sum to X and multiply to X), giving
ū = (a + X·b) + b·Y. Its norm N = u·ū = a² + X·b·(a + b) lies in GHASH, and
u⁻¹ = ū·N⁻¹. A zero lane has norm zero, so invert_or_zero returns zero there.
Source§impl<U> Square for SlicedGhashSq256b<U>where
U: UnderlierType + Divisible<M128>,
PackedPrimitiveType<U, BinaryField128bGhash>: PackedField<Scalar = BinaryField128bGhash>,
impl<U> Square for SlicedGhashSq256b<U>where
U: UnderlierType + Divisible<M128>,
PackedPrimitiveType<U, BinaryField128bGhash>: PackedField<Scalar = BinaryField128bGhash>,
Source§impl<U> WideMul for SlicedGhashSq256b<U>where
U: UnderlierType + Divisible<M128>,
PackedPrimitiveType<U, BinaryField128bGhash>: PackedField<Scalar = BinaryField128bGhash> + WideMul,
impl<U> WideMul for SlicedGhashSq256b<U>where
U: UnderlierType + Divisible<M128>,
PackedPrimitiveType<U, BinaryField128bGhash>: PackedField<Scalar = BinaryField128bGhash> + WideMul,
Source§fn wide_mul(lhs: Self, rhs: Self) -> Self::Output
fn wide_mul(lhs: Self, rhs: Self) -> Self::Output
Karatsuba over Y: defers the three GHASH products a·e, b·f, (a+b)·(e+f).
Source§fn reduce(wide: Self::Output) -> Self
fn reduce(wide: Self::Output) -> Self
Reduces the three products and folds Y² = X·Y + X. With the Karatsuba cross term recovered
as t₁ + t₀ + t₂: z₀ = t₀ + X·t₂, z₁ = (t₁ + t₀ + t₂) + X·t₂ = z₀ + t₁ + t₂.