vghsh.vv

Vector add-multiply over GHASH Galois-field

Performs a single iteration of the GHASH algorithm. The current partial hash in vd is added to the cipher text block in vs1, and the sum is multiplied over GF(2128) by the hash subkey in vs2. The multiplication is a carry-less multiply of two 128-bit polynomials modulo the GHASH polynomial x128 + x7 + x2 + x + 1. The next partial hash is written to vd.

This instruction must have data-independent timing when extension Zkt is enabled.

Assembly format

vghsh.vv vd, vs2, vs1

Decode Variables

Bits<5> vs2 = $encoding[24:20];
Bits<5> vs1 = $encoding[19:15];
Bits<5> vd = $encoding[11:7];

Execution

Encoding

svg

Defining extension

Access

M

Always

Containing profiles

  • Mandatory: RVA20S64, RVA20U64, RVA22S64, RVA22U64, RVA23S64, RVA23U64, RVA23p1S64, RVB23S64, RVB23U64, RVB23p1S64

  • Optional: RVB23U64