NIST Suite: Encryption & Decryption (Zkned)

The Zkned set contains instructions for the AES block cipher. The extension defines 4 instructions for riscv32 and 7 instructions for riscv64. These instructions can be used to implement AES-128, AES-196 and AES-256. The table below lists all the instructions that are defined by the Zkned extension.

32-bit64-bitUsage
aes32dsiaes64dsDecryption Final Round
aes32dsmiaes64dsmDecryption Middle Round
aes32esiaes64esEncryption Final Round
aes32esmiaes64esmEncryption Middle Round
aes64ks1iKey Schedule
aes64ks2Key Schedule
aes64imDecryption Key Schedule

This section contains usage examples for the 32-bit instructions and for the 64-bit instructions. These implementations can also be found in the GitHub repository with the examples for the entire Zk extension.