iOS Keychain
Qu'est-ce que iOS Keychain ?
iOS KeychainApple's encrypted credential store on iOS, iPadOS, and macOS, backed by the Secure Enclave and graded by per-item accessibility classes that bind decryption to device unlock, passcode, biometric, or hardware-bound state.
The iOS Keychain is the OS-level encrypted credential and secret store used by iOS, iPadOS, macOS, watchOS, and tvOS, accessed via the SecItem* APIs. Items are encrypted with keys ultimately rooted in the Secure Enclave's hardware key and tied to the device's UID, so a Keychain database extracted off the device cannot be decrypted on different hardware. Each Keychain item carries an accessibility class that controls when it can be unlocked: `kSecAttrAccessibleWhenUnlocked`, `kSecAttrAccessibleAfterFirstUnlock`, the more restrictive `*ThisDeviceOnly` variants, and biometric- or passcode-gated `kSecAccessControl` constraints that require Face ID/Touch ID or the device passcode for each read. Common pitfalls in mobile AppSec include using too-permissive accessibility (e.g. `WhenUnlocked` without `ThisDeviceOnly`, which lets the item iCloud-sync across devices), storing high-entropy bearer tokens that don't need device-bound protection, and skipping `SecAccessControl` for credentials worth biometric-gating. Frida-based attacks on jailbroken devices can dump the Keychain unless items also carry hardware-bound access control. OWASP MASVS controls MSTG-CRYPTO and MSTG-STORAGE map directly to correct Keychain usage.
● Exemples
- 01
A banking app stores its OAuth refresh token with `kSecAttrAccessibleWhenUnlockedThisDeviceOnly` and `kSecAccessControlBiometryCurrentSet`, requiring fresh Face ID on every read.
- 02
An audit finds an app storing API keys with `kSecAttrAccessibleAlways`, allowing extraction from a backup; the finding maps to MASVS MSTG-STORAGE-2.
● Questions fréquentes
Qu'est-ce que iOS Keychain ?
Apple's encrypted credential store on iOS, iPadOS, and macOS, backed by the Secure Enclave and graded by per-item accessibility classes that bind decryption to device unlock, passcode, biometric, or hardware-bound state. Cette notion relève de la catégorie Sécurité mobile en cybersécurité.
Que signifie iOS Keychain ?
Apple's encrypted credential store on iOS, iPadOS, and macOS, backed by the Secure Enclave and graded by per-item accessibility classes that bind decryption to device unlock, passcode, biometric, or hardware-bound state.
Comment fonctionne iOS Keychain ?
The iOS Keychain is the OS-level encrypted credential and secret store used by iOS, iPadOS, macOS, watchOS, and tvOS, accessed via the SecItem* APIs. Items are encrypted with keys ultimately rooted in the Secure Enclave's hardware key and tied to the device's UID, so a Keychain database extracted off the device cannot be decrypted on different hardware. Each Keychain item carries an accessibility class that controls when it can be unlocked: `kSecAttrAccessibleWhenUnlocked`, `kSecAttrAccessibleAfterFirstUnlock`, the more restrictive `*ThisDeviceOnly` variants, and biometric- or passcode-gated `kSecAccessControl` constraints that require Face ID/Touch ID or the device passcode for each read. Common pitfalls in mobile AppSec include using too-permissive accessibility (e.g. `WhenUnlocked` without `ThisDeviceOnly`, which lets the item iCloud-sync across devices), storing high-entropy bearer tokens that don't need device-bound protection, and skipping `SecAccessControl` for credentials worth biometric-gating. Frida-based attacks on jailbroken devices can dump the Keychain unless items also carry hardware-bound access control. OWASP MASVS controls MSTG-CRYPTO and MSTG-STORAGE map directly to correct Keychain usage.
Comment se défendre contre iOS Keychain ?
Les défenses contre iOS Keychain combinent habituellement des contrôles techniques et des pratiques opérationnelles, comme détaillé dans la définition ci-dessus.
Quels sont les autres noms de iOS Keychain ?
Noms alternatifs courants : Apple Keychain, iOS Keychain Services.
● Termes liés
- mobile-security№ 052
Android Keystore System
Android's hardware-backed key container that confines cryptographic key material to a Trusted Execution Environment or StrongBox, exposing keys only by reference and enforcing per-key access policies such as biometric or device-credential gating.
- mobile-security№ 772
Sécurité des applications mobiles
Pratique consistant a concevoir, developper et tester des applications iOS et Android afin de proteger les donnees utilisateur, empecher la retro-ingenierie et resister a la manipulation en execution.
- compliance№ 871
OWASP MASVS
Mobile Application Security Verification Standard de l'OWASP, socle d'exigences de securite testables pour les applications mobiles iOS et Android.
- cloud-security№ 1097
Enclave sécurisée
Zone d'un processeur ou d'un SoC isolée par le matériel et protégée en intégrité, qui exécute du code sensible et stocke des clés hors d'atteinte du système d'exploitation principal.
- identity-access№ 112
Authentification biométrique
Méthode d'authentification qui vérifie l'identité à partir de caractéristiques physiques ou physiologiques uniques comme les empreintes, le visage, l'iris ou la voix.
- cryptography№ 457
Cle de securite FIDO
Authentificateur materiel utilisant les standards FIDO U2F ou FIDO2/WebAuthn pour realiser une authentification par cle publique resistante au phishing vers les services web et d'entreprise.
● Voir aussi
- № 062Apple App Attest