Moving Mobile Credentials from TEE Keystores to StrongBox and the Secure Enclave Without Losing the Fleet

Hardware-bound keys cannot be moved, so migrating from TEE-backed Keystore keys and white-box crypto to StrongBox, embedded secure elements and the Secure Enclave is not really a key migration. Every credential has to be re-minted on the new tier. That means every user goes through a re-enrollment path, and that path decides whether the budget holds. You buy lower fraud exposure per credential, and you pay in latency, lost device coverage and a fallback design that has to work on the day the secure element refuses.

There is no key migration, only re-issuance

Keys generated inside StrongBox or the Secure Enclave can't be exported by design, and keys in the old TEE keystore are just as stuck, so the migration is really a re-issuance campaign driven by the server. The sequence is straightforward. Generate a new key pair on the strongest tier the device offers, pull the key attestation chain, and have the backend check it against the hardware root and the reported security level. Then bind the new public key to the account, using the old credential as a one-time proof of continuity. That last step is the part that hurts: the old key signs the handover, so a device whose old key was already compromised hands the attacker a fresh hardware-backed credential, unless high-risk accounts go through an out-of-band check. Budget that check as a support cost and weigh it against the fraud loss it prevents on those specific accounts, not across the whole user base, because that comparison is what your security board will make when it reads the plan against secure element certification schemes such as Common Criteria and the payment industry's mobile security requirements.

Latency is the line item that gets underestimated

A secure element is a slow processor on a serial bus, often shared with payment and transit applets. Set a hard timeout of 800 ms on StrongBox signing in the interactive path, and treat anything past it as a tier failure rather than letting the UI hang. Signatures usually finish well within that budget. Key generation and attestation do not, so generate keys ahead of need during onboarding idle time and never at the moment of payment. The trade-off you can measure is conversion: any delay a user can feel in a login or payment confirmation shows up as abandonment. So spend the extra isolation on operations that justify it, such as transaction signing and credential unwrap, and keep session tokens on the TEE, where they are cheap and fast.

What keeps working when a tier fails

The failure that breaks naive migrations is permanent key invalidation. A user enrolls a new fingerprint, resets the device lock, or takes an OS update that clears secure element state, and the key bound to user authentication is gone, with no way to recover it inside the hardware. On Android this shows up as a permanently invalidated key or a StrongBox unavailable error. On iOS, a Secure Enclave key tied to a biometric set simply stops evaluating. The system survives only if the server already holds a second, independently enrolled credential, usually a TEE key without biometric binding or a platform-synced passkey, that can authorize a re-mint without a branch visit or a call to support. As an estimate, a meaningful single-digit percentage of active users trigger invalidation in a year, which is enough to make the recovery credential cheaper than the tickets it absorbs, since that cost grows with how often users change phones and fingerprints, not with how often they are attacked.

The rule for downgrades

Never let the client pick its own fallback tier silently: put the achieved security level in the attestation the server verifies, let server policy decide per operation whether TEE is acceptable, and refuse value-moving operations on anything weaker, which costs you the devices without StrongBox (as an estimate, a large minority of a mixed Android fleet) but stops the downgrade path from becoming the attack path.

Can we skip StrongBox and rely on TEE keys plus attestation?

For most of the session and authentication surface, yes, and it avoids the latency and coverage costs entirely. The gap is physical and side-channel resistance: a TEE shares silicon and memory with the application processor, while a secure element is evaluated against attackers who hold the device. If your fraud model includes stolen devices used to authorize high-value transfers, that gap is the thing you are paying to close. If it doesn't, keep the TEE and spend the budget on the recovery credential instead.

Back to MobileHSM · Domains

← Back to MobileHSM
Engineering & Architecture Brief

Moving Mobile Credentials from TEE Keystores to StrongBox and the Secure Enclave Without Losing the Fleet

Hardware-bound keys cannot be moved, so migrating from TEE-backed Keystore keys and white-box crypto to StrongBox, embedded secure elements and the Secure Enclave is not really a key migration. Every credential has to be re-minted on the new tier. That means every user goes through a re-enrollment path, and that path decides whether the budget holds. You buy lower fraud exposure per credential, and you pay in latency, lost device coverage and a fallback design that has to work on the day the secure element refuses.

There is no key migration, only re-issuance

Keys generated inside StrongBox or the Secure Enclave can't be exported by design, and keys in the old TEE keystore are just as stuck, so the migration is really a re-issuance campaign driven by the server. The sequence is straightforward. Generate a new key pair on the strongest tier the device offers, pull the key attestation chain, and have the backend check it against the hardware root and the reported security level. Then bind the new public key to the account, using the old credential as a one-time proof of continuity. That last step is the part that hurts: the old key signs the handover, so a device whose old key was already compromised hands the attacker a fresh hardware-backed credential, unless high-risk accounts go through an out-of-band check. Budget that check as a support cost and weigh it against the fraud loss it prevents on those specific accounts, not across the whole user base, because that comparison is what your security board will make when it reads the plan against secure element certification schemes such as Common Criteria and the payment industry's mobile security requirements.

Latency is the line item that gets underestimated

A secure element is a slow processor on a serial bus, often shared with payment and transit applets. Set a hard timeout of 800 ms on StrongBox signing in the interactive path, and treat anything past it as a tier failure rather than letting the UI hang. Signatures usually finish well within that budget. Key generation and attestation do not, so generate keys ahead of need during onboarding idle time and never at the moment of payment. The trade-off you can measure is conversion: any delay a user can feel in a login or payment confirmation shows up as abandonment. So spend the extra isolation on operations that justify it, such as transaction signing and credential unwrap, and keep session tokens on the TEE, where they are cheap and fast.

What keeps working when a tier fails

The failure that breaks naive migrations is permanent key invalidation. A user enrolls a new fingerprint, resets the device lock, or takes an OS update that clears secure element state, and the key bound to user authentication is gone, with no way to recover it inside the hardware. On Android this shows up as a permanently invalidated key or a StrongBox unavailable error. On iOS, a Secure Enclave key tied to a biometric set simply stops evaluating. The system survives only if the server already holds a second, independently enrolled credential, usually a TEE key without biometric binding or a platform-synced passkey, that can authorize a re-mint without a branch visit or a call to support. As an estimate, a meaningful single-digit percentage of active users trigger invalidation in a year, which is enough to make the recovery credential cheaper than the tickets it absorbs, since that cost grows with how often users change phones and fingerprints, not with how often they are attacked.

The rule for downgrades

Never let the client pick its own fallback tier silently: put the achieved security level in the attestation the server verifies, let server policy decide per operation whether TEE is acceptable, and refuse value-moving operations on anything weaker, which costs you the devices without StrongBox (as an estimate, a large minority of a mixed Android fleet) but stops the downgrade path from becoming the attack path.

Technical FAQ: Can we skip StrongBox and rely on TEE keys plus attestation?

For most of the session and authentication surface, yes, and it avoids the latency and coverage costs entirely. The gap is physical and side-channel resistance: a TEE shares silicon and memory with the application processor, while a secure element is evaluated against attackers who hold the device. If your fraud model includes stolen devices used to authorize high-value transfers, that gap is the thing you are paying to close. If it doesn't, keep the TEE and spend the budget on the recovery credential instead.

Related Architecture Specifications (HSM): canhsm.com · embeddedhsm.com · hsmguard.com

More Technical Articles on mobilehsm.com

Extending Enterprise Roots of Trust to Smartphones: Bridging Android StrongBox and Apple Secure Enclave with Backend HSMs →Mobile Banking Security: Defeating Jailbreaks, Emulators, and Memory Scraping with Hardware Attestation →Moving Mobile Credentials into StrongBox Without Breaking the Fleet →Moving trust onto the handset without making recovery impossible →MobileHSM: Reference Architecture, Interoperability & Deterministic Telemetry →