VGHSH.VV

Vector GCM Hash

VGHSH.VV vd, vs2, vs1

One GHASH iteration: Y' = (Y xor X) * H over GF(2^128).

Encoding

Binary Layout
1011001
31:25
vs2
24:20
vs1
19:15
010
14:12
vd
11:7
1110111
6:0
 
Format OPIVV
Opcode 0xB2002077
Extension Zvkg

Operands

  • vd
    Partial hash Y (input and result)
  • vs2
    Hash subkey H
  • vs1
    Cipher text X

Example

VGHSH.VV v1, v4, v2

Related

More in Zvkg

Description

Performs a single iteration of GHASH: the partial hash Y in vd is added to the cipher-text block X in vs1, and the sum is multiplied by the hash subkey H in vs2 over GF(2^128) modulo x^128 + x^7 + x^2 + x + 1. The result Y' is written to vd. SEW must be 32.

Operation

vd = gf128_mul(vd ^ vs1, vs2);