RISC-V ISA Explorer · Cryptography (Zk*)

Zks: ShangMi Suite (Scalar)

Ratified 2022-02 · version 1.0.1

Shorthand for the Chinese ShangMi scalar set: the SM4 block cipher, the SM3 hash, and crypto bitmanip.

Typical use: ShangMi algorithms required in China

Specification

Open Zks in the explorer

Dependencies

Requires

Members

Instructions (24)

MnemonicNameEncodingMatchMask
ANDNAND with inverted operand0100000----------111-----01100110x400070330xfe00707f
BREV8Reverse bits in bytes011010000111-----101-----00100110x687050130xfff0707f
CLMULCarry-less multiply (low-part)0000101----------001-----01100110xa0010330xfe00707f
CLMULHCarry-less multiply (high-part)0000101----------011-----01100110xa0030330xfe00707f
ORNOR with inverted operand0100000----------110-----01100110x400060330xfe00707f
PACK0000100----------100-----01100110x80040330xfe00707f
PACKH0000100----------111-----01100110x80070330xfe00707f
PACKW0000100----------100-----01110110x800403b0xfe00707f
REV8.RV32011010011000-----101-----00100110x698050130xfff0707f
ROLRotate left (Register)0110000----------001-----01100110x600010330xfe00707f
ROLWRotate left word (Register)0110000----------001-----01110110x6000103b0xfe00707f
RORRotate right (Register)0110000----------101-----01100110x600050330xfe00707f
RORIRotate right (Immediate)011000-----------101-----00100110x600050130xfc00707f
RORIWRotate right word (Immediate)0110000----------101-----00110110x6000501b0xfe00707f
RORWRotate right word (Register)0110000----------101-----01110110x6000503b0xfe00707f
SM3P0000100001000-----001-----00100110x108010130xfff0707f
SM3P1000100001001-----001-----00100110x109010130xfff0707f
SM4ED--11000----------000-----01100110x300000330x3e00707f
SM4KS--11010----------000-----01100110x340000330x3e00707f
UNZIPBit deinterleave000010001111-----101-----00100110x08f050130xfff0707f
XNORExclusive NOR0100000----------100-----01100110x400040330xfe00707f
XPERM4Crossbar permutation (nibbles)0010100----------010-----01100110x280020330xfe00707f
XPERM8Crossbar permutation (bytes)0010100----------100-----01100110x280040330xfe00707f
ZIPBit interleave000010001111-----001-----00100110x08f010130xfff0707f