Open this lesson in your favourite AI. It'll walk you through the why, explain the demo, and quiz you on the try-it list.
Mobile apps store secrets — auth tokens, encryption keys, biometric template hashes. Right storage matters: iOS Keychain (hardware-backed on devices with Secure Enclave), Android Keystore (hardware-backed via TEE / StrongBox). Storing secrets in plain UserDefaults / SharedPreferences = secrets readable by anyone with file-system access.
iOS Keychain: SecItemAdd(['kSecClass': 'kSecClassGenericPassword', 'kSecAttrAccessControl': SecAccessControlCreateWithFlags(.devicePasscode)]). Stored encrypted, requires device passcode to access. Android: KeyStore.getInstance('AndroidKeyStore'), key never leaves StrongBox.
Use these three in order. Each builds on the one before.
In one paragraph, explain Keychain / Keystore.
Walk me through what happens when an app stores a secret in iOS Keychain with biometric protection.
Design secret management for a multi-platform mobile app.