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.
More Technical Articles on mobilehsm.com
Arquitetura de Referência de HSM Móvel: Como Escolher entre StrongBox, TEE, Secure Enclave, eSE e HSM de Servidor
Uma arquitetura de proteção de chaves em dispositivos móveis precisa definir onde cada chave fica: no Android Keystore apoiado pelo TEE ou pelo StrongBox (HAL KeyMint), no Apple Secure Enclave (somente P-256, via CryptoKit ou Keychain), em um applet GlobalPlatform num Secure Element embarcado acessado pela Open Mobile API (OMAPI), ou num HSM de servidor avaliado sob FIPS 140-3 / ISO/IEC 19790 e acessado via PKCS#11 v3.1. Cada nível troca cobertura de algoritmos, latência e facilidade de provisionamento por um isolamento mais forte. A interoperabilidade depende de normalizar as evidências de atestação (a extensão de Android Key Attestation OID 1.3.6.1.4.1.11129.2.1.17, o Apple App Attest e o modelo IETF RATS da RFC 9334), para que um único motor de política no servidor avalie todas as plataformas.
Critérios de escolha do nível
Use StrongBox apenas quando o modelo de ameaça incluir ataques físicos ou de canal lateral ao SoC principal e o conjunto de algoritmos for suficiente (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Use o Keystore apoiado pelo TEE quando precisar de vazão ou de algoritmos que o StrongBox não oferece. Use um applet eSE/GlobalPlatform somente se você controlar o provisionamento do applet (acordo com OEM ou operadora, canais seguros da GP Card Specification v2.3.x). Mantenha as chaves raiz e emissoras num HSM de servidor FIPS 140-3 e nunca as derive no dispositivo.
Checklist pré-implementação
Levante o nível mínimo de API Android (StrongBox exige API 28+, o KeyMint chega com o Android 12), a fração da sua base de aparelhos que reporta FEATURE_STRONGBOX_KEYSTORE, a versão mínima do iOS para App Attest (iOS 14+), o securityLevel exigido por classe de chave, o vínculo com a autenticação do usuário (classe biométrica, timeout), as fontes da raiz de atestação e da lista de revogação, e o perfil PKCS#11 do HSM com o procedimento de cerimônia de chaves. Documente um nível de fallback explícito para cada classe de chave antes de escrever código.
Rollout e recuperação (cenário ilustrativo)
Um app bancário emite uma chave de assinatura P-256 por dispositivo. A política exige StrongBox no Android ou Secure Enclave no iOS e aceita aparelhos só com TEE com limite de transação reduzido. Libere em etapas atrás de uma flag no servidor, monitorando as falhas de verificação de atestação por modelo de aparelho. Quando uma chave for invalidada (novo cadastro biométrico, reset de fábrica ou cadeia de atestação revogada), não tente recuperá-la: recadastre o dispositivo com uma verificação de identidade reforçada e emita uma chave nova, porque chaves presas ao hardware são projetadas para não serem exportáveis. Os limites deste cenário são ilustrativos, não medidos.
FAQ Técnica: Como meu backend pode verificar se uma chave de assinatura móvel está mesmo no StrongBox ou no Secure Enclave, e não em software?
Nunca confie em uma flag informada pelo cliente. No Android, solicite a cadeia de certificados de key attestation com um desafio emitido pelo servidor. Valide a cadeia até as raízes de atestação publicadas pelo Google, consulte a lista de status de revogação e analise a extensão KeyDescription: attestationSecurityLevel e keyMintSecurityLevel devem ser ambos StrongBox (ou TEE, se a sua política permitir), e o attestationChallenge deve corresponder ao seu desafio. No iOS, verifique a atestação do App Attest contra a CA raiz do App Attest da Apple, confira o hash do App ID e o contador, e valide as asserções seguintes. Registre cada veredito como um resultado de avaliação no estilo RATS (RFC 9334). Reateste periodicamente e, em caso de falha, mova o dispositivo para o nível de fallback ou force o recadastro.
Mais Artigos Técnicos em mobilehsm.com
Arquitectura de Referencia de HSM Móvil: Cómo Elegir entre StrongBox, TEE, Secure Enclave, eSE y HSM de Servidor
Una arquitectura de protección de claves móviles tiene que decidir dónde reside cada clave: en el Android Keystore respaldado por el TEE o por StrongBox (HAL KeyMint), en el Apple Secure Enclave (solo P-256, mediante CryptoKit o el Keychain), en un applet GlobalPlatform de un Secure Element embebido accedido mediante la Open Mobile API (OMAPI), o en un HSM de servidor evaluado según FIPS 140-3 / ISO/IEC 19790 y accedido mediante PKCS#11 v3.1. Cada nivel cede cobertura de algoritmos, latencia y facilidad de aprovisionamiento a cambio de un aislamiento más fuerte. La interoperabilidad depende de normalizar la evidencia de atestación (la extensión de Android Key Attestation OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest y el modelo IETF RATS de la RFC 9334) para que un único motor de políticas en el servidor evalúe todas las plataformas.
Criterios de selección de nivel
Use StrongBox solo cuando el modelo de amenazas incluya ataques físicos o de canal lateral contra el SoC principal y el conjunto de algoritmos sea suficiente (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Use el Keystore respaldado por el TEE cuando necesite rendimiento o algoritmos que StrongBox no ofrece. Use un applet eSE/GlobalPlatform solo si controla el aprovisionamiento del applet (acuerdo con el OEM o el operador, canales seguros de GP Card Specification v2.3.x). Mantenga las claves raíz y emisoras en un HSM de servidor FIPS 140-3 y nunca las derive en el dispositivo.
Checklist previo a la implementación
Recopile el nivel mínimo de API de Android (StrongBox requiere API 28+, KeyMint llega con Android 12), la proporción de su parque de dispositivos que reporta FEATURE_STRONGBOX_KEYSTORE, la versión mínima de iOS para App Attest (iOS 14+), el securityLevel exigido por clase de clave, la vinculación con la autenticación del usuario (clase biométrica, tiempo de espera), las fuentes de la raíz de atestación y de la lista de revocación, y el perfil PKCS#11 del HSM junto con el procedimiento de ceremonia de claves. Documente un nivel de respaldo explícito para cada clase de clave antes de escribir código.
Despliegue y recuperación (escenario ilustrativo)
Una app bancaria emite una clave de firma P-256 por dispositivo. La política exige StrongBox en Android o Secure Enclave en iOS y acepta dispositivos solo con TEE con un límite de transacción reducido. Despliegue por etapas tras una flag en el servidor, vigilando los fallos de verificación de atestación por modelo de dispositivo. Cuando una clave quede invalidada (nuevo registro biométrico, restablecimiento de fábrica o cadena de atestación revocada), no intente recuperarla: vuelva a registrar el dispositivo con una verificación de identidad reforzada y emita una clave nueva, porque las claves ligadas al hardware están diseñadas para no ser exportables. Los umbrales de este escenario son ilustrativos, no medidos.
Preguntas Frecuentes Técnicas: ¿Cómo puede mi backend verificar que una clave de firma móvil reside realmente en StrongBox o en el Secure Enclave y no en software?
Nunca confíe en una flag informada por el cliente. En Android, solicite la cadena de certificados de key attestation con un desafío emitido por el servidor. Valide la cadena hasta las raíces de atestación publicadas por Google, consulte la lista de estado de revocación y analice la extensión KeyDescription: attestationSecurityLevel y keyMintSecurityLevel deben ser ambos StrongBox (o TEE, si su política lo permite), y el attestationChallenge debe coincidir con su desafío. En iOS, verifique la atestación de App Attest contra la CA raíz de App Attest de Apple, compruebe el hash del App ID y el contador, y valide las aserciones posteriores. Registre cada veredicto como un resultado de evaluación al estilo RATS (RFC 9334). Vuelva a atestar periódicamente y, si falla, mueva el dispositivo al nivel de respaldo o fuerce un nuevo registro.
Más Artículos Técnicos en mobilehsm.com
Architecture de Référence HSM Mobile : Choisir entre StrongBox, TEE, Secure Enclave, eSE et HSM Serveur
Une architecture de protection des clés mobiles doit décider où réside chaque clé : dans l'Android Keystore adossé au TEE ou à StrongBox (HAL KeyMint), dans l'Apple Secure Enclave (P-256 uniquement, via CryptoKit ou le Keychain), dans un applet GlobalPlatform d'un Secure Element embarqué accessible via l'Open Mobile API (OMAPI), ou dans un HSM serveur évalué selon FIPS 140-3 / ISO/IEC 19790 et accessible via PKCS#11 v3.1. Chaque niveau sacrifie de la couverture algorithmique, de la latence et de la facilité de provisionnement en échange d'une isolation plus forte. L'interopérabilité repose sur la normalisation des preuves d'attestation (l'extension Android Key Attestation OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest et le modèle IETF RATS de la RFC 9334), afin qu'un seul moteur de politique côté serveur puisse évaluer toutes les plateformes.
Critères de choix du niveau
Utilisez StrongBox uniquement si le modèle de menace inclut des attaques physiques ou par canal auxiliaire contre le SoC principal et si le jeu d'algorithmes suffit (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Utilisez le Keystore adossé au TEE lorsque vous avez besoin de débit ou d'algorithmes absents de StrongBox. Utilisez un applet eSE/GlobalPlatform seulement si vous maîtrisez le provisionnement de l'applet (accord avec l'OEM ou l'opérateur, canaux sécurisés de la GP Card Specification v2.3.x). Conservez les clés racines et émettrices dans un HSM serveur FIPS 140-3 et ne les dérivez jamais sur l'appareil.
Checklist avant implémentation
Recueillez le niveau d'API Android minimal (StrongBox exige l'API 28+, KeyMint arrive avec Android 12), la part de votre parc d'appareils qui déclare FEATURE_STRONGBOX_KEYSTORE, la version iOS minimale pour App Attest (iOS 14+), le securityLevel exigé par classe de clé, la liaison avec l'authentification de l'utilisateur (classe biométrique, délai d'expiration), les sources de la racine d'attestation et de la liste de révocation, ainsi que le profil PKCS#11 du HSM et la procédure de cérémonie des clés. Documentez un niveau de repli explicite pour chaque classe de clé avant d'écrire du code.
Déploiement et reprise (scénario illustratif)
Une application bancaire émet une clé de signature P-256 par appareil. La politique exige StrongBox sur Android ou la Secure Enclave sur iOS et accepte les appareils TEE seul avec un plafond de transaction réduit. Déployez par étapes derrière un flag côté serveur, en surveillant les échecs de vérification d'attestation par modèle d'appareil. Lorsqu'une clé est invalidée (nouvel enrôlement biométrique, réinitialisation d'usine ou chaîne d'attestation révoquée), n'essayez pas de la récupérer : réenrôlez l'appareil via une vérification d'identité renforcée et émettez une nouvelle clé, car les clés liées au matériel sont conçues pour être non exportables. Les seuils de ce scénario sont illustratifs et non mesurés.
FAQ Technique: Comment mon backend peut-il vérifier qu'une clé de signature mobile réside réellement dans StrongBox ou la Secure Enclave et non en logiciel ?
Ne faites jamais confiance à un flag déclaré par le client. Sur Android, demandez la chaîne de certificats de key attestation avec un défi émis par le serveur. Validez la chaîne jusqu'aux racines d'attestation publiées par Google, consultez la liste de statut de révocation et analysez l'extension KeyDescription : attestationSecurityLevel et keyMintSecurityLevel doivent tous deux valoir StrongBox (ou TEE si votre politique l'autorise), et attestationChallenge doit correspondre à votre défi. Sur iOS, vérifiez l'attestation App Attest auprès de la CA racine App Attest d'Apple, contrôlez le hash de l'App ID et le compteur, puis validez les assertions suivantes. Enregistrez chaque verdict comme un résultat d'évaluation de type RATS (RFC 9334). Réattestez périodiquement et, en cas d'échec, basculez l'appareil vers le niveau de repli ou imposez un réenrôlement.
Plus d'Articles Techniques sur mobilehsm.com
Architettura di Riferimento per HSM Mobile: Come Scegliere tra StrongBox, TEE, Secure Enclave, eSE e HSM Lato Server
Un'architettura di protezione delle chiavi mobili deve stabilire dove risiede ogni chiave: nell'Android Keystore supportato dal TEE o da StrongBox (HAL KeyMint), nell'Apple Secure Enclave (solo P-256, tramite CryptoKit o il Keychain), in un applet GlobalPlatform su un Secure Element integrato raggiungibile tramite la Open Mobile API (OMAPI), oppure in un HSM lato server valutato secondo FIPS 140-3 / ISO/IEC 19790 e raggiungibile tramite PKCS#11 v3.1. Ogni livello rinuncia a copertura algoritmica, latenza e facilità di provisioning in cambio di un isolamento più forte. L'interoperabilità dipende dalla normalizzazione delle evidenze di attestazione (l'estensione Android Key Attestation OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest e il modello IETF RATS della RFC 9334), così che un unico motore di policy lato server possa valutare tutte le piattaforme.
Criteri di scelta del livello
Usate StrongBox solo quando il modello di minaccia include attacchi fisici o side-channel contro il SoC principale e il set di algoritmi è sufficiente (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Usate il Keystore supportato dal TEE quando servono throughput o algoritmi che StrongBox non offre. Usate un applet eSE/GlobalPlatform solo se controllate il provisioning dell'applet (accordo con OEM o operatore, canali sicuri della GP Card Specification v2.3.x). Mantenete le chiavi radice e di emissione in un HSM lato server FIPS 140-3 e non derivatele mai sul dispositivo.
Checklist pre-implementazione
Raccogliete il livello minimo di API Android (StrongBox richiede API 28+, KeyMint arriva con Android 12), la quota del vostro parco dispositivi che riporta FEATURE_STRONGBOX_KEYSTORE, la versione minima di iOS per App Attest (iOS 14+), il securityLevel richiesto per classe di chiave, il vincolo con l'autenticazione dell'utente (classe biometrica, timeout), le fonti della radice di attestazione e della lista di revoca, e il profilo PKCS#11 dell'HSM con la procedura di cerimonia delle chiavi. Documentate un livello di fallback esplicito per ogni classe di chiave prima di scrivere codice.
Rilascio e ripristino (scenario illustrativo)
Un'app bancaria emette una chiave di firma P-256 per dispositivo. La policy richiede StrongBox su Android o la Secure Enclave su iOS e accetta i dispositivi solo TEE con un limite di transazione ridotto. Rilasciate per fasi dietro un flag lato server, monitorando i fallimenti di verifica dell'attestazione per modello di dispositivo. Quando una chiave viene invalidata (nuova registrazione biometrica, reset di fabbrica o catena di attestazione revocata), non tentate di recuperarla: registrate di nuovo il dispositivo con una verifica d'identità rafforzata ed emettete una nuova chiave, perché le chiavi legate all'hardware sono progettate per non essere esportabili. Le soglie di questo scenario sono illustrative, non misurate.
FAQ Tecnica: Come può il mio backend verificare che una chiave di firma mobile risieda davvero in StrongBox o nella Secure Enclave e non in software?
Non fidatevi mai di un flag dichiarato dal client. Su Android, richiedete la catena di certificati di key attestation con una challenge emessa dal server. Validate la catena fino alle radici di attestazione pubblicate da Google, consultate la lista di stato delle revoche e analizzate l'estensione KeyDescription: attestationSecurityLevel e keyMintSecurityLevel devono valere entrambi StrongBox (o TEE, se la vostra policy lo consente) e attestationChallenge deve corrispondere alla vostra challenge. Su iOS, verificate l'attestazione App Attest rispetto alla CA radice App Attest di Apple, controllate l'hash dell'App ID e il contatore, poi validate le asserzioni successive. Registrate ogni verdetto come risultato di valutazione in stile RATS (RFC 9334). Ripetete l'attestazione periodicamente e, in caso di errore, spostate il dispositivo al livello di fallback o imponete una nuova registrazione.
Altri Articoli Tecnici su mobilehsm.com
Referenzarchitektur für mobile HSMs: Auswahl zwischen StrongBox, TEE, Secure Enclave, eSE und serverseitigem HSM
Eine Architektur zum Schutz mobiler Schlüssel muss festlegen, wo jeder Schlüssel liegt: im Android Keystore auf Basis des TEE oder von StrongBox (KeyMint-HAL), in der Apple Secure Enclave (nur P-256, über CryptoKit oder die Keychain), in einem GlobalPlatform-Applet auf einem eingebetteten Secure Element, das über die Open Mobile API (OMAPI) angesprochen wird, oder in einem nach FIPS 140-3 / ISO/IEC 19790 evaluierten Server-HSM, das über PKCS#11 v3.1 angesprochen wird. Jede Stufe opfert Algorithmenabdeckung, Latenz und einfache Provisionierung zugunsten stärkerer Isolation. Die Interoperabilität hängt davon ab, die Attestierungsnachweise zu normalisieren (die Android-Key-Attestation-Erweiterung OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest und das IETF-RATS-Modell aus RFC 9334), damit eine einzige serverseitige Policy-Engine alle Plattformen bewerten kann.
Kriterien für die Stufenwahl
Setzen Sie StrongBox nur ein, wenn das Bedrohungsmodell physische oder Seitenkanalangriffe auf den Haupt-SoC umfasst und der Algorithmenumfang genügt (ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256). Nutzen Sie den TEE-basierten Keystore, wenn Sie Durchsatz oder Algorithmen brauchen, die StrongBox nicht bietet. Verwenden Sie ein eSE/GlobalPlatform-Applet nur, wenn Sie die Applet-Provisionierung kontrollieren (Vereinbarung mit OEM oder Netzbetreiber, sichere Kanäle der GP Card Specification v2.3.x). Halten Sie Root- und Ausstellerschlüssel in einem FIPS-140-3-Server-HSM und leiten Sie sie niemals auf dem Gerät ab.
Checkliste vor der Implementierung
Erfassen Sie das minimale Android-API-Level (StrongBox erfordert API 28+, KeyMint kommt mit Android 12), den Anteil Ihrer Geräteflotte, der FEATURE_STRONGBOX_KEYSTORE meldet, die iOS-Mindestversion für App Attest (iOS 14+), das geforderte securityLevel je Schlüsselklasse, die Bindung an die Benutzerauthentifizierung (Biometrieklasse, Timeout), die Quellen für Attestierungs-Root und Sperrliste sowie das PKCS#11-Profil des HSM und das Verfahren für die Schlüsselzeremonie. Dokumentieren Sie für jede Schlüsselklasse eine explizite Fallback-Stufe, bevor Sie Code schreiben.
Rollout und Wiederherstellung (illustratives Szenario)
Eine Banking-App stellt pro Gerät einen P-256-Signaturschlüssel aus. Die Policy verlangt StrongBox unter Android bzw. die Secure Enclave unter iOS und akzeptiert reine TEE-Geräte mit reduziertem Transaktionslimit. Führen Sie den Rollout stufenweise hinter einem serverseitigen Flag durch und überwachen Sie die Fehler bei der Attestierungsprüfung je Gerätemodell. Wird ein Schlüssel ungültig (biometrische Neuregistrierung, Werksreset oder gesperrte Attestierungskette), versuchen Sie nicht, ihn wiederherzustellen: Registrieren Sie das Gerät über eine verschärfte Identitätsprüfung neu und stellen Sie einen neuen Schlüssel aus, denn hardwaregebundene Schlüssel sind bewusst nicht exportierbar. Die Schwellenwerte dieses Szenarios sind illustrativ, nicht gemessen.
Technische FAQ: Wie kann mein Backend prüfen, dass ein mobiler Signaturschlüssel tatsächlich in StrongBox oder der Secure Enclave liegt und nicht in Software?
Vertrauen Sie niemals einem vom Client gemeldeten Flag. Fordern Sie unter Android die Key-Attestation-Zertifikatskette mit einer vom Server ausgestellten Challenge an. Validieren Sie die Kette bis zu den von Google veröffentlichten Attestierungs-Roots, prüfen Sie die Sperrstatusliste und werten Sie die KeyDescription-Erweiterung aus: attestationSecurityLevel und keyMintSecurityLevel müssen beide StrongBox sein (oder TEE, falls Ihre Policy das zulässt), und attestationChallenge muss Ihrer Challenge entsprechen. Prüfen Sie unter iOS die App-Attest-Attestierung gegen Apples App-Attest-Root-CA, kontrollieren Sie den App-ID-Hash und den Zähler und validieren Sie die folgenden Assertions. Protokollieren Sie jedes Ergebnis als Bewertungsergebnis im Sinne von RATS (RFC 9334). Attestieren Sie regelmäßig neu und stufen Sie das Gerät bei einem Fehler auf die Fallback-Stufe herab oder erzwingen Sie eine Neuregistrierung.
Weitere Fachartikel auf mobilehsm.com
移动 HSM 参考架构:如何在 StrongBox、TEE、Secure Enclave、eSE 与服务器端 HSM 之间选型
移动密钥保护架构必须决定每把密钥存放在哪里:由 TEE 或 StrongBox(KeyMint HAL)支撑的 Android Keystore;Apple Secure Enclave(仅支持 P-256,通过 CryptoKit 或钥匙串使用);嵌入式安全元件上的 GlobalPlatform 小程序(通过 Open Mobile API,即 OMAPI 访问);或者按 FIPS 140-3 / ISO/IEC 19790 评估、通过 PKCS#11 v3.1 访问的服务器 HSM。隔离强度每提高一级,就要在算法覆盖、延迟和供应便利性上付出代价。互操作性的关键在于把各平台的证明证据归一化(Android Key Attestation 扩展 OID 1.3.6.1.4.1.11129.2.1.17、Apple App Attest,以及 RFC 9334 定义的 IETF RATS 模型),这样服务器端只需一个策略引擎就能评估所有平台。
层级选择标准
仅当威胁模型包含针对主 SoC 的物理攻击或侧信道攻击,且算法集足够(ECDSA P-256、RSA-2048、AES-128/256、HMAC-SHA256)时,才使用 StrongBox。需要更高吞吐量或 StrongBox 不支持的算法时,使用 TEE 支撑的 Keystore。只有在您能掌控小程序供应(与 OEM 或运营商签有协议,并使用 GP Card Specification v2.3.x 安全通道)时,才使用 eSE/GlobalPlatform 小程序。根密钥和签发密钥应保存在符合 FIPS 140-3 的服务器 HSM 中,绝不在终端上派生。
实施前检查清单
收集最低 Android API 级别(StrongBox 需要 API 28 及以上,KeyMint 随 Android 12 引入)、您的设备群中报告 FEATURE_STRONGBOX_KEYSTORE 的比例、App Attest 所需的最低 iOS 版本(iOS 14 及以上)、每类密钥要求的 securityLevel、与用户认证的绑定方式(生物识别等级、超时时间)、证明根证书和吊销列表的来源,以及 HSM 的 PKCS#11 配置和密钥仪式流程。在编写代码之前,为每类密钥写明回退层级。
灰度发布与恢复(示例场景)
某银行 App 为每台设备签发一把 P-256 签名密钥。策略要求 Android 使用 StrongBox、iOS 使用 Secure Enclave,仅具备 TEE 的设备也可接入,但交易限额较低。通过服务器端开关分阶段发布,并按设备型号监控证明验证失败的情况。当密钥失效(重新录入生物特征、恢复出厂设置或证明链被吊销)时,不要尝试找回密钥,而应通过加强的身份核验重新注册设备并签发新密钥,因为绑定硬件的密钥在设计上就不可导出。本场景中的阈值仅为示例,并非实测数据。
技术常见问题 (FAQ): 后端如何验证移动端签名密钥确实存放在 StrongBox 或 Secure Enclave 中,而不是软件里?
永远不要信任客户端自己上报的标志。在 Android 上,使用服务器下发的挑战值请求密钥证明证书链。将证书链验证到 Google 公布的证明根证书,查询吊销状态列表,并解析 KeyDescription 扩展:attestationSecurityLevel 和 keyMintSecurityLevel 都必须为 StrongBox(如果策略允许,也可以是 TEE),且 attestationChallenge 必须与您下发的挑战值一致。在 iOS 上,依据 Apple 的 App Attest 根 CA 验证 App Attest 证明,核对 App ID 哈希和计数器,然后验证后续的断言。把每次判定都按 RATS 风格(RFC 9334)记录为评估结果。定期重新证明;验证失败时,把设备降到回退层级或强制重新注册。
更多技术文章: mobilehsm.com
モバイル HSM リファレンスアーキテクチャ:StrongBox・TEE・Secure Enclave・eSE・サーバー側 HSM の選び方
モバイル向けの鍵保護アーキテクチャでは、各鍵をどこに置くかを決める必要があります。選択肢は、TEE または StrongBox(KeyMint HAL)を基盤とする Android Keystore、Apple Secure Enclave(P-256 のみ、CryptoKit またはキーチェーン経由)、Open Mobile API(OMAPI)でアクセスする組み込み Secure Element 上の GlobalPlatform アプレット、そして FIPS 140-3 / ISO/IEC 19790 に基づいて評価され PKCS#11 v3.1 でアクセスするサーバー HSM です。分離を強くするほど、アルゴリズムの対応範囲、レイテンシ、プロビジョニングの容易さが犠牲になります。相互運用性は、アテステーションの証拠を正規化できるかどうかにかかっています(Android Key Attestation 拡張 OID 1.3.6.1.4.1.11129.2.1.17、Apple App Attest、RFC 9334 の IETF RATS モデル)。正規化できれば、サーバー側のひとつのポリシーエンジンで全プラットフォームを評価できます。
階層の選定基準
StrongBox を使うのは、脅威モデルにメイン SoC への物理攻撃やサイドチャネル攻撃が含まれ、かつ必要なアルゴリズムがそろっている場合(ECDSA P-256、RSA-2048、AES-128/256、HMAC-SHA256)に限ります。スループットが必要な場合や、StrongBox にないアルゴリズムが必要な場合は、TEE ベースの Keystore を使います。eSE/GlobalPlatform アプレットは、アプレットのプロビジョニングを自社で管理できる場合(OEM またはキャリアとの契約があり、GP Card Specification v2.3.x のセキュアチャネルを使える場合)にのみ採用します。ルート鍵と発行鍵は FIPS 140-3 準拠のサーバー HSM に保管し、端末上では決して導出しません。
実装前チェックリスト
次の情報を集めます。Android の最小 API レベル(StrongBox には API 28 以上が必要、KeyMint は Android 12 で導入)、自社の端末群のうち FEATURE_STRONGBOX_KEYSTORE を報告する割合、App Attest に必要な iOS の最低バージョン(iOS 14 以上)、鍵クラスごとに要求する securityLevel、ユーザー認証との結び付け方(生体認証クラス、タイムアウト)、アテステーションのルートと失効リストの入手元、HSM の PKCS#11 プロファイルと鍵セレモニーの手順です。コードを書く前に、鍵クラスごとのフォールバック階層を明文化しておきます。
段階的展開と復旧(説明用シナリオ)
ある銀行アプリが端末ごとに P-256 の署名鍵を発行します。ポリシーでは Android なら StrongBox、iOS なら Secure Enclave を必須とし、TEE のみの端末は取引上限を下げたうえで受け入れます。サーバー側のフラグを使って段階的に展開し、アテステーション検証の失敗を端末機種ごとに監視します。鍵が無効になった場合(生体情報の再登録、工場出荷時リセット、アテステーションチェーンの失効など)は、鍵を復旧しようとしてはいけません。強化した本人確認を経て端末を再登録し、新しい鍵を発行します。ハードウェアに結び付いた鍵は、そもそもエクスポートできないように設計されているからです。このシナリオのしきい値は説明用の例であり、実測値ではありません。
技術FAQ: モバイルの署名鍵がソフトウェアではなく、本当に StrongBox や Secure Enclave の中にあることを、バックエンドでどう検証すればよいですか?
クライアントが申告するフラグは決して信用しないでください。Android では、サーバーが発行したチャレンジを使って鍵アテステーションの証明書チェーンを要求します。チェーンを Google が公開しているアテステーションルートまで検証し、失効ステータスリストを確認したうえで、KeyDescription 拡張を解析します。attestationSecurityLevel と keyMintSecurityLevel がどちらも StrongBox(ポリシーで許可している場合は TEE)であり、attestationChallenge が発行したチャレンジと一致している必要があります。iOS では、App Attest のアテステーションを Apple の App Attest ルート CA に照らして検証し、App ID のハッシュとカウンターを確認してから、その後のアサーションを検証します。判定結果はそれぞれ RATS 形式(RFC 9334)の評価結果として記録します。定期的に再アテステーションを行い、失敗した場合は端末をフォールバック階層に下げるか、再登録を求めます。
その他の技術記事: mobilehsm.com
모바일 HSM 레퍼런스 아키텍처: StrongBox, TEE, Secure Enclave, eSE, 서버 측 HSM 중 무엇을 선택할 것인가
모바일 키 보호 아키텍처는 각 키를 어디에 둘지 정해야 합니다. 선택지는 TEE 또는 StrongBox(KeyMint HAL) 기반의 Android Keystore, Apple Secure Enclave(P-256만 지원, CryptoKit 또는 키체인을 통해 사용), Open Mobile API(OMAPI)로 접근하는 임베디드 Secure Element의 GlobalPlatform 애플릿, 그리고 FIPS 140-3 / ISO/IEC 19790에 따라 평가되고 PKCS#11 v3.1로 접근하는 서버 HSM입니다. 격리 수준을 높일수록 알고리즘 지원 범위, 지연 시간, 프로비저닝 편의성을 포기해야 합니다. 상호운용성은 증명(attestation) 증거를 정규화하는 데 달려 있습니다(Android Key Attestation 확장 OID 1.3.6.1.4.1.11129.2.1.17, Apple App Attest, RFC 9334의 IETF RATS 모델). 그래야 서버 측 정책 엔진 하나로 모든 플랫폼을 평가할 수 있습니다.
계층 선택 기준
위협 모델에 메인 SoC에 대한 물리 공격이나 부채널 공격이 포함되고 필요한 알고리즘이 모두 지원될 때(ECDSA P-256, RSA-2048, AES-128/256, HMAC-SHA256)만 StrongBox를 사용합니다. 높은 처리량이 필요하거나 StrongBox가 지원하지 않는 알고리즘이 필요하면 TEE 기반 Keystore를 사용합니다. eSE/GlobalPlatform 애플릿은 애플릿 프로비저닝을 직접 통제할 수 있을 때(OEM 또는 통신사와 계약이 있고 GP Card Specification v2.3.x 보안 채널을 쓸 수 있을 때)만 채택합니다. 루트 키와 발급 키는 FIPS 140-3 서버 HSM에 보관하고, 단말에서 절대 파생하지 않습니다.
구현 전 체크리스트
다음 정보를 수집합니다. 최소 Android API 레벨(StrongBox는 API 28 이상 필요, KeyMint는 Android 12에서 도입), 보유 단말 중 FEATURE_STRONGBOX_KEYSTORE를 보고하는 비율, App Attest에 필요한 최소 iOS 버전(iOS 14 이상), 키 클래스별로 요구하는 securityLevel, 사용자 인증과의 바인딩 방식(생체 인증 등급, 타임아웃), 증명 루트와 폐기 목록의 출처, HSM의 PKCS#11 프로파일과 키 세리머니 절차입니다. 코드를 작성하기 전에 키 클래스마다 폴백 계층을 명시적으로 문서화합니다.
단계적 배포와 복구(예시 시나리오)
한 뱅킹 앱이 단말마다 P-256 서명 키를 하나씩 발급합니다. 정책상 Android에서는 StrongBox, iOS에서는 Secure Enclave가 필수이며, TEE만 있는 단말은 거래 한도를 낮춰 허용합니다. 서버 측 플래그로 단계적으로 배포하면서 단말 모델별 증명 검증 실패를 모니터링합니다. 키가 무효화되면(생체 정보 재등록, 공장 초기화, 증명 체인 폐기 등) 키를 복구하려 하지 말고, 강화된 본인 확인을 거쳐 단말을 재등록한 뒤 새 키를 발급합니다. 하드웨어에 묶인 키는 처음부터 내보낼 수 없도록 설계되어 있기 때문입니다. 이 시나리오의 임계값은 예시일 뿐 실측값이 아닙니다.
기술 FAQ: 모바일 서명 키가 소프트웨어가 아니라 실제로 StrongBox나 Secure Enclave 안에 있는지 백엔드에서 어떻게 검증할 수 있나요?
클라이언트가 보고하는 플래그는 절대 신뢰하지 마십시오. Android에서는 서버가 발급한 챌린지로 키 증명 인증서 체인을 요청합니다. 체인을 Google이 공개한 증명 루트까지 검증하고, 폐기 상태 목록을 확인한 다음, KeyDescription 확장을 파싱합니다. attestationSecurityLevel과 keyMintSecurityLevel이 모두 StrongBox(정책이 허용한다면 TEE)여야 하고, attestationChallenge가 발급한 챌린지와 일치해야 합니다. iOS에서는 App Attest 증명을 Apple의 App Attest 루트 CA로 검증하고, App ID 해시와 카운터를 확인한 뒤, 이후의 어설션을 검증합니다. 각 판정은 RATS 방식(RFC 9334)의 평가 결과로 기록합니다. 주기적으로 재증명하고, 실패하면 단말을 폴백 계층으로 내리거나 재등록을 요구합니다.