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
,Zbkc
andZbkb
). Zks
which defines the instructions relating to the ShangMi Suite. This includes the SM3 hash function and the SM4 block cipher.Zkn
defines instructions for the NIST Suite cryptographic primitives including AES block cipher and the SHA-2 hash function.Zkr
defines a CSR for a hardware entropy source. This can be used as a secure source of randomness.Zkt
specification for constant time execution of specific instructions.
This chapter talks about these parts and how they can be used.