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.
● 例
- 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.
● よくある質問
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。
● 関連用語
- 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
モバイルアプリのセキュリティ
iOS および Android アプリのライフサイクル全体でユーザーデータを保護し、リバースエンジニアリングや実行時改ざんに耐えられるよう設計・実装・検証する取り組み。
- compliance№ 871
OWASP MASVS
OWASP モバイルアプリケーションセキュリティ検証標準。iOS と Android のモバイルアプリ向けの検証可能なセキュリティ要件の基盤。
- cloud-security№ 1097
セキュアエンクレーブ
ハードウェアで隔離され完全性が保護されたプロセッサまたは SoC 内の領域。機微なコードを動かし、メイン OS の手の届かない場所で鍵を保管する。
- identity-access№ 112
生体認証
指紋・顔・虹彩・声紋など、個人固有の身体的・生理的特徴によって本人確認を行う認証方式。
- cryptography№ 457
FIDO セキュリティキー
FIDO U2F または FIDO2/WebAuthn 規格を用いるハードウェア認証器で、Web や業務サービスに対しフィッシング耐性のある公開鍵認証を行う。
● 関連項目
- № 062Apple App Attest