Generalized Power Attacks against Crypto Hardware using Long-Range Deep Learning (2306.07249v2)
Abstract: To make cryptographic processors more resilient against side-channel attacks, engineers have developed various countermeasures. However, the effectiveness of these countermeasures is often uncertain, as it depends on the complex interplay between software and hardware. Assessing a countermeasure's effectiveness using profiling techniques or machine learning so far requires significant expertise and effort to be adapted to new targets which makes those assessments expensive. We argue that including cost-effective automated attacks will help chip design teams to quickly evaluate their countermeasures during the development phase, paving the way to more secure chips. In this paper, we lay the foundations toward such automated system by proposing GPAM, the first deep-learning system for power side-channel analysis that generalizes across multiple cryptographic algorithms, implementations, and side-channel countermeasures without the need for manual tuning or trace preprocessing. We demonstrate GPAM's capability by successfully attacking four hardened hardware-accelerated elliptic-curve digital-signature implementations. We showcase GPAM's ability to generalize across multiple algorithms by attacking a protected AES implementation and achieving comparable performance to state-of-the-art attacks, but without manual trace curation and within a limited budget. We release our data and models as an open-source contribution to allow the community to independently replicate our results and build on them.
- TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org.
- Information theory-based evolution of neural networks for side-channel analysis. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2023.
- Elie Bursztein et al. SCAAML: Side channel attacks assisted with machine learning, 2019.
- Mind the portability: A warriors guide through realistic profiled side-channel analysis. In Network and Distributed System Security Symposium, 2020.
- Is margin all you need? an extensive empirical study of active learning on tabular data. arXiv preprint arXiv:2210.03822, 2022.
- Hardened library for AES-128 encryption/decryption on ARM Cortex M4 architecture. https://github.com/ANSSI-FR/SecAESSTM32, 2020.
- A hacker guide to deep learning based side channel attacks. In DEF CON, editor, DEF CON 27, 2019.
- High order side-channel security for elliptic-curve implementations. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2023.
- “Ooh Aah… Just a Little Bit”: a small amount of side channel can go a long way. In Cryptographic Hardware and Embedded Systems–CHES 2014: 16th International Workshop, Busan, South Korea, September 23-26, 2014. Proceedings 16. Springer, 2014.
- François Chollet et al. Keras. https://keras.io, 2015.
- Rich Caruana. Multitask learning. Springer, 1998.
- Deep learning to evaluate secure RSA implementations. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2019.
- Convolutional neural networks with data augmentation against jitter-based countermeasures: Profiling attacks without pre-processing. In Cryptographic Hardware and Embedded Systems–CHES 2017: 19th International Conference, Taipei, Taiwan, September 25-28, 2017, Proceedings, 2017.
- Łukasz Chmielewski. Reassure (h2020 731591) ECC dataset, 2020.
- Francois Chollet. Deep learning with Python. Simon and Schuster, 2021.
- Efficient template attacks. In Smart Card Research and Advanced Applications: 12th International Conference, CARDIS 2013, Berlin, Germany, November 27-29, 2013. Revised Selected Papers 12, 2014.
- Ches 2023 challenge SMAesH challenge. https://raw.githubusercontent.com/simple-crypto/SMAesH-challenge-submissions/main/CHES2023_slides.pdf.
- Jean-Sébastien Coron. Resistance against differential power analysis for elliptic curve cryptosystems. In CHES, 1999.
- Template attacks. In Cryptographic Hardware and Embedded Systems, 2003.
- A simple and effective positional encoding for transformers, 2021.
- W2v-bert: Combining contrastive learning and masked language modeling for self-supervised speech pre-training, 2021.
- Cachequote: Efficiently recovering long-term secrets of sgx epid via cache attacks. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2018.
- Reijndael: The advanced encryption standard. Dr. Dobb’s Journal: Software Tools for the Professional Programmer, 26(3):137–139, 2001.
- Study of deep learning techniques for side-channel analysis and introduction to ASCAD database. CoRR, 2018.
- A second look at the ascad databases. In International Workshop on Constructive Side-Channel Analysis and Secure Design, pages 75–99. Springer, 2022.
- Fido Alliance. FIDO 2.0: Key Attestation Format, 2015.
- Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org.
- Subsampling and knowledge distillation on adversarial examples: New techniques for deep learning based side channel evaluations. Cryptology ePrint Archive, Report 2020/165, 2020. https://eprint.iacr.org/2020/165.
- Breaking masked implementations of the clyde-cipher by means of side-channel analysis - A report on the CHES challenge side-channel contest 2020. Cryptology ePrint Archive, Report 2022/471, 2022. https://eprint.iacr.org/2022/471.
- Lattice attacks against elliptic-curve signatures with blinded scalar multiplication. In Selected Areas in Cryptography (SAC), 2017.
- Estranet: An efficient shift-invariant transformer network for side-channel analysis. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2024(1):336–374, 2024.
- Transformer quality in linear time. In International Conference on Machine Learning. PMLR, 2022.
- Deep neural network attribution methods for leakage analysis and symmetric key recovery. In Selected Areas in Cryptography, 2019.
- Lattice attacks on digital signature schemes. Designs, Codes and Cryptography, 2001.
- Encoding power traces as images for efficient side-channel analysis. In 2020 IEEE International Symposium on Hardware Oriented Security and Trust (HOST), pages 46–56, 2020.
- Clustering algorithms for non-profiled single-execution attacks on exponentiations. In CARDIS, 2014.
- Single-trace side-channel attacks on scalar multiplications with precomputations. In CARDIS, 2017.
- The elliptic curve digital signature algorithm (ECDSA). International journal of information security, 2001.
- Minerva: The curse of ECDSA nonces: Systematic analysis of lattice attacks on noisy leakage of bit-length of ECDSA nonces. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2020.
- Differential power analysis. In Crypto, 1999.
- Scaling laws for neural language models, 2020.
- Paul C. Kocher. Timing attacks on implementations of Diffie-Hellman, RSA, DSS, and other systems. In Advances in Cryptology. Springer, 1996.
- A machine learning approach against a masked AES: Reaching the limit of side-channel attacks with a learning model. Journal of Cryptographic Engineering, 2015.
- Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016.
- A convnet for the 2020s, 2022.
- Pay attention to raw traces: A deep learning architecture for end-to-end profiling attacks. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2021.
- Deep learning side-channel analysis on large-scale traces - A case study on a polymorphic AES. Cryptology ePrint Archive, Report 2020/881, 2020. https://eprint.iacr.org/2020/881.
- Don’t learn what you already know: Grey-box modeling for profiling side-channel analysis against masking. Cryptology ePrint Archive, Report 2022/493, 2022. https://eprint.iacr.org/2022/493.
- Power analysis attacks: Revealing the secrets of smart cards. Springer Science & Business Media, 2008.
- Breaking cryptographic implementations using deep learning techniques. In Security, Privacy, and Applied Cryptography Engineering (SPACE), 2016.
- Side-channel analysis against ANSSI’s protected AES implementation on ARM: end-to-end attacks with multi-task learning. Journal of Cryptographic Engineering, 2023. https://eprint.iacr.org/2021/592.pdf.
- TPM-Fail: TPM meets timing and lattice attacks. In USENIX Security Symposium, 2020.
- Applying horizontal clustering side-channel attacks on embedded ecc implementations. In CARDIS, 2018.
- Attacking embedded ECC implementations through cmov side channels. In Roberto Avanzi and Howard M. Heys, editors, SAC 2016, volume 10532 of LNCS, pages 99–119. Springer, Heidelberg, August 2016.
- NewAE. NewAE Technology Inc. K82F target for CW308. https://www.newae.com/ufo-target-pages/NAE-CW308T-K82F.
- The insecurity of the digital signature algorithm with partially known nonces. Journal of Cryptology, 2002.
- Transformers without tears: Improving the normalization of self-attention. arXiv preprint arXiv:1910.05895, 2019.
- Kerastuner. https://github.com/keras-team/keras-tuner, 2019.
- Deep learning revolutionizing side channel cryptanalysis. DEF CON 27 https://www.youtube.com/watch?v=QXTricqAtPk, 2019.
- Keep it unsupervised: Horizontal attacks meet deep learning. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2021.
- Strength in numbers: Improving generalization with ensembles in machine learning-based profiled side-channel analysis. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2020.
- On the influence of optimizers in deep learning-based side-channel analysis. In Selected Areas in Cryptography, 2021.
- SoK: Deep learning-based physical side-channel analysis. ACM Computing Surveys, 2023.
- Electromagnetic analysis (EMA): Measures and counter-measures for smart cards. In Smart Card Programming and Security: International Conference on Research in Smart Cards, 2001.
- When similarities among devices are taken for granted: Another look at portability. In AFRICACRYPT, 2020.
- Side-channel attacks on blinded scalar multiplications revisited. In CARDIS, 2020.
- A side journey to titan. In USENIX Security Symposium, 2021.
- Sebastian Ruder. An overview of multi-task learning in deep neural networks, 2017.
- Swish: a self-gated activation function. arXiv preprint arXiv:1710.05941, 7(1):5, 2017.
- Lattice basis reduction: Improved practical algorithms and solving subset sum problems. Mathematical programming, 1994.
- Exponent blinding does not always lift (partial) SPA resistance to higher-level security. In ACNS, 2011.
- A unified framework for the analysis of side-channel key recovery attacks (extended version). Cryptology ePrint Archive, Report 2006/139, 2006. https://eprint.iacr.org/2006/139.
- Teledyne. Teledyne LeCroy WavePro 404HD-MS. https://teledynelecroy.com/oscilloscope/wavepro-hd-oscilloscope/wavepro-404hd-ms.
- The Sage Developers. SageMath, the Sage Mathematics Software System (Version 9.0), 2020. https://www.sagemath.org.
- Soft analytical side-channel attacks. In Palash Sarkar and Tetsu Iwata, editors, ASIACRYPT 2014, Part I, volume 8873 of LNCS, pages 282–296. Springer, Heidelberg, December 2014.
- Attention is all you need. Advances in neural information processing systems, 2017.
- Revisiting a methodology for efficient CNN architectures in profiling attacks. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2020.
- Systematic side-channel analysis of Curve25519 with machine learning. Cryptology ePrint Archive, Report 2021/944, 2021. https://eprint.iacr.org/2021/944.
- Back to the basics: Seamless integration of side-channel pre-processing in deep neural networks. IEEE Transactions on Information Forensics and Security, 2021.
- Remove some noise: On pre-processing of side-channel measurements with autoencoders. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2020.
- One trace is all it takes: Machine learning-based side-channel attack on EdDSA. In Security, Privacy, and Applied Cryptography Engineering: 9th International Conference, SPACE 2019, Gandhinagar, India, December 3–7, 2019, Proceedings 9, pages 86–105. Springer, 2019.
- I choose you: Automated hyperparameter tuning for deep learning-based side-channel analysis. IEEE Transactions on Emerging Topics in Computing, 2022.
- Smooth adversarial training. arXiv preprint arXiv:2006.14536, 2020.
- Methodology for efficient CNN architectures in profiling attacks. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2020.
- Efficiency through diversity in ensemble models applied to side-channel attacks:–a case study on public-key algorithms–. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2021.
- Deep learning mitigates but does not annihilate the need of aligned traces and a generalized ResNet model for side-channel attacks. Journal of Cryptographic Engineering, 2020.
- From homogeneous to heterogeneous: Leveraging deep learning based power analysis across devices. In ACM/IEEE Design Automation Conference (DAC), 2020.