Abstract
SM4 is the 128-bit block cipher used in WAPI standard in China, which has a strong security and flexibility. In this paper, the rapid implementation of SM4 is given. Based on the characteristics of CUDA (Compute Unified Device Architecture), a CPU-GPU (Central Processing Unit-Graphics Processing Unit) scheme of SM4 is proposed by exploiting the structure property. Moreover, this scheme is further improved by introducing the page-locked memory and CUDA streams. The results show that: SM4 optimized parallel implementation under GPU can obtain with a speed-up ratio of 89, and the throughput can reach up to 31.41 Gbps.
This article is supported in part by the National Natural Science Foundation of China (61872103, 62062026), the Key Research and Development Plan of Guangxi (guike AB18281019), the Innovation Research Team Project of Guangxi (2019GXNSFGA245004), the scientific research project of young innovative talents of Guangxi (guike AD20238082), and the Science Research Foundation of Guilin University of Electronic Technology (UF19050Y).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Kedem, G.-Y.: Brute force attack on UNIX passwords with SIMD computer. In: Proceedings of the 8th Conference on USENIX Security Symposium, pp. 93–98. USENIX Association, Washington, D.C. (1999)
Manavski, S.A.: CUDA compatible GPU as an efficient hardware accelerator for AES cryptography. In: 2007 IEEE International Conference on Signal Processing and Communications, pp. 65–68. Springer, Dubai (2007)
Harrison, O., Waldron, J.: Practical symmetric key cryptography on modern graphics hardware. In: Proceedings of the 17th USENIX Security Symposium, pp. 195–210. USENIX Association, San Jose (2008)
Xia, C., Zhou, D., Zhang, K., Liu, C., Chu, X.: CUDA based high-efficiency implementation of AES algorithm. 30(6), 1907–1909 (2013). (in Chinese)
Mei, X., Zhao, K., Liu, C., Chu, X.: Benchmarking the memory hierarchy of modern GPUs. In: Hsu, C.-H., Shi, X., Salapura, V. (eds.) NPC 2014. LNCS, vol. 8707, pp. 144–156. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44917-2_13
Mei, X., Chu, X.: Dissecting GPU memory hierarchy through microbenchmarking. IEEE Trans. Parallel Distrib. Syst. 28(1), 72–86 (2017)
Fei, X., Chu, X., Yang, W.: Research and implementation of GPU parallel AES algorithm based on CTR model. J. Chin. Comput. Syst. 36(3), 529–533 (2015). (in Chinese)
Wang, D., Chen, D.: High speed implementation of SM4 encryption algorithm based on CUDA. J. Shijiazhuang Inst. Railway Technol. 16(1), 59–63 (2017). (in Chinese)
Wang, D., Chen, D.: Parallel implementation of SM4 algorithm on GPU. Inf. Netw. Secur. 20(6), 36–43 (2020). (in Chinese)
Yang, J., Wang, W., Xie Z., Han, J., Zeng X.: Parallel implementations of SHA-3 on a 24-core processor with software and hardware co-design. In: IEEE 12th International Conference on ASIC, pp. 953–956. IEEE Computer Society, Guiyang (2017)
Cheong, H., Lee, W.: Fast implementation of block ciphers and PRNGs for Kepler GPU architecture. In: International Conference on It Convergence and Security, pp. 1–5. IEEE Computer Society, Los Alamitos (2015)
NVIDIA Corporation, https://docs.nvidia.com/cuda/cuda-c-programming-guide. Accessed 23 Sep 2020
Jason, S., Edward, K.: CUDA by Example: An Introduction to General-Purpose GPU Programming, 1st edn., Machinery Industry Press, Beijing (2011). (in Chinese)
Cheng, J.: Professional CUDA C Programming, 2nd edn., Machinery Industry Press, Beijing (2017). (in Chinese)
China’s National Cryptography Administration. http://www.sca.gov.cn/sca/c100061/201611/1002423/files/330480f731f64e1ea75138211ea0dc27.pdf. Accessed 18 Nov 2016. (in Chinese)
Ma, J., Chen, X., Xu, R., Shi, J.: Implementation and evaluation of different parallel designs of AES using CUDA. In: IEEE Second International Conference on Data Science in Cyberspace, pp. 606–614. IEEE Computer Society, Shenzhen (2017)
Zhang, C.: Design and implementation of parallel SM4-GCM based on CUDA. Xi’an University of Electronic Ccience and Technology 2(1), 104 (2019).(in Chinese)
Cheng, W., Zheng, F., Pan, W., Lin, J., Li, H., Li, B.: High-performance symmetric cryptography server with GPU acceleration. In: Qing, S., Mitchell, C., Chen, L., Liu, D. (eds.) ICICS 2017. LNCS, vol. 10631, pp. 529–540. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-89500-0_46
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 ICST Institute for Computer Sciences, Social Informatics and Telecommunications Engineering
About this paper
Cite this paper
Li, J., Xie, W., Li, L., Wu, X. (2021). Parallel Implementation and Optimization of SM4 Based on CUDA. In: Chen, B., Huang, X. (eds) Applied Cryptography in Computer and Communications. AC3 2021. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, vol 386. Springer, Cham. https://doi.org/10.1007/978-3-030-80851-8_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-80851-8_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-80850-1
Online ISBN: 978-3-030-80851-8
eBook Packages: Computer ScienceComputer Science (R0)