Skip to main content

Module ghash

Module ghash 

Source
Expand description

Portable (software) implementation of GHASH field multiplication.

Structs§

GhashMulX
Square strategy wrapper for the software GHASH implementation.
GhashSoftMul
GhashWideMul
Widening-multiply wrapper for the portable GHASH packing.
WideGhashProduct
An unreduced GHASH product, stored as the four 64-bit limbs (v0, v1, v2, v3) of the 256-bit schoolbook product. Values of this type can be summed by XOR and reduced once at the end via reduce.

Constants§

POLY
The reduction polynomial X^128 + X^7 + X^2 + X + 1, with its X^128 term left implicit.

Functions§

ghash_mul
Multiply two GHASH field elements using software implementation.
ghash_mul_x
Scales one GHASH element by X, over u128. The scalar reference.
ghash_square
ghash_wide_mul
Widening multiply: the schoolbook polynomial product of two GHASH field elements, without the modular reduction. The unreduced result can be accumulated by XOR and reduced once at the end via WideGhashProduct::reduce.