Webcentive RISC-V Reference

vsm4r.vv

Vector SM4 rounds

Extension
Zvks, Zvksed
XLEN
RV32 and RV64
Assembly (riscv-unified-db)
vsm4r.vv vd, vs2
Length
32-bit

Encoding

31262524201915141211760
1010001vs210000010vd1110111

Match 0xa2082077, mask 0xfe0ff07f. Source: vsm4r.vv 31..26=0x28 25=1 vs2 19..15=0x10 14..12=0x2 vd 6..0=0x77 in riscv-opcodes/extensions/rv_zvksed.

FieldBitsriscv-opcodes name
vs224:20vs2
vd11:7vd

Description

Performs four rounds of SM4 encryption or decryption. The four words of current state are read as a four-element group from vd, and the round keys are read from the corresponding four-element group in vs2. The next four words of state are written to vd.

Description from riscv-unified-db, reformatted.

Specification and related pages