Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 612

iOS Keychain

Что такое 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.

Примеры

  1. 01

    A banking app stores its OAuth refresh token with `kSecAttrAccessibleWhenUnlockedThisDeviceOnly` and `kSecAccessControlBiometryCurrentSet`, requiring fresh Face ID on every read.

  2. 02

    An audit finds an app storing API keys with `kSecAttrAccessibleAlways`, allowing extraction from a backup; the finding maps to MASVS MSTG-STORAGE-2.

Частые вопросы

Что такое 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. Относится к категории Мобильная безопасность в кибербезопасности.

Что означает 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.

Как работает 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.

Как защититься от iOS Keychain?

Защита от iOS Keychain обычно сочетает технические меры и операционные практики, как описано в определении выше.

Какие есть другие названия iOS Keychain?

Распространённые альтернативные названия: Apple Keychain, iOS Keychain Services.

Связанные термины

См. также