{
  "_README": [
    "Challenge material for lab-04-ctf-the-honest-phone.md.",
    "",
    "Five SYNTHETIC parsed attestations, in exactly the shape produced by",
    "../scripts/parse-attestation.py --json, so that every tool in this chapter works on them.",
    "",
    "They are synthetic on purpose. Real chains from real devices identify those devices (boot",
    "state, patch levels, attestation-key serial numbers), so this repository does not ship any.",
    "Nothing here contains key material of any kind; certificate public keys are represented only",
    "by their SPKI digests, which is all any check in this chapter needs.",
    "",
    "The 'checks' arrays record signature verification that has ALREADY been performed. Every one",
    "of these five chains verifies internally. That is the point of the exercise: internal validity",
    "is not trustworthiness."
  ],
  "device-alpha": {
    "chain_length": 4,
    "certificates": [
      {
        "index": 0,
        "subject": "CN=Android Keystore Key",
        "issuer": "title=TEE, serialNumber=1a2b3c",
        "serial": "0x1",
        "not_before": "1970-01-01 00:00:00",
        "not_after": "2106-02-07 06:28:15",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "0a1b2c3d4e5f60718293a4b5c6d7e8f90112233445566778899aabbccddeeff0",
        "self_signed": false,
        "has_attestation_extension": true
      },
      {
        "index": 1,
        "subject": "title=TEE, serialNumber=1a2b3c",
        "issuer": "title=TEE, serialNumber=4d5e6f",
        "serial": "0x5a",
        "not_before": "2023-03-01 00:00:00",
        "not_after": "2033-02-27 00:00:00",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "1122334455667788990011223344556677889900112233445566778899001122",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 2,
        "subject": "title=TEE, serialNumber=4d5e6f",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0x5b",
        "not_before": "2023-03-01 00:00:00",
        "not_after": "2033-02-27 00:00:00",
        "key": "ec(1.3.132.0.34)",
        "spki_sha256": "2233445566778899001122334455667788990011223344556677889900112233",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 3,
        "subject": "serialNumber=f92009e853b6b045",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0xc36b7c44b9ae1831",
        "not_before": "2021-11-17 23:10:42",
        "not_after": "2036-11-13 23:10:42",
        "key": "rsa-4096",
        "spki_sha256": "feb2ea7551ee316ed4bb443c8293b884dbfdea40b603ee3e4f4a897e4580fbae",
        "self_signed": true,
        "has_attestation_extension": false
      }
    ],
    "attestation": {
      "attestationVersion": 200,
      "attestationSecurityLevel": "StrongBox",
      "keymasterVersion": 200,
      "keymasterSecurityLevel": "StrongBox",
      "attestationChallenge": "9f2c41ab77d0e5613c8a04bf2e91d7635ac0182f4b6e9d3a7c15e8042b9f6d10",
      "attestationChallengeAscii": "................................",
      "uniqueId": "",
      "softwareEnforced": {
        "creationDateTime": 1786600000000,
        "attestationApplicationId": {
          "packages": [
            {
              "package": "com.bank.example",
              "version": 4210
            }
          ],
          "signature_digests": [
            "b1946ac92492d2347c6235b4d2611184a1e0b0bd06d8a1e8c1e0b0bd06d8a1e8"
          ]
        }
      },
      "hardwareEnforced": {
        "purpose": [
          "SIGN",
          "VERIFY"
        ],
        "algorithm": "EC",
        "keySize": 256,
        "digest": [
          "SHA-256"
        ],
        "ecCurve": "P-256",
        "userAuthType": "PASSWORD",
        "origin": "GENERATED",
        "rootOfTrust": {
          "verifiedBootKey": "8f4a1c9e2b7d05364af8e10c3d5b9276e04a1f8c3b6d925e7a0c4f18b3d629e5",
          "deviceLocked": true,
          "verifiedBootState": "Verified",
          "verifiedBootHash": "3c9d7e15a0b482f6c1e93d508a7b264fe0d19c37b5a86e240f9c1d7358ba64e2"
        },
        "osVersion": 150000,
        "osPatchLevel": 202508,
        "vendorPatchLevel": 20250801,
        "bootPatchLevel": 20250801
      },
      "found_in_cert_index": 0
    },
    "checks": [
      {
        "check": "cert[0] signed by cert[1]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[1] signed by cert[2]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[2] signed by cert[3]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "root cert[3] self-signature",
        "names_match": true,
        "signature_valid": true,
        "note": null
      }
    ]
  },
  "device-bravo": {
    "chain_length": 3,
    "certificates": [
      {
        "index": 0,
        "subject": "CN=Android Keystore Key",
        "issuer": "CN=3fdc28f8, O=TEE",
        "serial": "0x1",
        "not_before": "1970-01-01 00:00:00",
        "not_after": "2106-02-07 06:28:15",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "aa00bb11cc22dd33ee44ff5566778899aabbccddeeff00112233445566778899",
        "self_signed": false,
        "has_attestation_extension": true
      },
      {
        "index": 1,
        "subject": "CN=3fdc28f8, O=TEE",
        "issuer": "O=Google Test LLC, CN=Droid Unregistered Device CA",
        "serial": "0x2",
        "not_before": "2024-01-01 00:00:00",
        "not_after": "2034-01-01 00:00:00",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "bb11cc22dd33ee44ff5566778899aabbccddeeff001122334455667788990011",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 2,
        "subject": "O=Google Test LLC, CN=Droid Unregistered Device CA",
        "issuer": "O=Google Test LLC, CN=Droid Unregistered Device CA",
        "serial": "0x3",
        "not_before": "2024-01-01 00:00:00",
        "not_after": "2044-01-01 00:00:00",
        "key": "rsa-2048",
        "spki_sha256": "87e1c95f07501a07919c2181cf9706db1a01c738ab936af63a1587abf45b0596",
        "self_signed": true,
        "has_attestation_extension": false
      }
    ],
    "attestation": {
      "attestationVersion": 300,
      "attestationSecurityLevel": "Software",
      "keymasterVersion": 300,
      "keymasterSecurityLevel": "Software",
      "attestationChallenge": "77c3a91e04b5d8267f0a3c94e15b82d6039f7ca41e8b620d5934ac71f0e28b45",
      "attestationChallengeAscii": "................................",
      "uniqueId": "",
      "softwareEnforced": {
        "purpose": [
          "SIGN",
          "VERIFY"
        ],
        "algorithm": "EC",
        "keySize": 256,
        "digest": [
          "SHA-256"
        ],
        "ecCurve": "P-256",
        "origin": "GENERATED",
        "creationDateTime": 1786600100000,
        "userAuthType": "PASSWORD",
        "rootOfTrust": {
          "verifiedBootKey": "0000000000000000000000000000000000000000000000000000000000000000",
          "deviceLocked": true,
          "verifiedBootState": "Verified",
          "verifiedBootHash": "0000000000000000000000000000000000000000000000000000000000000000"
        },
        "osVersion": 150000,
        "osPatchLevel": 202509,
        "vendorPatchLevel": 20250901,
        "bootPatchLevel": 20250901,
        "attestationApplicationId": {
          "packages": [
            {
              "package": "com.bank.example",
              "version": 4210
            }
          ],
          "signature_digests": [
            "b1946ac92492d2347c6235b4d2611184a1e0b0bd06d8a1e8c1e0b0bd06d8a1e8"
          ]
        }
      },
      "hardwareEnforced": {},
      "found_in_cert_index": 0
    },
    "checks": [
      {
        "check": "cert[0] signed by cert[1]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[1] signed by cert[2]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "root cert[2] self-signature",
        "names_match": true,
        "signature_valid": true,
        "note": null
      }
    ]
  },
  "device-charlie": {
    "chain_length": 4,
    "certificates": [
      {
        "index": 0,
        "subject": "CN=Android Keystore Key",
        "issuer": "title=TEE, serialNumber=32e13c",
        "serial": "0x1",
        "not_before": "1970-01-01 00:00:00",
        "not_after": "2106-02-07 06:28:15",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "cc22dd33ee44ff5566778899aabbccddeeff0011223344556677889900112233",
        "self_signed": false,
        "has_attestation_extension": true
      },
      {
        "index": 1,
        "subject": "title=TEE, serialNumber=32e13c",
        "issuer": "title=TEE, serialNumber=afb154",
        "serial": "0x11",
        "not_before": "2022-01-25 23:27:40",
        "not_after": "2032-01-23 23:27:40",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "dd33ee44ff5566778899aabbccddeeff001122334455667788990011223344ff",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 2,
        "subject": "title=TEE, serialNumber=afb154",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0x12",
        "not_before": "2022-01-25 23:25:16",
        "not_after": "2032-01-23 23:25:16",
        "key": "ec(1.3.132.0.34)",
        "spki_sha256": "ee44ff5566778899aabbccddeeff001122334455667788990011223344ff5566",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 3,
        "subject": "serialNumber=f92009e853b6b045",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0xc36b7c44b9ae1831",
        "not_before": "2021-11-17 23:10:42",
        "not_after": "2036-11-13 23:10:42",
        "key": "rsa-4096",
        "spki_sha256": "feb2ea7551ee316ed4bb443c8293b884dbfdea40b603ee3e4f4a897e4580fbae",
        "self_signed": true,
        "has_attestation_extension": false
      }
    ],
    "attestation": {
      "attestationVersion": 3,
      "attestationSecurityLevel": "TrustedEnvironment",
      "keymasterVersion": 4,
      "keymasterSecurityLevel": "TrustedEnvironment",
      "attestationChallenge": "41dc91b868325313fef961975c8823e22f338a2b3a2a93fffe0928e07c6fb144",
      "attestationChallengeAscii": "................................",
      "uniqueId": "",
      "softwareEnforced": {
        "creationDateTime": 1786555966000,
        "attestationApplicationId": {
          "packages": [
            {
              "package": "com.bank.example",
              "version": 4210
            }
          ],
          "signature_digests": [
            "b1946ac92492d2347c6235b4d2611184a1e0b0bd06d8a1e8c1e0b0bd06d8a1e8"
          ]
        }
      },
      "hardwareEnforced": {
        "purpose": [
          "SIGN",
          "VERIFY"
        ],
        "algorithm": "EC",
        "keySize": 256,
        "digest": [
          "SHA-256"
        ],
        "ecCurve": "P-256",
        "noAuthRequired": true,
        "origin": "GENERATED",
        "rootOfTrust": {
          "verifiedBootKey": "0000000000000000000000000000000000000000000000000000000000000000",
          "deviceLocked": false,
          "verifiedBootState": "Unverified",
          "verifiedBootHash": "e8ff1960b98291b6a5ee5ffba80da2be5cdde2594a5a79966871675a47abe7d3"
        },
        "osVersion": 110000,
        "osPatchLevel": 202112,
        "vendorPatchLevel": 20211201,
        "bootPatchLevel": 20211201
      },
      "found_in_cert_index": 0
    },
    "checks": [
      {
        "check": "cert[0] signed by cert[1]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[1] signed by cert[2]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[2] signed by cert[3]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "root cert[3] self-signature",
        "names_match": true,
        "signature_valid": true,
        "note": null
      }
    ]
  },
  "device-delta": {
    "chain_length": 4,
    "certificates": [
      {
        "index": 0,
        "subject": "CN=Android Keystore Key",
        "issuer": "title=TEE, serialNumber=77aa11",
        "serial": "0x1",
        "not_before": "1970-01-01 00:00:00",
        "not_after": "2106-02-07 06:28:15",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "ff5566778899aabbccddeeff001122334455667788990011223344ff55667788",
        "self_signed": false,
        "has_attestation_extension": true
      },
      {
        "index": 1,
        "subject": "title=TEE, serialNumber=77aa11",
        "issuer": "title=TEE, serialNumber=88bb22",
        "serial": "0x21",
        "not_before": "2023-06-01 00:00:00",
        "not_after": "2033-05-29 00:00:00",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "5566778899aabbccddeeff001122334455667788990011223344ff5566778899",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 2,
        "subject": "title=TEE, serialNumber=88bb22",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0x22",
        "not_before": "2023-06-01 00:00:00",
        "not_after": "2033-05-29 00:00:00",
        "key": "ec(1.3.132.0.34)",
        "spki_sha256": "66778899aabbccddeeff001122334455667788990011223344ff556677889900",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 3,
        "subject": "serialNumber=f92009e853b6b045",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0xc36b7c44b9ae1831",
        "not_before": "2021-11-17 23:10:42",
        "not_after": "2036-11-13 23:10:42",
        "key": "rsa-4096",
        "spki_sha256": "feb2ea7551ee316ed4bb443c8293b884dbfdea40b603ee3e4f4a897e4580fbae",
        "self_signed": true,
        "has_attestation_extension": false
      }
    ],
    "attestation": {
      "attestationVersion": 100,
      "attestationSecurityLevel": "TrustedEnvironment",
      "keymasterVersion": 100,
      "keymasterSecurityLevel": "TrustedEnvironment",
      "attestationChallenge": "6174746573746174696f6e2d6368616c6c656e67652d76310000000000000000",
      "attestationChallengeAscii": "attestation-challenge-v1",
      "uniqueId": "",
      "softwareEnforced": {
        "creationDateTime": 1786600300000,
        "attestationApplicationId": {
          "packages": [
            {
              "package": "com.bank.example",
              "version": 4210
            }
          ],
          "signature_digests": [
            "b1946ac92492d2347c6235b4d2611184a1e0b0bd06d8a1e8c1e0b0bd06d8a1e8"
          ]
        }
      },
      "hardwareEnforced": {
        "purpose": [
          "SIGN",
          "VERIFY"
        ],
        "algorithm": "EC",
        "keySize": 256,
        "digest": [
          "SHA-256"
        ],
        "ecCurve": "P-256",
        "noAuthRequired": true,
        "origin": "IMPORTED",
        "rootOfTrust": {
          "verifiedBootKey": "4b7d1e93c0a852f6b19e3d047a5c8261fd90b4e73a6c15829f0d3b6e47c1a5f83",
          "deviceLocked": true,
          "verifiedBootState": "Verified",
          "verifiedBootHash": "9a3c7e150b482f6c1e93d508a7b264fe0d19c37b5a86e240f9c1d7358ba64e21"
        },
        "osVersion": 140000,
        "osPatchLevel": 202403,
        "vendorPatchLevel": 20240301,
        "bootPatchLevel": 20240301
      },
      "found_in_cert_index": 0
    },
    "checks": [
      {
        "check": "cert[0] signed by cert[1]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[1] signed by cert[2]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[2] signed by cert[3]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "root cert[3] self-signature",
        "names_match": true,
        "signature_valid": true,
        "note": null
      }
    ]
  },
  "device-echo": {
    "chain_length": 4,
    "certificates": [
      {
        "index": 0,
        "subject": "CN=Android Keystore Key",
        "issuer": "title=TEE, serialNumber=99cc33",
        "serial": "0x1",
        "not_before": "1970-01-01 00:00:00",
        "not_after": "2106-02-07 06:28:15",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "778899aabbccddeeff001122334455667788990011223344ff55667788990011",
        "self_signed": false,
        "has_attestation_extension": true
      },
      {
        "index": 1,
        "subject": "title=TEE, serialNumber=99cc33",
        "issuer": "title=TEE, serialNumber=aadd44",
        "serial": "0x31",
        "not_before": "2024-02-01 00:00:00",
        "not_after": "2034-01-29 00:00:00",
        "key": "ec(1.2.840.10045.3.1.7)",
        "spki_sha256": "8899aabbccddeeff001122334455667788990011223344ff5566778899001122",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 2,
        "subject": "title=TEE, serialNumber=aadd44",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0x32",
        "not_before": "2024-02-01 00:00:00",
        "not_after": "2034-01-29 00:00:00",
        "key": "ec(1.3.132.0.34)",
        "spki_sha256": "99aabbccddeeff001122334455667788990011223344ff556677889900112233",
        "self_signed": false,
        "has_attestation_extension": false
      },
      {
        "index": 3,
        "subject": "serialNumber=f92009e853b6b045",
        "issuer": "serialNumber=f92009e853b6b045",
        "serial": "0xc36b7c44b9ae1831",
        "not_before": "2021-11-17 23:10:42",
        "not_after": "2036-11-13 23:10:42",
        "key": "rsa-4096",
        "spki_sha256": "feb2ea7551ee316ed4bb443c8293b884dbfdea40b603ee3e4f4a897e4580fbae",
        "self_signed": true,
        "has_attestation_extension": false
      }
    ],
    "attestation": {
      "attestationVersion": 200,
      "attestationSecurityLevel": "TrustedEnvironment",
      "keymasterVersion": 200,
      "keymasterSecurityLevel": "TrustedEnvironment",
      "attestationChallenge": "b0e4f27a913c85d6042fae7b19c530846da2f1e93b7c05a8146ef2903dbc7154",
      "attestationChallengeAscii": "................................",
      "uniqueId": "",
      "softwareEnforced": {
        "creationDateTime": 1786600400000,
        "attestationApplicationId": {
          "packages": [
            {
              "package": "com.bank.example.clone",
              "version": 4210
            }
          ],
          "signature_digests": [
            "deadbeef2492d2347c6235b4d2611184a1e0b0bd06d8a1e8c1e0b0bd06d8beef"
          ]
        }
      },
      "hardwareEnforced": {
        "purpose": [
          "SIGN",
          "VERIFY"
        ],
        "algorithm": "EC",
        "keySize": 256,
        "digest": [
          "SHA-256"
        ],
        "ecCurve": "P-256",
        "userAuthType": "FINGERPRINT",
        "authTimeout": 300,
        "origin": "GENERATED",
        "rootOfTrust": {
          "verifiedBootKey": "2f8b1d94a0c73e615b8f02d4c6a91357e08b2f4d9c1a63e785d0b4f27c39a1e6",
          "deviceLocked": true,
          "verifiedBootState": "Verified",
          "verifiedBootHash": "17d4c9e2b53a08f61c94d7e0352b8a46fd10c973b6e2a85940f1c3d768ba5e29"
        },
        "osVersion": 150000,
        "osPatchLevel": 202506,
        "vendorPatchLevel": 20250601,
        "bootPatchLevel": 20250601
      },
      "found_in_cert_index": 0
    },
    "checks": [
      {
        "check": "cert[0] signed by cert[1]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[1] signed by cert[2]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "cert[2] signed by cert[3]",
        "names_match": true,
        "signature_valid": true,
        "note": null
      },
      {
        "check": "root cert[3] self-signature",
        "names_match": true,
        "signature_valid": true,
        "note": null
      }
    ]
  }
}
