{
  "id": "2022/208",
  "url": "https://opencryptology.org/2022/208",
  "original_url": "https://eprint.iacr.org/2022/208",
  "title": "Trust Dies in Darkness: Shedding Light on Samsung's TrustZone Keymaster Design",
  "authors": [
    "Alon Shakevsky",
    "Eyal Ronen",
    "Avishai Wool"
  ],
  "affiliations": null,
  "abstract": "ARM-based Android smartphones rely on the TrustZone hardware support for a Trusted Execution Environment (TEE) to implement security-sensitive  functions. The TEE runs a separate, isolated, TrustZone Operating System (TZOS), in parallel to Android. The implementation of the cryptographic functions within the TZOS is left to the device vendors, who create proprietary undocumented designs.\n\nIn this work, we expose the cryptographic design and implementation of Android's Hardware-Backed Keystore in Samsung's Galaxy S8, S9, S10, S20, and S21 flagship devices. We reversed-engineered and provide a detailed description of the cryptographic design and code structure, and we unveil severe design flaws. We present an IV reuse attack on AES-GCM\nthat allows an attacker to extract hardware-protected  key material, and a downgrade attack that makes even the latest Samsung devices vulnerable to the IV reuse attack. We demonstrate working key extraction attacks on the latest devices. We also  show the implications of our attacks on two higher-level cryptographic protocols between the TrustZone and a remote server: we demonstrate a  working FIDO2 WebAuthn login  bypass and a compromise of Google’s Secure Key Import.\n\nWe discuss multiple flaws in the design flow of TrustZone based protocols. Although our specific attacks only apply to the $\\approx$100 million devices made by Samsung, it raises the much more general requirement for open and proven standards for critical cryptographic and security designs.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“Trust Dies in Darkness: Shedding Light on Samsung's TrustZone Keymaster Design” by Alon Shakevsky, Eyal Ronen, Avishai Wool, Cryptology ePrint Archive, Paper 2022/208, https://eprint.iacr.org/2022/208. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2022-02-21T17:42:21Z",
    "updated": "2022-02-21T17:42:21Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2022/208.pdf",
    "sha256": "1fc7c4dae2d85379724b50455e4dd46bf27761780da018d66643ee8d044872d7",
    "size": 2213430,
    "source": "github-mirror",
    "source_date": "2024-01-14T06:13:34Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2022/208/versions/20240114T061334Z.pdf",
      "captured_at": "2024-01-14T06:13:34Z",
      "label": "copy captured 2024-01-14",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2022/208.pdf",
      "size": 2213430,
      "sha256": "1fc7c4dae2d85379724b50455e4dd46bf27761780da018d66643ee8d044872d7",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20260921024607id_/https://eprint.iacr.org/2022/208.pdf",
      "captured_at": "2026-09-21T02:46:07Z",
      "size": 2009640
    },
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2022/208.pdf",
      "captured_at": "2024-01-14T06:13:34Z",
      "size": 2213430
    }
  ],
  "bibtex": "@misc{cryptoeprint:2022/208,\n      author = {Alon Shakevsky and Eyal Ronen and Avishai Wool},\n      title = {Trust Dies in Darkness: Shedding Light on Samsung's TrustZone Keymaster Design},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2022/208},\n      year = {2022},\n      url = {https://eprint.iacr.org/2022/208}\n}"
}
