SOFTWARE IMPLEMENTATION OF SM4 BLOCK ENCRYPTION ALGORITHM IN PYTHON PROGRAMMING LANGUAGE

Main Article Content

Liu Lingyun

Abstract

In this work, the methods of implementation of the SM4 encryption algorithm transformations in the Python programming language were studied. It was found that the implementation of S-box in the form of a 1-dimensional table allows to achieve efficiency in terms of time. An efficient method has also been found for the cyclic left shift operation. The results obtained for the code written in the Python programming language for the encryption algorithm were compared with other implementation options in terms of the time spent on encryption and decryption, and it was found that this implementation method allows to achieve higher efficiency in terms of time.

Article Details

How to Cite
Liu Lingyun. (2024). SOFTWARE IMPLEMENTATION OF SM4 BLOCK ENCRYPTION ALGORITHM IN PYTHON PROGRAMMING LANGUAGE. Proceedings of International Conference on Modern Science and Scientific Studies, 3(4), 215–224. Retrieved from https://econferenceseries.com/index.php/icmsss/article/view/4462
Section
Articles

References

GM/T 0002-2012: SM4 Block Cipher Algorithm, “State cryptography administration of the People’s Republic of China,” March 2012. View at: Google Scholar

R. H. Tse, W. K. Wong, and M.-J. O. Saarinen, “The SM4 blockcipher algorithm and its modes of operations,” April 2018, Internet Engineering Task Force (IETF) https://datatracker.ietf.org/doc/html/draft-ribose-cfrg-sm4-10. View at: Google Scholar

ISO/IEC 18033-3: 2010/AMD1:2021, “Information technology-security techniques-encryption algorithms-part3: block ciphers-amendment1: SM4,” June 2021, https://www.iso.org/standard/81564.html. View at: Google Scholar

S. Gueron, “Intel advanced encryption standard (AES) new instructions set,” May 2010, Intel White Paper, Rev, 3:1-81. View at: Google Scholar

X. Miao, C. Guo, M. Wang, and W. Wang, “How fast can SM4 be in software,” in Information Security and Cryptology, Yi Deng and M. Yung, Eds., vol. 13837 of Lecture Notes in Computer Science, pp. 3–22, Springer Nature Switzerland, Cham, 2023. View at: Publisher Site | Google Scholar

Software.Intel.Com, “Haswell new instruction descriptions,” http://software.intel.com/en-us/blogs/2011/06/13/haswell-new-instruction-descriptions-now-available/. View at: Google Scholar

Intel Corporation, “Intel C++ compiler classic developer guide and reference,” https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html. View at: Google Scholar

L. Wang, Z. Gong, Z. Liu, J. Chen, and H. Fu, “Fast software implementation of SM4 based on tower field,” Journal of Cryptologic Research, vol. 9, no. 6, pp. 1081–1098, 2022. View at: Google Scholar

X. Zhang, H. Guo, X. Zhang, C. Wang, and J. Liu, “Fast software implementation of SM4,” Journal of Cryptologic Research, vol. 7, no. 6, pp. 799–811, 2020. View at: Google Scholar

H. Lang, L. Zhang, and W. Wu, “Fast software implementation of SM4,” Journal of University of Chinese Academy of Sciences, vol. 35, no. 2, pp. 180–187, 2018. View at: Google Scholar

J. Zhang, M. Ma, and P. Wang, “Fast implementation for SM4 cipher algorithm based on bit-slice technology,” in Smart Computing and Communication. SmartCom 2018, M. Qiu, Ed., vol. 11344 of Lecture Notes in Computer Science, pp. 104–113, Springer, Cham, 2018. View at: Publisher Site | Google Scholar

http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=7803DE42D3BC5E80B0C3E5D8E873D56A)

https://github.com/CCWUCMCTS/SM4/blob/main/SM4.py

https://github.com/windard/sm4/blob/master/Python/sm4.py