MODELING SIDE-CHANNEL LEAKAGES FOR THE CRYPTOGRAPHIC ALGORITHMS "MAGMA" AND "KUZNACHIK" BASED ON THE ELMO EMULATOR
Abstract
Analysis of the resistance of implementations of information security tools to attacks via side channels
is a relevant task in the development of cryptographic modules. The first stage in the study of resistance
via side channels is the assessment of the presence of statistical leaks in various parameters of the
operation of devices during the execution of cryptographic algorithms. The universal source, assessed as a
side channel, is the analysis of the energy consumption of the device during cryptographic operations. In
this research the ELMO tool was used to obtain power consumption traces for the Magma and Kuznyechik
encryption algorithms, identify instructions containing statistical power consumption leaks for observed
algorithms. To model the power consumption traces, the GOST R 34.12—2015 encryption algorithm
(n=64 Magma and n=128 Kuznyechik) was implemented in C in ELMO. The full-round version of the
Magma and Kuznechik encryption algorithms consists of 15,400 instructions (of which 4,450 instructions
contain a potential leakage in energy consumption) and 7,167 instructions (of which 4,833 instructions
contain a potential leakage in energy consumption), respectively. The side channel (corresponding to the
processed data) can be identified using a statistical t-test. To perform this task, two independent sets of
device energy consumption traces are formed: traces with a fixed value of the input vectors and traces
with arbitrary (not coinciding with the fixed) values of the input vectors. Power consumption leaks were
modeled for different numbers of Magma and Kuznyechik encryption rounds based on the statistical t-test.
The identified instructions are optimal for subsequent differential or correlation attacks on power consumption
on the observed encryption algorithms. The instructions containing the maximal statistical dependence based on the conducted testing were determined. For the Magma cipher, the instructions added
r3,r4,r3 and ldrb r3,[r3,r1] were identified, for the Kuznyechik cipher - lsls r5,r3,#0x0 and
str r7,[r3,#0x20000888]. The identified instructions are optimal for subsequent differential or correlation
attacks on power consumption on the encryption algorithms under research
References
Systems Security. Springer, Cham. Available at: https://doi.org/10.1007/978-3-031-62205-2_4.
2. Piessens F. and van Oorschot P.C. Side-Channel Attacks: A Short Tour, IEEE Security & Privacy,
March-April 2024, Vol. 22, No. 2, pp. 75-80. DOI: 10.1109/MSEC.2024.3352848.
3. Kaleem M., Mushtaq M., Ali Ramay S., Aamir Mahmood, Abbas Khan T., Kamran Hussain S., Anwar A.,
Abdullah Bhatti H. Navigating Side-Channel Attacks: A Comprehensive Overview of Cryptographic
System Vulnerabilities, Journal of Computing & Biomedical Informatics, 2024, 7 (02). Available at:
https://jcbi.org/index.php/Main/article/view/626.
4. Cui X., Zhang H., Xu J., Fang X., Ning W., Wang Y., Hosen M.S. A Data Augmentation Method for
Side-Channel Attacks on Cryptographic Integrated Circuits, Electronics, 2024, 13, 1348. Available at:
https://doi.org/10.3390/electronics13071348.
5. Amrouche A., Boubchir L. and Yahiaoui S. Side Channel Attack using Machine Learning, 2022 Ninth
International Conference on Software Defined Systems (SDS), Paris, France, 2022, pp. 1-5. DOI:
10.1109/SDS57574.2022.10062906.
6. Krasovsky A.V. and Maro E.A. Actual and historical state of side channel attacks theory, Proceedings
of the 12th International Conference on Security of Information and Networks (SIN '19). Association
for Computing Machinery, New York, NY, USA, Article 13, pp. 1-7. Available at: https://doi.org/
10.1145/3357613.3357627
7. Kitazawa T., Fujimoto D. and Hayashi Y. Fundamental Study on Simple Power Analysis Using Backscattering
from Switching Regulators, 2024 International Symposium on Electromagnetic Compatibility – EMC
Europe, Brugge, Belgium, 2024, pp. 22-26. DOI: 10.1109/EMCEurope59828.2024.10722404.
8. Camacho-Ruiz E., Sánchez-Solano S., Martínez-Rodríguez M.C., Tena-Sanchez E. and Brox P.
A Simple Power Analysis of an FPGA implementation of a polynomial multiplier for the NTRU cryptosystem,
2023 38th Conference on Design of Circuits and Integrated Systems (DCIS), Málaga, Spain,
2023, pp. 1-6. DOI: 10.1109/DCIS58620.2023.10336001.
9. Xu J., Fan A., Lu M. and Shan W. Differential Power Analysis of 8-Bit Datapath AES for IoT Applications,
2018 17th IEEE International Conference On Trust, Security And Privacy In Computing And Communications
/ 12th IEEE International Conference On Big Data Science And Engineering (TrustCom/BigDataSE),
New York, NY, USA, 2018, pp. 1470-1473. DOI: 10.1109/TrustCom/BigDataSE.2018.00205.
10. Wang W., Yu Y., Standaert F.-X., Liu J., Guo Z. and Gu D. Ridge-Based DPA: Improvement of Differential
Power Analysis For Nanoscale Chips, IEEE Transactions on Information Forensics and Security,
May 2018, Vol. 13, No. 5, pp. 1301-1316. DOI: 10.1109/TIFS.2017.2787985.
11. Cai X., Li R., Kuang S., Tan J. An Energy Trace Compression Method for Differential Power Analysis
Attack, IEEE Access, 2020, Vol. 8, pp. 89084-89092.
12. Fernandes Medeiros S., Gérard F., Veshchikov N., Lerman L., Markowitch O. Breaking Kalyna
128/128 with Power Attacks, in Carlet, C., Hasan, M., Saraswat, V. (eds), Security, Privacy, and Applied
Cryptography Engineering. SPACE 2016. Lecture Notes in Computer Science, Vol. 10076.
Springer, Cham. Available at: https://doi.org/10.1007/978-3-319-49445-6_23.
13. Jeon Y., Yoon J.W. Filtering-Based Correlation Power Analysis (CPA) with Signal Envelopes Against
Shuffling Methods, You, I. (eds), Information Security Applications. WISA 2020. Lecture Notes in Computer
Science, Vol. 12583. Springer, Cham. Available at: https://doi.org/10.1007/978-3-030-65299-9_29.
14. Lo O., Buchanan W.J., Carson D. Power analysis attacks on the AES-128 S-box using differential
power analysis (DPA) and correlation power analysis (CPA), Journal of Cyber Security Technology,
2016, 1 (2), pp. 88-107. Available at: https://doi.org/10.1080/23742917.2016.1231523.
15. Xin J., Du Z. Template attack based on uBlock cipher algorithm, Frontiers in Computing and Intelligent
Systems, 2023, 3 (1), pp. 90-93. Available at: https://doi.org/10.54097/fcis.v3i1.6031.
16. GOST R 34.12-2015 Informatsionnaya tekhnologiya. Kriptograficheskaya zashchita informatsii.
Blochnye shifry [GOST R 34.12-2015 Information technology. Cryptographic protection of information.
Block ciphers]. Available at: URL: https://tc26.ru/standard/gost/GOST_R_3412-2015.pdf.
17. Statistical leakage simulator for the ARM M0 family ELMO. Available at:https://github.com/
scaresearch/ELMO.
18. Welch D. Thumbulator. Available at: https://github.com/dwelch67/thumbulator.git.
19. CSA ISO/IEC 17825-2018 Information technology - Security techniques - Testing methods for the
mitigation of non-invasive attack classes against cryptographic modules.
20. Goodwill G., Jun B., Jaffe J. and Rohatgi P. A testing methodology for side-channel resistance validation,
NIST Non-Invasive At-tack Testing Workshop, 2011.
21. Cooper J., DeMulder E., Goodwill G., Jaffe J., Kenworthy G. and Rohatgi P. Test vector leakage assessment
(tvla) methodology in practice, International Cryptographic Module Conference, 2013