vghsh.vv

Vector add-multiply over GHASH Galois-field

This instruction is defined by:

Encoding

svg

Synopsis

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.

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

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

Execution

  • Pruned, XLEN == 64

  • Original