Documentation

Cryptlib.Primitives.Cipher.Polyval

POLYVAL, the GCM-SIV authenticator #

RFC 8452 §3: POLYVAL(H, X₁, …, Xₛ) = Σᵢ Xᵢ • H^(s-i+1) where a • b = a·b·x⁻¹²⁸, over GF(2)[x] / (x¹²⁸ + x¹²⁷ + x¹²⁶ + x¹²¹ + 1). Field elements are little-endian Nats: byte j, bit i is the coefficient of x^(8j+i).

x¹²⁸ + x¹²⁷ + x¹²⁶ + x¹²¹ + 1, as bits of a Nat.

Equations
Instances For

    A 16-byte string as a field element, little-endian per RFC 8452 §3.

    Equations
    Instances For

      A field element as 16 little-endian bytes. Bits at or above x¹²⁸ are dropped.

      Equations
      Instances For

        Carry-less multiplication over GF(2), without reduction.

        Equations
        Instances For

          Multiplication by x⁻¹²⁸, one division by x at a time; also reduces the input below x¹²⁸.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            POLYVAL(H, X₁ ‖ … ‖ Xₛ), in Horner form: Sⱼ = (Sⱼ₋₁ + Xⱼ) • H.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For