Abstract

Microarchitecture based side-channel attacks are common threats nowadays. Intel SGX technology provides a strong isolation from an adversarial OS, however, does not guarantee protection against side-channel attacks. In this paper, we analyze the security of the mbedTLS binary GCD algorithm, an implementation that offers interesting challenges when compared for example with OpenSSL, due to the usage of very tight loops in the former. Using practical experiments we demonstrate the mbedTLS binary GCD implementation is vulnerable to side-channel analysis using the SGX-Step framework against mbedTLS based SGX enclaves.We analyze the security of some use cases of this algorithm in this library, resulting in the discovery of a new vulnerability in the ECDSA code path that allows a single-trace attack against this implementation. This vulnerability is three-fold interesting:
 
 It resides in the implementation of a countermeasure which makes it more dangerous due to the false state of security the countermeasure currently offers.
 It reduces mbedTLS ECDSA security to an integer factorization problem.
 An unexpected GCD call inside the ECDSA code path compromises the countermeasure.
 
 We also cover an orthogonal use case, this time inside the mbedTLS RSA code path during the computation of a CRT parameter when loading a private key. The attack also exploits the binary GCD implementation threat, showing how a single vulnerable primitive leads to multiple vulnerabilities. We demonstrate both security threats with end-to-end attacks using 1000 trials each, showing in both cases single-trace attacks can be achieved with success rates very close to 100%.

Highlights

  • Side-channel attacks have gained a lot of traction since the pioneering work on timing side-channels by Kocher [Koc96]

  • The targeted implementation is part of the mbedTLS library where we developed two end-to-end attacks against a TLS server secured by Intel Software Guard Extension (SGX)

  • The behavior that groups are shifted in the y-axis is due to the binary greatest common divisor (GCD) algorithm reducing the number of bits of u and v progressively, at some point the number of effective words on these variables will be less than the maximum, the loops at the start of mbedtls_mpi_cmp_mpi

Read more

Summary

Introduction

Side-channel attacks have gained a lot of traction since the pioneering work on timing side-channels by Kocher [Koc96]. Weiser, Spreitzer, and Bodner [WSB18] and Aldaya et al [Ald+19a] demonstrated vulnerabilities during RSA key generation in OpenSSL, during a modular inversion operation In these two papers, the same vulnerability was attacked using two different microarchitecture components: page-fault attack against an Intel SGX enclave and Flush+Reload combined with performance degradation respectively. MbedTLS offers challenges that were not present in other libraries such as OpenSSL, especially during the recovery of Zi, which is easier in the latter [PGB17, Ald+19a] One of these proposed attacks targets a new vulnerability in the countermeasure already deployed in this library to protect the inversion of ECDSA nonces.

Side-Channel Attacks on Intel SGX realm
Binary GCD algorithm and side-channel analysis
Vulnerable primitive: mbedTLS binary GCD algorithm
Side-channel attack on the mbedTLS binary GCD implementation
Security of an unexpected GCD call in mbedTLS ECDSA
Vulnerability in nonce blinding countermeasure
When ECDSA security relies on factoring integers
Test candidates until solution
End-to-End Attacks on a SGX-secured mbedTLS server
Bulk experiments on ECDSA
Factoring
Key enumeration
Bulk experiment results
Method
Practical attack on an RSA-CRT computation
Partial model with two unknown inputs
Bulk experimental results
Mitigation and responsible disclosure
Findings
Conclusion

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.