binius_field/arch/portable/packed_ghash_256.rs
1// Copyright 2024-2025 Irreducible Inc.
2// Copyright 2026 The Binius Developers
3
4use super::scaled_arithmetic::Scaled;
5use crate::arch::{Divide, M128};
6
7/// Widening-multiply wrapper used by the `PackedBinaryGhash2x128b` packing: divide into two
8/// `M128` lanes and apply the width-1 GHASH `WideMul` to each, deferring reduction per lane.
9pub type GhashWideMul2x<T> = Divide<M128, T, 2>;
10
11/// Square wrapper for the `PackedBinaryGhash2x128b` packing.
12pub type GhashSquare2x<T> = Scaled<T>;
13
14/// Invert wrapper for the `PackedBinaryGhash2x128b` packing.
15pub type GhashInvert2x<T> = Scaled<T>;