Generic Side-channel attacks on CCA-secure lattice-based PKE and KEMs

In this work, we demonstrate generic and practical EM side-channel assisted chosen ciphertext attacks over multiple LWE/LWR-based Public Key Encryption (PKE) and Key Encapsulation Mechanisms (KEM) secure in the chosen ciphertext model (IND-CCA security). We show that the EM side-channel information can be efficiently utilized to instantiate a plaintext checking oracle, which provides binary information about the output of decryption, typically concealed within IND-CCA secure PKE/KEMs, thereby enabling our attacks. Firstly, we identified EM-based side-channel vulnerabilities in the error correcting codes (ECC) enabling us to distinguish based on the value/ validity of decrypted codewords. We also identified similar vulnerabilities in the Fujisaki-Okamoto transform which leaks information about decrypted messages applicable to schemes that do not use ECC. We subsequently exploit these vulnerabilities to demonstrate practical attacks applicable to six CCA-secure lattice-based PKE/KEMs competing in the second round of the NIST standardization process. We perform experimental validation of our attacks on implementations taken from the open-source pqm4 library, running on the ARM Cortex-M4 microcontroller. Our attacks lead to complete key-recovery in a matter of minutes on all the targeted schemes, thus showing the effectiveness of our attack.

[1]  Frederik Vercauteren,et al.  A masked ring-LWE implementation , 2015, IACR Cryptol. ePrint Arch..

[2]  Frederik Vercauteren,et al.  Timing attacks on Error Correcting Codes in Post-Quantum Secure Schemes , 2019, IACR Cryptol. ePrint Arch..

[3]  Frederik Vercauteren,et al.  Additively Homomorphic Ring-LWE Masking , 2016, PQCrypto.

[4]  Alfred Menezes,et al.  On reusing ephemeral keys in Diffie-Hellman key agreement protocols , 2010, Int. J. Appl. Cryptogr..

[5]  Jan Camenisch,et al.  Advances in cryptology - EUROCRYPT 2004 : International Conference on the Theory and Applications of Cryptographic Techniques, Interlaken, Switzerland, May 2-6, 2004 : proceedings , 2004 .

[6]  Sujoy Sinha Roy,et al.  Constant-Time BCH Error-Correcting Code , 2020, 2020 IEEE International Symposium on Circuits and Systems (ISCAS).

[7]  Jintai Ding,et al.  Complete Attack on RLWE Key Exchange with reused keys, without Signal Leakage , 2018, IACR Cryptol. ePrint Arch..

[8]  Tatsuaki Okamoto,et al.  Secure Integration of Asymmetric and Symmetric Encryption Schemes , 1999, Journal of Cryptology.

[9]  Chao Liu,et al.  Key Reuse Attack on NewHope Key Exchange Protocol , 2018, ICISC.

[10]  Bruce Schneier,et al.  Reaction Attacks Against Several Public-Key Cryptosystem , 1997 .

[11]  Oded Regev,et al.  On lattices, learning with errors, random linear codes, and cryptography , 2005, STOC '05.

[12]  Chris Peikert,et al.  On Ideal Lattices and Learning with Errors over Rings , 2010, JACM.

[13]  Tim Güneysu,et al.  Speed Records for Ideal Lattice-Based Cryptography on AVR , 2015, IACR Cryptology ePrint Archive.

[14]  Chris Peikert,et al.  Lattice Cryptography for the Internet , 2014, PQCrypto.

[15]  Martha Johanna Sepúlveda,et al.  Analysis of Error-Correcting Codes for Lattice-Based Key Exchange , 2018, IACR Cryptol. ePrint Arch..

[16]  Serge Vaudenay,et al.  Misuse Attacks on Post-quantum Cryptosystems , 2019, EUROCRYPT.

[17]  Boonserm Kijsirikul,et al.  Multiclass support vector machines using adaptive directed acyclic graph , 2002, Proceedings of the 2002 International Joint Conference on Neural Networks. IJCNN'02 (Cat. No.02CH37290).

[18]  Tim Güneysu,et al.  Enhanced Lattice-Based Signatures on Reconfigurable Hardware , 2014, CHES.

[19]  Christof Paar,et al.  Templates vs. Stochastic Methods , 2006, CHES.

[20]  Erdem Alkim,et al.  Post-quantum Key Exchange - A New Hope , 2016, USENIX Security Symposium.

[21]  Óscar García-Morchón,et al.  Round5: Compact and Fast Post-Quantum Public-Key Encryption , 2019, IACR Cryptol. ePrint Arch..

[22]  Daniel Bleichenbacher,et al.  Chosen Ciphertext Attacks Against Protocols Based on the RSA Encryption Standard PKCS #1 , 1998, CRYPTO.

[23]  Tim Güneysu,et al.  Practical CCA2-Secure and Masked Ring-LWE Implementation , 2018, IACR Trans. Cryptogr. Hardw. Embed. Syst..

[24]  Dingding Jia,et al.  LAC: Practical Ring-LWE Based Public-Key Encryption with Byte-Level Modulus , 2018, IACR Cryptol. ePrint Arch..

[25]  Scott R. Fluhrer,et al.  Cryptanalysis of ring-LWE based key exchange with key share reuse , 2016, IACR Cryptol. ePrint Arch..

[26]  Peter Pessl,et al.  Differential Fault Attacks on Deterministic Lattice Signatures , 2018, IACR Cryptol. ePrint Arch..

[27]  Abhishek Banerjee,et al.  Pseudorandom Functions and Lattices , 2012, EUROCRYPT.

[28]  Tim Güneysu,et al.  Beyond ECDSA and RSA: Lattice-based digital signatures on constrained devices , 2014, 2014 51st ACM/EDAC/IEEE Design Automation Conference (DAC).

[29]  Jintai Ding,et al.  A Simple Provably Secure Key Exchange Scheme Based on the Learning with Errors Problem , 2012, IACR Cryptol. ePrint Arch..

[30]  Frederik Vercauteren,et al.  On the impact of decryption failures on the security of LWE/LWR based schemes , 2018, IACR Cryptol. ePrint Arch..

[31]  P. Rohatgi,et al.  A testing methodology for side channel resistance , 2011 .

[32]  Ingrid Verbauwhede,et al.  Saber on ARM CCA-secure module lattice-based key encapsulation on ARM , 2018, IACR Cryptol. ePrint Arch..

[33]  Damien Stehlé,et al.  CRYSTALS - Kyber: A CCA-Secure Module-Lattice-Based KEM , 2017, 2018 IEEE European Symposium on Security and Privacy (EuroS&P).

[34]  Craig Costello,et al.  Post-Quantum Key Exchange for the TLS Protocol from the Ring Learning with Errors Problem , 2015, 2015 IEEE Symposium on Security and Privacy.

[35]  Stefan Mangard,et al.  Single-Trace Side-Channel Attacks on Masked Lattice-Based Encryption , 2017, CHES.

[36]  Peter Schwabe,et al.  Memory-Efficient High-Speed Implementation of Kyber on Cortex-M4 , 2019, IACR Cryptol. ePrint Arch..

[37]  W. Cary Huffman,et al.  Fundamentals of Error-Correcting Codes , 1975 .

[38]  Máire O'Neill,et al.  Lattice-based encryption over standard lattices in hardware , 2016, 2016 53nd ACM/EDAC/IEEE Design Automation Conference (DAC).

[39]  Henri Gilbert,et al.  Assessment of the Key-Reuse Resilience of NewHope , 2019, IACR Cryptol. ePrint Arch..

[40]  Peter Pessl,et al.  Analyzing the Shuffling Side-Channel Countermeasure for Lattice-Based Signatures , 2016, INDOCRYPT.

[41]  Jintai Ding,et al.  Leakage of signal function with reused keys in RLWE key exchange , 2017, 2017 IEEE International Conference on Communications (ICC).

[42]  Chi Cheng,et al.  A Simple Key Reuse Attack on LWE and Ring LWE Encryption Schemes as Key Encapsulation Mechanisms (KEMs) , 2019, IACR Cryptol. ePrint Arch..

[43]  Shivam Bhasin,et al.  Feature Selection Methods for Non-Profiled Side-Channel Attacks on ECC , 2018, 2018 IEEE 23rd International Conference on Digital Signal Processing (DSP).

[44]  Frederik Vercauteren,et al.  Saber: Module-LWR based key exchange, CPA-secure encryption and CCA-secure KEM , 2018, IACR Cryptol. ePrint Arch..

[45]  Chi Cheng,et al.  A Complete and Optimized Key Mismatch Attack on NIST Candidate NewHope , 2019, IACR Cryptol. ePrint Arch..

[46]  Craig Costello,et al.  Frodo: Take off the Ring! Practical, Quantum-Secure Key Exchange from LWE , 2016, IACR Cryptol. ePrint Arch..