Paper 2021/667
Optimized Implementation of SM4 on AVR Microcontrollers, RISC-V Processors, and ARM Processors
Hyeokdong Kwon, Hyunjun Kim, Siwoo Eum, Minjoo Sim, Hyunji Kim, Wai-Kong Lee, Zhi Hu, and Hwajeong Seo
Abstract
The SM4 block cipher is a Chinese domestic crpytographic that was introduced in 2003. Since the algorithm was developed for the use in wireless sensor networks, it is mandated in the Chinese National Standard for Wireless LAN WAPI (Wired Authentication and Privacy Infrastructure). The SM4 block cipher uses a 128-bit block size and a 32-bit round key. This consists of 32 rounds and one reverse translation \texttt{R}. In this paper, we present the optimized implementation of the SM4 block cipher on 8-bit AVR microcontrollers, which are widely used in wireless sensor devices, the optimized implementation of the SM4 block cipher on 32-bit RISC-V processors, which are open-source based computer architectures, and the optimized implementation of SM4 on 64-bit ARM processors with the parallel computation, which are widely used in smartphone and tablet. In the AVR microcontroller, it is implemented in three versions, including speed-optimization, memory-optimization, and code-optimization. As a result, speed-optimization, memory-optimization, and code-optimization achieved 205.2 cycles per byte, 213.3 cycles per byte and 207.4 cycles per byte, respectively. This is faster than the reference implementation written in C (1670.7 cycles per byte). The implementation on 32-bit RISC-V processors 128.8 cycles per byte. This is faster than the reference C code implementation (345.7 cycles per byte). The implementation on 64-bit ARM processors is 8.62 cycles per byte. This is faster than the reference C code implementation (120.07 cycles per byte).
Metadata
- Available format(s)
- Category
- Implementation
- Publication info
- Preprint. MINOR revision.
- Keywords
- 8-bit AVR Microcontrollers32-bit RISC-V Processors64-bit ARM ProcessorsSoftware ImplementationSM4 Block Cipher
- Contact author(s)
-
hwajeong84 @ gmail com
shuraatum @ gmail com
korlethean @ gmail com
khj930704 @ gmail com
minjoos9797 @ gmail com
khj1594012 @ gmail com - History
- 2021-06-18: last of 2 revisions
- 2021-05-25: received
- See all versions
- Short URL
- https://ia.cr/2021/667
- License
-
CC BY
BibTeX
@misc{cryptoeprint:2021/667, author = {Hyeokdong Kwon and Hyunjun Kim and Siwoo Eum and Minjoo Sim and Hyunji Kim and Wai-Kong Lee and Zhi Hu and Hwajeong Seo}, title = {Optimized Implementation of {SM4} on {AVR} Microcontrollers, {RISC}-V Processors, and {ARM} Processors}, howpublished = {Cryptology {ePrint} Archive, Paper 2021/667}, year = {2021}, url = {https://eprint.iacr.org/2021/667} }