Cache-Attacks on the ARM TrustZone Implementations of AES-256 and AES-256-GCM via GPU-Based Analysis

  • Ben Lapid
  • Avishai WoolEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11349)


The ARM TrustZone is a security extension which is used in recent Samsung flagship smartphones to create a Trusted Execution Environment (TEE) called a Secure World, which runs secure processes (Trustlets). The Samsung TEE includes cryptographic key storage and functions inside the Keymaster trustlet. The secret key used by the Keymaster trustlet is derived by a hardware device and is inaccessible to the Android OS. However, the ARM32 AES implementation used by the Keymaster is vulnerable to side channel cache-attacks. The Keymaster trustlet uses AES-256 in GCM mode, which makes mounting a cache attack against this target much harder. In this paper we show that it is possible to perform a successful cache attack against this AES implementation, in AES-256/GCM mode, using widely available hardware. Using a laptop’s GPU to parallelize the analysis, we are able to extract a raw AES-256 key with 7 min of measurements and under a minute of analysis time and an AES-256/GCM key with 40 min of measurements and 30 min of analysis.

Supplementary material


  1. 1.
  2. 2.
  3. 3.
    Bernstein, D.J.: Cache-timing attacks on AES (2005).
  4. 4.
    Daemen, J., Rijmen, V.: AES proposal: Rijndael. In: AES submission document (1999).
  5. 5.
    Dworkin, M.J.: SP 800–38D: recommendation for block cipher modes of operation: Galois/counter mode GCM and GMAC. National Institute of Standards & Technology (2007)Google Scholar
  6. 6.
    freddierice. Trident - temporary root for the Galaxy S7 active.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
    Green, M., Rodrigues-Lima, L., Zankl, A., Irazoqui, G., Heyszl, J., Eisenbarth, T.: AutoLock: why cache attacks on ARM are harder than you think. In: 26th USENIX Security Symposium, pp. 1075–1091 (2017)Google Scholar
  12. 12.
    Klöckner, A., Pinto, N., Lee, Y., Catanzaro, B., Ivanov, P., Fasih, A.: PyCUDA and PyOpenCL: a scripting-based approach to GPU run-time code generation. Parallel Comput. 38(3), 157–174 (2012)CrossRefGoogle Scholar
  13. 13.
    Lapid, B., Wool, A.: Navigating the Samsung TrustZone with applications to cache-attacks on AES-256 in the Keymaster trustlet. In: Proceedings of 23rd European Symposium on Research in Computer Security (ESORICS), Barcelona, September 2018, to appearGoogle Scholar
  14. 14.
    Lipp, M., Gruss, D., Spreitzer, R., Maurice, C., Mangard, S.: ARMageddon: cache attacks on mobile devices. In: USENIX Security Conference, pp. 549–564 (2016).
  15. 15.
  16. 16.
    Neve, M., Seifert, J.-P.: Advances on access-driven cache attacks on AES. In: Biham, E., Youssef, A.M. (eds.) SAC 2006. LNCS, vol. 4356, pp. 147–162. Springer, Heidelberg (2007). Scholar
  17. 17.
    Neve, M., Tiri, K.: On the complexity of side-channel attacks on AES-256 - methodology and quantitative results on cache attacks. Technical report (2007).
  18. 18.
    OpenSSL. ARM AES implementation using cryptographic extensions.
  19. 19.
  20. 20.
  21. 21.
    Osvik, D.A., Shamir, A., Tromer, E.: Cache attacks and countermeasures: the case of AES. In: Pointcheval, D. (ed.) CT-RSA 2006. LNCS, vol. 3860, pp. 1–20. Springer, Heidelberg (2006). Scholar
  22. 22.
  23. 23.
  24. 24.
  25. 25.
    Spreitzer, R., Plos, T.: Cache-access pattern attack on disaligned AES T-tables. In: Prouff, E. (ed.) COSADE 2013. LNCS, vol. 7864, pp. 200–214. Springer, Heidelberg (2013). Scholar
  26. 26.
    Tromer, E., Osvik, D.A., Shamir, A.: Efficient cache attacks on AES, and countermeasures. J. Cryptol. 23(1), 37–71 (2010)MathSciNetCrossRefGoogle Scholar
  27. 27.
    Trustonic. Trustonic Kinibi technology.
  28. 28.
    Xinjie, Z., Tao, W., Dong, M., Yuanyuan, Z., Zhaoyang, L.: Robust first two rounds access driven cache timing attack on AES. In: 2008 International Conference on Computer Science and Software Engineering, vol. 3, pp. 785–788. IEEE (2008)Google Scholar
  29. 29.
    Zhang, N., Sun, K., Shands, D., Lou, W., Hou, Y.T.: TruSpy: cache side-channel information leakage from the secure world on ARM devices. IACR Cryptology ePrint Archive, 2016/980 (2016)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.School of Electrical EngineeringTel Aviv UniversityTel AvivIsrael

Personalised recommendations