RISC-V ISA Explorer · Cryptography (Zk*)
Zbkb: Crypto Bitmanip
Ratified 2022-02 · version 1.0.1
Rotations, byte packing, and bit reversal used heavily inside cipher and hash implementations.
Typical use: Rotations, pack and byte-reverse for crypto
Open Zbkb in the explorerDependencies
Required by
Instructions (16)
| Mnemonic | Name | Encoding | Match | Mask |
|---|---|---|---|---|
ANDN | AND with inverted operand | 0100000----------111-----0110011 | 0x40007033 | 0xfe00707f |
BREV8 | Reverse bits in bytes | 011010000111-----101-----0010011 | 0x68705013 | 0xfff0707f |
ORN | OR with inverted operand | 0100000----------110-----0110011 | 0x40006033 | 0xfe00707f |
PACK | 0000100----------100-----0110011 | 0x8004033 | 0xfe00707f | |
PACKH | 0000100----------111-----0110011 | 0x8007033 | 0xfe00707f | |
PACKW | 0000100----------100-----0111011 | 0x800403b | 0xfe00707f | |
REV8.RV32 | 011010011000-----101-----0010011 | 0x69805013 | 0xfff0707f | |
ROL | Rotate left (Register) | 0110000----------001-----0110011 | 0x60001033 | 0xfe00707f |
ROLW | Rotate left word (Register) | 0110000----------001-----0111011 | 0x6000103b | 0xfe00707f |
ROR | Rotate right (Register) | 0110000----------101-----0110011 | 0x60005033 | 0xfe00707f |
RORI | Rotate right (Immediate) | 011000-----------101-----0010011 | 0x60005013 | 0xfc00707f |
RORIW | Rotate right word (Immediate) | 0110000----------101-----0011011 | 0x6000501b | 0xfe00707f |
RORW | Rotate right word (Register) | 0110000----------101-----0111011 | 0x6000503b | 0xfe00707f |
UNZIP | Bit deinterleave | 000010001111-----101-----0010011 | 0x08f05013 | 0xfff0707f |
XNOR | Exclusive NOR | 0100000----------100-----0110011 | 0x40004033 | 0xfe00707f |
ZIP | Bit interleave | 000010001111-----001-----0010011 | 0x08f01013 | 0xfff0707f |