MATHEMATICAL APPROACH TO IMPROVING THE PERFORMANCE OF THE PROGRAMMED IMPLEMENTATION OF THE SM4 CRYPTOALGORITHM - Kozina, G. L.; Savchenko, Yu. V.; Voskoboinyk, V. O.; Prokopovich-Tkachenko, D. I.; Katsiuba, V. V. (Systems and Technologies, 2024)
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.