Webcentive RISC-V Reference

Zvkg instructions

Vector GCM/GMAC

Instructions to enable the efficient implementation of GHASHH which is used in Galois/Counter Mode (GCM) and Galois Message Authentication Code (GMAC).

All of these instructions work on 128-bit element groups comprised of four 32-bit elements.

To help avoid side-channel timing attacks, these instructions shall be implemented with data-independent timing.

The number of element groups to be processed is vl/EGS. vl must be set to the number of SEW=32 elements to be processed and therefore must be a multiple of EGS=4.

Likewise, vstart must be a multiple of EGS=4.

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zvk.adoc.

Instructions (2)

MnemonicName (riscv-unified-db)XLEN
vghsh.vvVector add-multiply over GHASH Galois-fieldRV32 and RV64
vgmul.vvVector multiply over GHASH Galois-fieldRV32 and RV64