Совин, Я. Р.Хома, В. В.Sovyn, Ya. R.Khoma, V. V.2024-03-272024-03-272021-02-282021-02-28Совин Я. Р. Евристичний метод для bitsliced подання випадково згенерованих 8×8 криптографічних S-Box / Я. Р. Совин, В. В. Хома // Український журнал інформаційних технологій. — Львів : Видавництво Львівської політехніки, 2021. — Том 3. — № 2. — С. 58–65.2707-1898https://ena.lpnu.ua/handle/ntb/61543Розглянуто питання щодо підвищення безпеки та ефективності програмної реалізації симетричних блокових шифрів. Використано bitslice-підхід до безпечної імплементації криптоалгоритмів, який має такі потенційні переваги, як високу швидкодію і невимогливість до обчислювальних ресурсів. Проте, відомі bitsliced-методи мають обмеження, оскільки працюють з детермінованими S-Box або розраховують S-Box менших розмірів. Запропоновано новий евристичний метод bitsliced-подання криптографічних 8×8 S-Box, що містять випадково згенеровані значення. Метод засновано на декомпозиції таблиці істинності, яка описує S-Box, на дві частини. Одна частина таблиці формує логічні маски, а інша – розбивається на бітові вектори, для знаходження логічного опису яких застосовано вичерпний пошук. Після знаходження опису всіх векторів ці дві частини таблиці об'єднуються в одну за допомогою логічних операцій. Використання запропонованого методу, орієнтованого на програмну реалізацію в логічному базисі {AND, OR, XOR, NOT}, забезпечує мінімізацію довільних 8×8 S-Box. Цей метод допускає імплементацію з використанням стандартних логічних інструкцій на будь-яких 8/16/32/64-бітних процесорах. Також можливе використання логічних SIMD-інструкцій із розширень SSE, AVX, AVX-512 для х86-64 процесорів, що забезпечує високу швидкодію завдяки використанню довгих регістрів. Розроблено відповідне програмне забезпечення, яке реалізує метод пошуку bitsliced-подання заданого S-Box, а також автоматично формує для нього С++ код на базі SSE, AVX і AVX-512 інструкцій. Досліджено ефективність методу на S-Box відомих блокових шифрів, зокрема Національного стандарту шифрування "Kalyna". Встановлено, що розроблений алгоритм потребує майже вдвічі менше вентилів для bitsliced-опису довільного S-Box, ніж кращий відомий алгоритм (370 вентилів проти 680 відповідно). Для шифрів, у яких використовуються дві або чотири таблиці S-Box, внаслідок спільної мінімізації можна отримати до 330 або 300 вентилів на таблицю відповідно.The article is devoted to the issues of increasing the security and efficiency of software implementation for the symmetric block ciphers. For the implementation of cryptoalgorithms on low-end CPUs (8/16/32-bit microcontrollers), it is important to provide increased resistance to power consumption analysis attacks. With regard to the implementation of ciphers on high-end CPUs (x86, ARM Cortex-A), it is important to eliminate the vulnerability primarily to timing and cache attacks. The authors used a bitslice approach to securely implement block ciphers, which has potential advantages such as high speed and low computing resources. However, the known bitsliced methods have a significant limitation, since they work with deterministic S-Boxes or arbitrary S-Boxes of smaller sizes. The paper proposes a new heuristic method for bitsliced representation of cryptographic 8×8 SBoxes containing randomly generated values. These values defydescription using algebraic expressions. The method is based on the decomposition of the truth table, which describes the S-Box, into two parts. One part of the table forms logical masks, and the other is split into bit vectors. To find a logical description of these vectors an exhaustive search is used. After finding the description of all vectors, these two parts of the table are combined into one using logical operations. The use of this method oriented on software implementation in the logical basis {AND, OR, XOR, NOT} ensures the minimization of arbitrary 8×8 S-Boxes. The proposed method can be implemented using standard logical instructions on any 8/16/32/64-bit processors. It is also possible to use logical SIMD instructions from the SSE, AVX, AVX-512 extensions for x86-64 processors, which provides high performance due to the use of long registers. The corresponding software has been developed that implements the method of searching for bitsliced representations of a given S-Box, and also automatically generates C++ code for it based on SSE, AVX and AVX-512 instructions. The effectiveness of the method on the S-Box of known block ciphers, in particular the Ukrainian encryption standard "Kalyna", has been investigated. It was found that the developed algorithm requires almost half as many gates for the bitsliced description of an arbitrary S-Box than the best of known algorithm (370 gates versus 680, respectively). For ciphers that use two or four S-Box tables, joint minimization can yield up to 330 or 300 gates per table, respectively.58-65ukbitslicingS-Boxлогічна мінімізаціяSIMDх86-64 CPUпрограмна імплементаціяблокові шифриbitslicingS-Boxlogical minimizationSIMDx86-64 CPUsoftware implementationblock ciphersЕвристичний метод для bitsliced подання випадково згенерованих 8×8 криптографічних S-BoxHeuristic method for bitsliced representation of randomly generated 8×8 cryptographic S-BoxArticle© Національний університет “Львівська політехніка”, 20218Sovyn Ya. R. Heuristic method for bitsliced representation of randomly generated 8×8 cryptographic S-Box / Ya. R. Sovyn, V. V. Khoma // Ukrainian Journal of Information Technology. — Lviv : Lviv Politechnic Publishing House, 2021. — Vol 3. — No 2. — P. 58–65.