skip to main content
research-article

Utilizing Performance Counters for Compromising Public Key Ciphers

Published: 02 January 2018 Publication History

Abstract

Hardware performance counters (HPCs) are useful artifacts for evaluating the performance of software implementations. Recently, HPCs have been made more convenient to use without requiring explicit kernel patches or superuser privileges. However, in this article, we highlight that the information revealed by HPCs can be also exploited to attack standard implementations of public key algorithms. In particular, we analyze the vulnerability due to the event branch miss leaked via the HPCs during execution of the target ciphers. We present an iterative attack that targets the key bits of 1,024-bit RSA and 256-bit ECC, whereas in the offline phase, the system’s underlying branch predictor is approximated by a theoretical predictor in the literature. Subsimulations are performed corresponding to each bit guess to classify the message space into distinct partitions based on the event branch misprediction and the target key bit value. In the online phase, branch mispredictions obtained from the hardware performance monitors on the target system reveal the secret key bits. We also theoretically prove that the probability of success of the attack is equivalent to the accurate modeling of the theoretical predictor to the underlying system predictor. In addition, we propose an improved version of the attack that requires fewer branch misprediction traces from the HPCs to recover the secret. Experimentations using both attack strategies have been provided on Intel Core 2 Duo, Core i3, and Core i5 platforms for 1,024-bit implementation of RSA and 256-bit scalar multiplication over the secp256r1 curve followed by results on the effect of change of parameters on the success rate. The attack can successfully reveal the exponent bits and thus seeks attention to model secure branch predictors such that it inherently prevents information leakage.

References

[1]
Onur Aciiçmez, Çetin Kaya Koç, and Jean-Pierre Seifert. 2007a. Predicting secret keys via branch prediction. In Topics in Cryptology—CT-RSA 2007. Lecture Notes in Computer Science, Vol. 4377. Springer, 225--242.
[2]
Onur Aciiçmez, Shay Gueron, and Jean-Pierre Seifert. 2007b. New branch prediction vulnerabilities in OpenSSL and necessary software countermeasures. In Cryptography and Coding. Lecture Notes in Computer Science, Vol. 4887. Springer, 185--203.
[3]
Onur Aciiçmez, Jean-Pierre Seifert, and Çetin Kaya Koç. 2007c. Micro-architectural cryptanalysis. IEEE Security and Privacy 5, 4, 62--64.
[4]
Onur Aciiçmez and Werner Schindler. 2008. A vulnerability in RSA implementations due to instruction cache analysis and its demonstration on OpenSSL. In Topics in Cryptology—CT-RSA 2008. Lecture Notes in Computer Science, Vol. 4964. Springer, 256--273.
[5]
Sarani Bhattacharya and Debdeep Mukhopadhyay. 2016. Formal fault analysis of branch predictors: Attacking countermeasures of asymmetric key ciphers. Journal of Cryptographic Engineering 7, 299--310.
[6]
Joseph Bonneau and Ilya Mironov. 2006. Cache-collision timing attacks against AES. In Cryptographic Hardware and Embedded Systems—CHES 2006. Lecture Notes in Computer Science, Vol. 4249. Springer, 201--215.
[7]
Billy Bob Brumley and Risto M. Hakala. 2009. Cache-timing template attacks. In Advances in Cryptology—ASIACRYPT 2009. Lecture Notes in Computer Science, Vol. 5912. Springer, 667--684.
[8]
David Brumley and Dan Boneh. 2003. Remote timing attacks are practical. In Proceedings of the 12th USENIX Security Symposium. https://www.usenix.org/conference/12th-usenix-security-symposium/remote-timing-attacks-are-practical.
[9]
Abhishek Chakraborty, Sarani Bhattacharya, Tanu Hari Dixit, Chester Rebeiro, and Debdeep Mukhopadhyay. 2016. Template attack on SPA and FA resistant implementation of Montgomery ladder. IET Information Security 10, 5, 245--251.
[10]
Margaux Dugardin, Sylvain Guilley, Jean-Luc Danger, Zakaria Najm, and Olivier Rioul. 2016. Correlated extra-reductions defeat blinded regular exponentiation. In Proceedings of the 18th International Conference on Cryptographic Hardware and Embedded Systems (CHES’16). 3--22.
[11]
Dmitry Evtyushkin, Dmitry V. Ponomarev, and Nael B. Abu-Ghazaleh. 2015. Covert channels through branch predictors: A feasibility study. In Proceedings of the 4th Workshop on Hardware and Architectural Support for Security and Privacy (HASP@ISCA’15). 5:1--5:8.
[12]
Dmitry Evtyushkin, Dmitry Ponomarev, and Nael B. Abu-Ghazaleh. 2016a. Understanding and mitigating covert channels through branch predictors. ACM Transactions on Architecture and Code Optimization 13, 1, 10:1--10:23.
[13]
Dmitry Evtyushkin, Dmitry V. Ponomarev, and Nael B. Abu-Ghazaleh. 2016b. Jump over ASLR: Attacking branch predictors to bypass ASLR. In Proceedings of the 29th Annual International Symposium on Microarchitecture (MICRO-29). 1--13.
[14]
Agner Fog. 2009. The Microarchitecture of Intel and AMD CPU’s: An Optimization Guide for Assembly Programmers and Compiler Makers.
[15]
Pierre-Alain Fouque and Frédéric Valette. 2003. The doubling attack—why upwards is better than downwards. In Proceedings of the 5th International Workshop on Cryptographic Hardware and Embedded Systems (CHES’03). 269--280.
[16]
Gaël Hachez and Jean-Jacques Quisquater. 2000. Montgomery exponentiation with no final subtractions: Improved results. In Proceedings of the 2nd International Workshop on Cryptographic Hardware and Embedded Systems (CHES’00). 293--301.
[17]
John L. Hennessy and David A. Patterson. 2006. Computer Architecture: A Quantitative Approach (4th ed.). Morgan Kaufmann.
[18]
Marc Joye and Sung-Ming Yen. 2002. The Montgomery powering ladder. In Cryptographic Hardware and Embedded Systems—CHES 2002. Lecture Notes in Computer Science, Vol. 2523. Springer, 291--302.
[19]
Paul C. Kocher. 1996. Timing attacks on implementations of Diffie-Hellman, RSA, DSS, and other systems. In Advances in Cryptology—CRYPTO’96. Lecture Notes in Computer Science, Vol. 1109. Springer-Verlag, London, UK, 104--113.
[20]
Stefan Mangard, Elisabeth Oswald, and Thomas Popp. 2007. Power Analysis Attacks: Revealing the Secrets of Smart Cards. Springer.
[21]
James Manger. 2001. A chosen ciphertext attack on RSA optimal asymmetric encryption padding (OAEP) as standardized in PKCS # 1 v2.0. In Advances in Cryptology—CRYPTO 2001. Lecture Notes in Computer Science, Vol. 2139. Springer, 230--238.
[22]
Robert Martin, John Demme, and Simha Sethumadhavan. 2012. TimeWarp: Rethinking timekeeping and performance monitoring mechanisms to mitigate side-channel attacks. In Proceedings of the 39th Annual International Symposium on Computer Architecture (ISCA'12). IEEE, Los Alamitos, CA, 118--129.
[23]
Alfred J. Menezes, Paul C. van Oorschot, and Scott A. Vanstone. 2001. Handbook of Applied Cryptography. CRC Press, Boca Raton, FL.
[24]
David Molnar, Matt Piotrowski, David Schultz, and David Wagner. 2005. The program counter security model: Automatic detection and removal of control-flow side channel attacks. In Proceedings of the 8th International Conference on Information Security and Cryptology (ICISC’05). 156--168.
[25]
Peter L. Montgomery. 1985. Modular multiplication without trial division. Mathematics of Computation 44, 170, 519--521.
[26]
Nippon Telegraph and Telephone. 2010. Standards for Efficient Cryptography. SEC 2: Recommended Elliptic Curve Domain Parameters (Version 2.0). Certicom Research.
[27]
Leif Uhsadel, Andy Georges, and Ingrid Verbauwhede. 2008. Exploiting hardware performance counters. In Proceedings of the 5th Workshop on Fault Diagnosis and Tolerance in Cryptography (FDTC’08). 59--67.
[28]
Colin D. Walter. October 1999. Montgomery exponentiation needs no final subtractions. Electronics Letters 35, 21, 1831--1832.
[29]
Vincent M. Weaver and University of Maine. 2013. Linux perf_event features and overhead. In Proceedings of the 2013 FastPath Workshop.
[30]
Yuval Yarom and Naomi Benger. 2014. Recovering OpenSSL ECDSA Nonces Using the FLUSH+RELOAD Cache Side-Channel Attack. Retrieved November 7, 2017, from https://eprint.iacr.org/2014/140.pdf
[31]
Tse-Yu Yeh and Yale N. Patt. 1991. Two-level adaptive training branch prediction. In Proceedings of the 24th Annual International Symposium on Microarchitecture (MICRO-24). 51--61.

Cited By

View all
  • (2023)Securing a RISC-V architecture: A dynamic approach2023 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE56975.2023.10136972(1-5)Online publication date: Apr-2023
  • (2023)A Survey on Run-time Power Monitors at the EdgeACM Computing Surveys10.1145/359304455:14s(1-33)Online publication date: 18-Apr-2023
  • (2022)Design of Side-Channel-Resistant Power MonitorsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2021.308878141:5(1249-1263)Online publication date: May-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Privacy and Security
ACM Transactions on Privacy and Security  Volume 21, Issue 1
February 2018
148 pages
ISSN:2471-2566
EISSN:2471-2574
DOI:10.1145/3171591
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 02 January 2018
Accepted: 01 September 2017
Revised: 01 June 2017
Received: 01 August 2016
Published in TOPS Volume 21, Issue 1

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Branch misprediction
  2. architecture security
  3. hardware performance counters
  4. public key cipher
  5. side channel

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)2
Reflects downloads up to 18 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Securing a RISC-V architecture: A dynamic approach2023 Design, Automation & Test in Europe Conference & Exhibition (DATE)10.23919/DATE56975.2023.10136972(1-5)Online publication date: Apr-2023
  • (2023)A Survey on Run-time Power Monitors at the EdgeACM Computing Surveys10.1145/359304455:14s(1-33)Online publication date: 18-Apr-2023
  • (2022)Design of Side-Channel-Resistant Power MonitorsIEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems10.1109/TCAD.2021.308878141:5(1249-1263)Online publication date: May-2022
  • (2021)Victims Can Be SaviorsACM Journal on Emerging Technologies in Computing Systems10.1145/343918917:2(1-31)Online publication date: 29-Jan-2021
  • (2020)Improving accuracy of HPC-based malware classification for embedded platforms using gradient descent optimizationJournal of Cryptographic Engineering10.1007/s13389-020-00232-9Online publication date: 22-Jun-2020
  • (2020)Hardware Security in India: The Journey so FarCyber Security in India10.1007/978-981-15-1675-7_8(71-96)Online publication date: 18-Mar-2020

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media