Mobile HSM Reference Architecture: Choosing Between StrongBox, TEE, Secure Enclave, eSE and Server-Side HSM

A mobile key-protection architecture has to choose where each key lives: the Android Keystore backed by the TEE or by StrongBox (KeyMint HAL), the Apple Secure Enclave (P-256 only, via CryptoKit or the Keychain), a GlobalPlatform applet on an embedded Secure Element reached through the Open Mobile API (OMAPI), or a server HSM evaluated under FIPS 140-3 / ISO/IEC 19790 and reached through PKCS#11 v3.1. Each tier gives up algorithm coverage, latency and how easily keys can be provisioned in exchange for stronger isolation. Interoperability depends on normalizing attestation evidence (the Android Key Attestation extension OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest, and the IETF RATS model in RFC 9334) so that one server-side policy engine can evaluate every platform.

Tier selection criteria

Use StrongBox only when the threat model includes physical or side-channel attacks on the main SoC and the algorithm set fits (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Use the TEE-backed Keystore when you need throughput or algorithms StrongBox does not offer. Use an eSE/GlobalPlatform applet only when you control applet provisioning (an OEM or MNO agreement, GP Card Specification v2.3.x secure channels). Keep root and issuing keys in a FIPS 140-3 server HSM and never derive them on the device.

Pre-implementation checklist

Gather the minimum Android API level (StrongBox needs API 28+, KeyMint arrives with Android 12), the share of your device fleet that reports FEATURE_STRONGBOX_KEYSTORE, the iOS baseline for App Attest (iOS 14+), the required securityLevel per key class, the user-authentication binding (biometric class, timeout), the attestation root and revocation-list sources, and the HSM PKCS#11 profile and key-ceremony procedure. Document an explicit fallback tier for each key class before writing code.

Rollout and recovery (illustrative scenario)

A banking app issues a P-256 signing key per device. Policy requires StrongBox on Android or the Secure Enclave on iOS, and accepts TEE-only devices at a reduced transaction limit. Roll out in stages behind a server-side flag, watching attestation-verification failures per device model. When a key is invalidated (biometric re-enrollment, factory reset, or a revoked attestation chain), do not try to recover the key. Re-enroll through a step-up identity check and issue a new key, because hardware-bound keys are designed to be non-exportable. The thresholds in this scenario are illustrative, not measured.

How can my backend verify that a mobile signing key really lives in StrongBox or the Secure Enclave and not in software?

Never trust a flag reported by the client. On Android, request a key attestation certificate chain with a server-issued challenge. Validate the chain up to Google's published attestation roots, check the revocation status list, and parse the KeyDescription extension: attestationSecurityLevel and keyMintSecurityLevel must both equal StrongBox (or TEE, if your policy allows it), and the attestationChallenge must match your challenge. On iOS, verify the App Attest attestation against Apple's App Attest root CA, check the App ID hash and counter, and validate later assertions. Record each verdict as a RATS-style appraisal result (RFC 9334). Re-attest periodically, and on failure move the device to the fallback tier or force re-enrollment.

Back to MobileHSM · Domains

← Back to MobileHSM
Engineering & Architecture Brief

Mobile HSM Reference Architecture: Choosing Between StrongBox, TEE, Secure Enclave, eSE and Server-Side HSM

A mobile key-protection architecture has to choose where each key lives: the Android Keystore backed by the TEE or by StrongBox (KeyMint HAL), the Apple Secure Enclave (P-256 only, via CryptoKit or the Keychain), a GlobalPlatform applet on an embedded Secure Element reached through the Open Mobile API (OMAPI), or a server HSM evaluated under FIPS 140-3 / ISO/IEC 19790 and reached through PKCS#11 v3.1. Each tier gives up algorithm coverage, latency and how easily keys can be provisioned in exchange for stronger isolation. Interoperability depends on normalizing attestation evidence (the Android Key Attestation extension OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest, and the IETF RATS model in RFC 9334) so that one server-side policy engine can evaluate every platform.

Tier selection criteria

Use StrongBox only when the threat model includes physical or side-channel attacks on the main SoC and the algorithm set fits (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Use the TEE-backed Keystore when you need throughput or algorithms StrongBox does not offer. Use an eSE/GlobalPlatform applet only when you control applet provisioning (an OEM or MNO agreement, GP Card Specification v2.3.x secure channels). Keep root and issuing keys in a FIPS 140-3 server HSM and never derive them on the device.

Pre-implementation checklist

Gather the minimum Android API level (StrongBox needs API 28+, KeyMint arrives with Android 12), the share of your device fleet that reports FEATURE_STRONGBOX_KEYSTORE, the iOS baseline for App Attest (iOS 14+), the required securityLevel per key class, the user-authentication binding (biometric class, timeout), the attestation root and revocation-list sources, and the HSM PKCS#11 profile and key-ceremony procedure. Document an explicit fallback tier for each key class before writing code.

Rollout and recovery (illustrative scenario)

A banking app issues a P-256 signing key per device. Policy requires StrongBox on Android or the Secure Enclave on iOS, and accepts TEE-only devices at a reduced transaction limit. Roll out in stages behind a server-side flag, watching attestation-verification failures per device model. When a key is invalidated (biometric re-enrollment, factory reset, or a revoked attestation chain), do not try to recover the key. Re-enroll through a step-up identity check and issue a new key, because hardware-bound keys are designed to be non-exportable. The thresholds in this scenario are illustrative, not measured.

Technical FAQ: How can my backend verify that a mobile signing key really lives in StrongBox or the Secure Enclave and not in software?

Never trust a flag reported by the client. On Android, request a key attestation certificate chain with a server-issued challenge. Validate the chain up to Google's published attestation roots, check the revocation status list, and parse the KeyDescription extension: attestationSecurityLevel and keyMintSecurityLevel must both equal StrongBox (or TEE, if your policy allows it), and the attestationChallenge must match your challenge. On iOS, verify the App Attest attestation against Apple's App Attest root CA, check the App ID hash and counter, and validate later assertions. Record each verdict as a RATS-style appraisal result (RFC 9334). Re-attest periodically, and on failure move the device to the fallback tier or force re-enrollment.

Related Architecture Specifications (HSM): wallethsm.com · autohsm.com · custodyhsm.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 →MobileHSM: Reference Architecture, Interoperability & Deterministic Telemetry →