pub(crate) struct Product([u64; 4]);Expand description
Unreduced 256-bit carryless product.
Tuple Fields§
§0: [u64; 4]Implementations§
Source§impl Product
impl Product
Sourcepub(crate) fn mont_reduce(self) -> FieldElement
pub(crate) fn mont_reduce(self) -> FieldElement
Reduce the 256-bit carryless product of Karatsuba modulo the POLYVAL polynomial.
This performs constant-time folding using shifts and XORs corresponding to the irreducible
polynomial x^128 + x^127 + x^126 + x^121 + 1.
This is closely related to GHASH reduction but the bit order is reversed in POLYVAL.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Product
impl RefUnwindSafe for Product
impl Send for Product
impl Sync for Product
impl Unpin for Product
impl UnsafeUnpin for Product
impl UnwindSafe for Product
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more