Software can encrypt. Software can also be paged, debugged, and exploited. Apple's Secure Enclave is a coprocessor with its own microkernel, memory, and UID fused into silicon, described in the Platform Security Guide. It generates and stores keys that the application processor (AP) can use only through tightly specified mailboxes: sign this payload if Touch ID or Face ID succeeded, unwrap the file-system master key after a successful unlock, hold the Device Enrollment keys. The AP never sees the raw private key. That split is the foundation of Data Protection, Apple Pay, and the Keychain's "hardware-backed" bits.

A second computer with a smaller job

The Enclave boots from its own signed firmware. It has a unique UID that even Apple's factories are designed not to extract; device keys are derived from it. Biometric templates live in the Enclave, not as images in iOS shared memory. A match is a yes/no (plus some retry counters) sent to policy: after too many failures, require passcode. The passcode itself is entangled with the UID so a dumped NAND from a locked phone is not a brute-force-friendly blob on a cluster — attempts must go through the Enclave's rate limiting.

Developers meet this via the Keychain and CryptoTokenKit: access-control flags (biometryCurrentSet, thisDeviceOnly) become instructions to the Enclave. thisDeviceOnly items do not restore to a new phone, which surprises product managers and delights incident responders. Getting those flags wrong is how a backup becomes a key-exfiltration path.

Threat model and the things it does not stop

The Enclave does not make a malicious app harmless. It gates keys; it does not review your URLSession. It does not stop a user who unlocks the phone and is then coerced. It does not make iCloud Keychain's escrow story simple — that is a separate, carefully designed protocol involving HSM-backed escrow in Apple's data centers, also documented in the security guide. Conflating "Secure Enclave on device" with "all Apple accounts are unrecoverable" is a category error.

Side channels, silicon bugs, and firmware issues are the remaining high-end threats; Apple's guide is unusually explicit about pairing, rollback protection, and sealed keybags. For app engineers the operational steal is: if the key's value is "cannot be copied off device," put it in hardware-backed storage with presence checks, and do not log it, cache it in the AP, or send it to your server "for convenience."

Mid-size teams on other platforms steal the same split: a TEE or TPM for device-bound keys, user presence for high-value operations, and rate-limited PIN verification tied to hardware secrets so offline attacks on stolen flash fail.

App attestation (DeviceCheck, App Attest, and cousins) is adjacent: the Enclave can help prove a request came from genuine software on a real device, which is useful against bot farms. It is not a user identity. Mixing "hardware-backed key" with "this is Alice" is how people over-trust a possession factor. Keep attestation as a bot signal and still require account credentials for anything that spends money.

What you can borrow

  • Keep private keys in a TEE/secure element; expose sign/decrypt APIs, never export.
  • Bind high-value operations to user presence and retry limits implemented in that hardware.
  • Entangle disk encryption with a hardware UID so stolen NAND is not a GPU brute-force target.
  • Mark secrets device-only vs. restorable explicitly; backup policy is a security decision.
  • Do not confuse on-device enclaves with cloud account recovery; design both, separately.