Журналов:     Статей:        

Математика и математическое моделирование. 2021; : 21

Методы оптимизации ГОСТ 34.12 – 2015 «Магма» для 8 битной архитектуры

Штанов Е. Ю., Поляков М. В.

https://doi.org/10.24108/mathm.0221.0000236

Аннотация

Данная работа посвящена разработке методов оптимизации алгоритма шифрования ГОСТ Р 34.12 -2015 «Магма» при его реализации на 8-битных микроконтроллерах. В данной статье приводится ряд техник, использование которых позволяет создать специализированные реализации алгоритма: 1) ориентированную на скорость работы; 2) ориентированную на уменьшение используемой памяти устройства; 3) оптимальная, которая включила в себя лучшие решения из двух предыдущих реализаций. Для каждого метода оптимизации дано описание и приведены числовые показатели полученных результатов в сравнении с прямой реализацией алгоритма. Так, в оптимальной реализация алгоритма процесс шифрования ускорен в 11 раз, а количество занимаемой памяти составляет 1/32 памяти микроконтроллера. Для оптимизации программного кода были использованы встроенные средства компилятора. Описанные техники применимы для любой 8-битной платформы.

Список литературы

1. Реверс инжиниринг протокола активации Яндекс. Станции. Режим доступа: https://habr.com/ru/post/469435/ (дата обращения 21.09.2020).

2. Sun Beale S., Berris P. Hacking the Internet of things: Vulnerabilities, dangers, and legal responses // Duke Law & Technology Review. 2018. Vol. 16. No. 1. Pp. 161-204.

3. Жуков А.Е. Легковесная криптография. Часть 1 // Вопросы кибербезопасности. 2015. № 1(9). С. 26–43.

4. Delivers fast, affordable data protection and security. Режим доступа: https://www.intel.ru/content/www/ru/ru/architecture-and-technology/advanced-encryption-standard-aes/data-protection-aes-general-technology.html/ (дата обращения 21.09.2020).

5. Announcing the Advanced Encryption Standard (AES) // Federal Information Processing Standards Publication. November 26, 2001. [No.]. 197. 51 p.

6. ECRYPT II: European network of excellence in cryptology II: The eSTREAM Portfolio in 2012. 16th January 2012. Режим доступа: https://www.ecrypt.eu.org/ecrypt2/documents/D.SYM.10-v1.pdf (дата обращения 31.05.2021).

7. Beaulieu R., Shors D., Smith J., Treatman-Clark S., Weeks B., Wingers L. The Simon and Speck block ciphers on AVR 8-bit microcontrollers // Lightweight cryptography for security and privacy: LightSec 2014: 3rd intern. workshop on lightweight cryptography for security and privacy (Istanbul, Turkey, September 1-2, 2014): Revised selected papers. Cham: Springer, 2015. Pp. 3-20. DOI: 10.1007/978-3-319-16363-5_1

8. О персональных данных: федеральный закон РФ от 27.07.2006 г. N 152-ФЗ.

9. Isobe T. A single-key attack on the full GOST block cipher // Fast software encryption: FSE-2011: 18th intern. workshop on fast software encryption (Lyngby, Denmark, February 13-16, 2011): Revised selected papers. B.: Springer, 2011. Pp. 290—305. DOI: 10.1007/978-3-642-21702-9_17

10. Dinur I., Dunkelman O., Shamir A. Improved attacks on full GOST // Fast software encryption: FSE-2012: 19th intern. workshop on fast software encryption (Wash., DC, USA, March 19-21, 2012): Revised selected papers. B.; Hdbl.: Springer, 2012. Pp. 9-28. DOI: 10.1007/978-3-642-34047-5_2

11. Pudovkina M.A., Khoruzhenko G.I. Related-key attacks on the full GOST block cipher with two or four related keys // 1st intern. conf. on Bulgarian and Balkans cryptography: BulCrypt 2012 (Sofia, Bulgaria, September 20-21, 2012): Proc. Sofia, 2012. Pp. 107-127.

12. ГОСТ Р 34.12 ─ 2015. Информационная технология. Криптографическая защита информации. Блочные шифры. Введ. 2016-01-01. Режим доступа: https://tc26.ru/standard/gost/GOST_R_3412-2015.pdf (дата обращения 21.09.2020).

13. STM8L151x6/8 STM8L152x6/8:8-bit ultra-low-power MCU, up to 64-KB flash, 2-KB data EEPROM, RTC, LCD, timers, UASRTs, l2C, SPIs, ADC, DAC, comparators. 2018. Режим доступа: https://www.st.com/resource/en/datasheet/stm8l151c8.pdf (дата обращения 21.09.2020).

14. Klavishnik007/GOST-on-STM8. Режим доступа: https://github.com/Klavishnik007/GOST-on-STM8 (дата обращения 21.09.2020г.)

Mathematics and Mathematical Modeling. 2021; : 21

Optimizing GOST R 34.12 "Magma" Algorithms for 8-Bit Microcontrollers

Shtanov E. Yu., Polyakov M. V.

https://doi.org/10.24108/mathm.0221.0000236

Abstract

The paper concentrates on development of optimizing methods for the GOST R 34.12-2015 "Magma" cipher algorithm when it is implemented on 8-bit microcontrollers. There is a number of techniques in the paper, which being used, allow you to create the specialized implementations of the algorithm: 1) focused on the operation speed; 2) focused on reducing the memory used; 3) optimal which involves the best solutions based on two previous implementations. Each optimization method is represented by description and performance indicators of the results obtained in comparison with the direct implementation of the algorithm. So, in the case of optimal algorithm implementation the enciphering process is 11 times accelerated, and an amount of the occupied memory is 1/32 of the microcontroller's memory. The built-in compiler tools were used to optimize the software code. The techniques described are applicable to any 8-bit platform.

References

1. Revers inzhiniring protokola aktivatsii Yandeks. Stantsii. Rezhim dostupa: https://habr.com/ru/post/469435/ (data obrashcheniya 21.09.2020).

2. Sun Beale S., Berris P. Hacking the Internet of things: Vulnerabilities, dangers, and legal responses // Duke Law & Technology Review. 2018. Vol. 16. No. 1. Pp. 161-204.

3. Zhukov A.E. Legkovesnaya kriptografiya. Chast' 1 // Voprosy kiberbezopasnosti. 2015. № 1(9). S. 26–43.

4. Delivers fast, affordable data protection and security. Rezhim dostupa: https://www.intel.ru/content/www/ru/ru/architecture-and-technology/advanced-encryption-standard-aes/data-protection-aes-general-technology.html/ (data obrashcheniya 21.09.2020).

5. Announcing the Advanced Encryption Standard (AES) // Federal Information Processing Standards Publication. November 26, 2001. [No.]. 197. 51 p.

6. ECRYPT II: European network of excellence in cryptology II: The eSTREAM Portfolio in 2012. 16th January 2012. Rezhim dostupa: https://www.ecrypt.eu.org/ecrypt2/documents/D.SYM.10-v1.pdf (data obrashcheniya 31.05.2021).

7. Beaulieu R., Shors D., Smith J., Treatman-Clark S., Weeks B., Wingers L. The Simon and Speck block ciphers on AVR 8-bit microcontrollers // Lightweight cryptography for security and privacy: LightSec 2014: 3rd intern. workshop on lightweight cryptography for security and privacy (Istanbul, Turkey, September 1-2, 2014): Revised selected papers. Cham: Springer, 2015. Pp. 3-20. DOI: 10.1007/978-3-319-16363-5_1

8. O personal'nykh dannykh: federal'nyi zakon RF ot 27.07.2006 g. N 152-FZ.

9. Isobe T. A single-key attack on the full GOST block cipher // Fast software encryption: FSE-2011: 18th intern. workshop on fast software encryption (Lyngby, Denmark, February 13-16, 2011): Revised selected papers. B.: Springer, 2011. Pp. 290—305. DOI: 10.1007/978-3-642-21702-9_17

10. Dinur I., Dunkelman O., Shamir A. Improved attacks on full GOST // Fast software encryption: FSE-2012: 19th intern. workshop on fast software encryption (Wash., DC, USA, March 19-21, 2012): Revised selected papers. B.; Hdbl.: Springer, 2012. Pp. 9-28. DOI: 10.1007/978-3-642-34047-5_2

11. Pudovkina M.A., Khoruzhenko G.I. Related-key attacks on the full GOST block cipher with two or four related keys // 1st intern. conf. on Bulgarian and Balkans cryptography: BulCrypt 2012 (Sofia, Bulgaria, September 20-21, 2012): Proc. Sofia, 2012. Pp. 107-127.

12. GOST R 34.12 ─ 2015. Informatsionnaya tekhnologiya. Kriptograficheskaya zashchita informatsii. Blochnye shifry. Vved. 2016-01-01. Rezhim dostupa: https://tc26.ru/standard/gost/GOST_R_3412-2015.pdf (data obrashcheniya 21.09.2020).

13. STM8L151x6/8 STM8L152x6/8:8-bit ultra-low-power MCU, up to 64-KB flash, 2-KB data EEPROM, RTC, LCD, timers, UASRTs, l2C, SPIs, ADC, DAC, comparators. 2018. Rezhim dostupa: https://www.st.com/resource/en/datasheet/stm8l151c8.pdf (data obrashcheniya 21.09.2020).

14. Klavishnik007/GOST-on-STM8. Rezhim dostupa: https://github.com/Klavishnik007/GOST-on-STM8 (data obrashcheniya 21.09.2020g.)