ShangMi Suite: SM4 Block Cipher
Type: unprivileged
Zve32x
| Version | State | Ratified |
|---|---|---|
| 1.0.0 | ratified | 2023-09 |
Instructions for accelerating encryption, decryption and key-schedule functions of the SM4 block cipher.
The SM4 block cipher is specified in 32907-2016: {SM4} Block Cipher Algorithm (GB/T 32907-2016: SM4 Block Cipher Algorithm, 2016)
There are other various sources available that describe the SM4 block cipher. While not the final version of the standard, RFC 8998 ShangMi (SM) Cipher Suites for TLS 1.3 is useful and easy to access.
All of these instructions work on 128-bit element groups comprised of four 32-bit elements.
To help avoid side-channel timing attacks, these instructions shall be implemented with data-independent timing.
vsm4k.vi — Vector SM4 KeyExpansionvsm4r.vs — Vector SM4 rounds with scalar round keysvsm4r.vv — Vector SM4 roundsVersion af3eaf9+cheriot.f635218
Data from the RISC-V Unified Database, copyright RISC-V International and contributors.
CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.
This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.