Overview of RISC-V Scalar Cryptography (Zk) Extension
The RISC-V Scalar Cryptography is a small extension that helps embedded and application processors to reduce code size, reduce the energy consumption and reduce the execution time of cryptographic code. The extension consists of five parts.
- Bit-manipulation instructions for cryptography (
Zbkx,ZbkcandZbkb). Zkswhich defines the instructions relating to the ShangMi Suite. This includes the SM3 hash function and the SM4 block cipher.Zkndefines instructions for the NIST Suite cryptographic primitives including AES block cipher and the SHA-2 hash function.Zkrdefines a CSR for a hardware entropy source. This can be used as a secure source of randomness.Zktspecification for constant time execution of specific instructions.
This chapter talks about these parts and how they can be used.