Webcentive RISC-V Reference

vsm4r.vs

Vector SM4 rounds with scalar round keys

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

Encoding

31262524201915141211760
1010011vs210000010vd1110111

Match 0xa6082077, mask 0xfe0ff07f. Source: vsm4r.vs 31..26=0x29 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 scalar element group in vs2, which is used for every element group. The next four words of state are written to vd.

Description from riscv-unified-db, reformatted.

Specification and related pages