SM4ED
SM4 Encryption/Decryption
SM4ED rd, rs1, rs2, bs
Accelerates the SM4 block cipher (encryption/decryption round).
Details
SM4ED performs one round of the SM4 block cipher encryption/decryption by applying the S-box and linear transformation to four bytes from rs2, XORing with rs1, and accumulating into rd.
Pseudocode Operation
rd = SM4_Round(rs1, rs2, bs);
Example
SM4ED t0, a0, a1, bs
Encoding
Binary Layout
110000
31:26
bs
rs2
25:21
rs1
20:16
000
15:13
rd
12:8
0110011
7:1
Operands
-
rd
Destination register (integer) -
rs1
Source register 1 (integer) -
rs2
Source register 2 (integer) -
bs
Byte Select