MATHEMATICAL APPROACH TO IMPROVING THE PERFORMANCE OF THE PROGRAMMED IMPLEMENTATION OF THE SM4 CRYPTOALGORITHM

Keywords: symmetric encryption, national standard, algorithm performance, SM4 cryptoalgorithm, optimization of computing operations.

Abstract

The paper proposes a mathematical approach to optimizing an encryption algorithm. The article is devoted to improving the performance of computing algorithms, which is one of the important areas of scientific research. SM4 to improve the performance of the algorithm. SM4 is a fairly common algorithm that is still in use today. At the moment, there are a large number of hardware and software implementations in which, using the features of the architecture or programming language, it is possible to ensure high performance of the algorithm. Symmetric cryptographic algorithms have a fairly high performance compared to asymmetric ones. Symmetric algorithms are used to encrypt messages or large files. Simple stages of the algorithms can be reduced to simple operations. This approach is described in the Ukrainian standard for symmetric stream encryption DSTU 8845:2019 (the Stream algorithm). Its peculiarity lies in the fact that the stages of the algorithm, nonlinear substitution performed using the cyclic shift operation, multiplication of the polynomial term by the field element, are simplified to a simple replacement from pre-calculated tables of constants. The article reveals that, as a result of this optimization, Strumok allows to form pseudorandom sequences with a speed of more than 10 Gbps. Today, the SM4 block encryption algorithm is widely used in the LibreSSL library, which is responsible for establishing a secure network connection according to the SSL/TLS protocol, and is part of the Libgcrypt cryptographic library, which is developed by GNU Projects. It was found that despite its widespread use, the algorithm itself does not have the optimization paths that Strumok has. The article optimizes the mathematical apparatus of SM4, which uses the peculiarity of the cyclic shift operation and reduces the calculation action to a direct replacement from the tables of constants, as was done in the national algorithm Strumok. The article proves that the optimization of the algorithm is a reduction of computational operations to direct replacement from the tables of constants. The article describes how the tables of constants are formed, as it was done in the national algorithm Strumok. The article determines that the software implementation of the basic and optimized algorithms showed that the execution time of the optimized SM4 decreased by about 2.69 times, which means a positive impact of optimization on the algorithm’s performance. The speedup was tested for different sizes of incoming messages.

References

1. Задірака В.К., Терещенко А.М. (2021). Комп’ютерна арифметика багаторозрядних чисел у послідовній та паралельній моделях обчислень. Київ. 136 с.
2. Циганкова О. В. (2021). Методи підвищення швидкодії асиметричних криптосистем з використанням еліптичних кривих у формі Едвардса: автореферат дисертації на здобуття наукового ступеня кандидата технічних наук: спец. 05.13.21 – «Системи захисту інформації»; Київ 22 с.
3. Ткачук Р.А., Цуприк Г.Б., Яворський Б.І. (2012). Підвищення інформативності та швидкодії біотехнічних систем. Оптико-електронні інформаційно- енергетичні технології. № 2(24). С. 81-85.
4. Інформаційні технології. Криптографічний захист інформації. Алгоритм симетричного потокового перетворення. ДСТУ 8845:2019. Введ. 01-10- 2019. К.: ДП «УкрНДНЦ», 2019.
5. Кузнецов О.О., Горбенко І.Д., Горбенко Ю.І., Олексійчук А.М., Тимченко В.А. (2018). Математична структура потокового шифру Струмок. Радіотехніка. Вип. 193. С. 17-27. URL: http://nbuv.gov.ua/UJRN/rvmnts_2018_193_4.
6. GM/T 0002-2012 SM4 Block Cipher Algorithm (English) URL: http://www.codeofchina.com/standard/GMT0002-2012.html.
7. Whitfield Diffie and George Ledin. SMS4 Encryption Algorithm for Wireless Networks. – URL: https://eprint.iacr.org/2008/329.pdf
8. LibreSSL for Windows. SourceForge. URL: https://sourceforge.net/projects/libressl-3-2-0-for-windows/ (date of access: 04.01.2024).
9. Koch W., Schulte M. (2023). The Libgcrypt Reference Manual. 150 p.
10. GitHub: Let’s build from here ·GitHub. URL: https://github.com/vityak2k22/SM4_Runtime_Compare/blob/main/Config.h (date of access: 04.01.2024).
11. GitHub – vityak2k22/SM4_Runtime_Compare: Optimization of SM4 algorithm + Runtime compare between classic and optimized algorithms. GitHub. URL: https://github.com/vityak2k22/SM4_Runtime_Compare (date of access: 04.01.2024).
Published
2024-12-17
How to Cite
Kozina, G. L., Savchenko, Y. V., Voskoboinyk, V. O., Prokopovich-Tkachenko, D. I., & Katsiuba, V. V. (2024). MATHEMATICAL APPROACH TO IMPROVING THE PERFORMANCE OF THE PROGRAMMED IMPLEMENTATION OF THE SM4 CRYPTOALGORITHM. Systems and Technologies, 68(2), 78-85. Retrieved from https://st.umsf.in.ua/index.php/journal/article/view/161
Section
CYBER SECURITY AND INFORMATION PROTECTION