Hardware Attestation Explained: StrongBox, Secure Enclave & TEE
How hardware attestation proves a key lives in a secure element - StrongBox, Secure Enclave, TEE - and why an identity provider should require it.
Hardware Attestation Explained: StrongBox, Secure Enclave & TEE
TL;DR
- Hardware attestation lets a device cryptographically prove that a private key was generated and stored inside a tamper-resistant secure element, never exported to software.
- The three building blocks are Android StrongBox (a discrete certified chip), Apple Secure Enclave (a coprocessor), and the TEE (a trusted execution environment running beside the main OS).
- An identity provider verifies an attestation certificate chain back to a vendor root (Google or Apple), and can reject rooted, emulated, or unlocked devices.
- Attestation is the line between “passwordless” theatre and real device trust - but it has limits: device coverage, key rotation, and root revocation all need handling.
What is hardware attestation in authentication?
Hardware attestation is a process in which a device produces a signed certificate proving that a specific cryptographic key was generated and is held inside a dedicated secure element, that it cannot be exported, and that the device meets a stated security posture (boot state, OS lock, patch level). The identity provider verifies that certificate against the hardware vendor’s root of trust before it trusts the key.
In practice this turns “the user tapped approve” into “a key that provably lives in tamper-resistant silicon on a non-rooted device signed this challenge.” That distinction is what separates a strong, phishing-resistant MFA factor from a credential that any malware on a compromised handset could lift. It also complements the signing-side hardening discussed in our post-quantum authentication guide: post-quantum signatures protect the issuer’s keys, attestation protects the user’s device key.
StrongBox vs Secure Enclave vs TEE
These three terms get used interchangeably, but they describe different hardware. A TEE (Trusted Execution Environment, standardised by GlobalPlatform) is an isolated execution context running on the same application processor as the normal OS, protected by hardware (for example Arm TrustZone). It is fast and ubiquitous, but it shares silicon with the main CPU.
Android StrongBox is stronger: it is a discrete, tamper-resistant security chip (a Secure Element with its own CPU, RAM and storage) that meets a hardware certification bar. Apple’s Secure Enclave is a dedicated security coprocessor with its own boot ROM and AES engine, isolated from the main processor. The diagram below summarises the trade-offs.
How to read this diagram: It maps a single request - “give me a device-bound key” - onto the three secure-element options and their security properties. The branch on the left shows the physical location of the key material, which is the property that actually matters: a discrete chip (StrongBox) or coprocessor (Secure Enclave) is harder to attack than a zone sharing the main CPU (TEE). The right column captures the practical consequence for an identity provider, which is why the flows converge on a single policy node at the bottom. The takeaway is that an IdP should express a preference order (StrongBox > TEE) rather than treating all hardware-backed keys as equal, because the attestation tells it exactly which tier the device used.
How the attestation certificate chain works
When the app asks the platform to generate an attested key, the secure element creates the key pair and emits an attestation certificate that embeds the device’s claimed properties (security level, boot state, OS patch level, the challenge nonce). That leaf certificate is signed by an intermediate, which chains up to a hardware-vendor root - the Google hardware attestation root for Android, or Apple’s root for the Secure Enclave. The identity provider verifies the whole chain to a pinned root before it trusts anything the key signs.
How to read this diagram: This sequence shows the full verification handshake, left to right in time. The server starts by issuing a fresh nonce so the device cannot replay an old attestation - the secure element folds that nonce into the signed material. The device returns both the certificate chain and the signature, and the critical work happens on the server: it parses the attestation extension (security level, verified-boot state, patch level), then verifies the chain up to a pinned vendor root rather than any root the device offers. Only after the chain validates and policy passes does the IdP bind the key. The diagram makes clear that trust flows from the silicon vendor’s root through the chain to the server - the device never gets to assert its own trustworthiness unilaterally.
Why mandatory attestation matters for an identity provider
Without attestation, “passwordless” is a promise the device makes about itself. A rooted Android phone or a software emulator can present a perfectly valid key that lives in ordinary memory, where malware can read or clone it. Mandatory attestation removes that blind spot: the IdP inspects the boot state and security level reported in the certificate and rejects rooted, bootloader-unlocked, or emulated devices before any login is approved. This is the model standards bodies like the FIDO Alliance endorse for binding authenticators to verifiable hardware.
CAI-AUTH enforces this directly: it requires mandatory hardware attestation (Android StrongBox or TEE) and refuses to register device keys that fail the chain check or report a compromised boot state. For organisations weighing where their identity layer should live, our guide to running a self-hosted identity provider covers how attestation policy fits a sovereign deployment. CAI Technology is not a government authority.
Limits and caveats
Attestation is powerful but not magic. Coverage is uneven: not every Android device ships a StrongBox chip, so a strict StrongBox-only policy locks out otherwise-trustworthy hardware - most deployments accept TEE-level attestation as a floor. Key rotation needs a defined flow: when a user gets a new device, the old attested key must be retired and a new chain verified, not silently trusted. Root and intermediate certificates can be revoked, so the IdP must check revocation, not just chain validity. Finally, attestation proves the key’s environment, not the human - it pairs with, rather than replaces, user presence and biometric gestures. Treat it as a strong device-binding signal inside a layered design, not a single point of trust.
FAQ
What is hardware attestation?
Hardware attestation is a cryptographic proof that a private key was generated inside, and never leaves, a tamper-resistant secure element on a device, plus a signed report of the device’s security posture. A verifier checks the attestation certificate chain against the hardware vendor’s root before trusting the key.
What is StrongBox?
StrongBox is Android’s highest hardware-security tier: a discrete, tamper-resistant Secure Element chip with its own processor, memory and storage, certified to a hardware bar. Keys generated in StrongBox never touch the main application processor, and the platform can issue an attestation certificate proving a key lives there.
Can an identity provider detect a rooted phone?
Yes. The attestation certificate reports the device’s verified-boot state, bootloader lock status and security level. An identity provider that verifies the chain to a pinned vendor root can read those fields and reject rooted, bootloader-unlocked, or emulated devices before approving authentication - exactly what mandatory attestation policies are designed to do.
See mandatory hardware attestation in action - explore CAI-AUTH, an EU-operated post-quantum OIDC identity provider that requires hardware-backed device keys: auth.caitech.ro.