struct U64x2(u64, u64);
Expand description
2 x u64
values
Tuple Fields§
§0: u64
§1: u64
Trait Implementations§
source§impl From<&GenericArray<u8, <Polyval as BlockSizeUser>::BlockSize>> for U64x2
impl From<&GenericArray<u8, <Polyval as BlockSizeUser>::BlockSize>> for U64x2
source§impl Mul for U64x2
impl Mul for U64x2
source§fn mul(self, rhs: Self) -> Self
fn mul(self, rhs: Self) -> Self
Computes carryless POLYVAL multiplication over GF(2^128) in constant time.
Method described at: https://www.bearssl.org/constanttime.html#ghash-for-gcm
POLYVAL multiplication is effectively the little endian equivalent of GHASH multiplication, aside from one small detail described here:
The product of two bit-reversed 128-bit polynomials yields the bit-reversed result over 255 bits, not 256. The BearSSL code ends up with a 256-bit result in zw[], and that value is shifted by one bit, because of that reversed convention issue. Thus, the code must include a shifting step to put it back where it should
This shift is unnecessary for POLYVAL and has been removed.
impl Copy for U64x2
impl Eq for U64x2
impl StructuralPartialEq for U64x2
Auto Trait Implementations§
impl Freeze for U64x2
impl RefUnwindSafe for U64x2
impl Send for U64x2
impl Sync for U64x2
impl Unpin for U64x2
impl UnwindSafe for U64x2
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)