vsm4r.vs
Vector SM4 rounds with scalar round keys
Encoding
| 3126 | 25 | 2420 | 1915 | 1412 | 117 | 60 | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 101001 | 1 | vs2 | 10000 | 010 | vd | 1110111 | |||||||||||||||||||||||||
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.
| 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 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.