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
| 3126 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 101100 | 1 | vs2 | vs1 | 010 | vd | 1110111 | |||||||||||||||||||||||||
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.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| vs2 | 24:20 | vs2 |
| vs1 | 19:15 | vs1 |
| vd | 11:7 | vd |
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.