vsm4r.vv
Vector SM4 rounds
Encoding
| 3126 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 101000 | 1 | vs2 | 10000 | 010 | vd | 1110111 | |||||||||||||||||||||||||
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.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| vs2 | 24:20 | vs2 |
| vd | 11:7 | vd |
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.