Webcentive RISC-V Reference

vghsh.vv

Vector add-multiply over GHASH Galois-field

Extension
Zvkg
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
vghsh.vv vd, vs2, vs1
Length
32-bit

Encoding

31262524201915141211760
1011001vs2vs1010vd1110111

Match 0xb2002077, mask 0xfe00707f. Source: vghsh.vv 31..26=0x2C 25=1 vs2 vs1 14..12=0x2 vd 6..0=0x77 in riscv-opcodes/extensions/rv_zvkg.

FieldBitsriscv-opcodes name
vs224:20vs2
vs119:15vs1
vd11:7vd

Description

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.

Description from riscv-unified-db, reformatted.

Specification and related pages