Where is my passcode stored?

Where is my passcode stored?

iPhone 7, iOS 13

Posted on Jul 7, 2021 5:27 PM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Jul 7, 2021 5:54 PM

It’s not.


The passcode is the data encryption and decryption key for your data.


The passcode itself is not stored; not encrypted, and not in clear text.


Outside of Keychain, passwords are generally not stored, one-way cryptographic (password) hashes are stored when a comparison is needed, or when a password might otherwise m]need ro be saved.


Password hashes are deliberately slow to calculate, and work one way, from password to hash, and not (as contrasted with encryption) not easily reversed back to the password.


Hashes? How does this password verification work? The candidate password is hashed, and the hash is then checked against the saved password hash. Or the passcode is used to try to decrypt the data, in some other cases,


Touch ID and Face ID are a means intended to allow the passcode to be entered less often, and which allows the user to select and use a longer and more robust passcode or password without having to re-enter it quite as often. Touch ID and Face ID do not replace the passcode.

3 replies
Sort By: 
Question marked as ⚠️ Top-ranking reply

Jul 7, 2021 5:54 PM in response to graciela75

It’s not.


The passcode is the data encryption and decryption key for your data.


The passcode itself is not stored; not encrypted, and not in clear text.


Outside of Keychain, passwords are generally not stored, one-way cryptographic (password) hashes are stored when a comparison is needed, or when a password might otherwise m]need ro be saved.


Password hashes are deliberately slow to calculate, and work one way, from password to hash, and not (as contrasted with encryption) not easily reversed back to the password.


Hashes? How does this password verification work? The candidate password is hashed, and the hash is then checked against the saved password hash. Or the passcode is used to try to decrypt the data, in some other cases,


Touch ID and Face ID are a means intended to allow the passcode to be entered less often, and which allows the user to select and use a longer and more robust passcode or password without having to re-enter it quite as often. Touch ID and Face ID do not replace the passcode.

Reply

Jul 7, 2021 5:47 PM in response to graciela75

The iOS or iPadOS screen lock passcode is never store on the device itself. It gets used when set to generate an encryption/decryption key stored in Secure Enclave and necessary to decrypt your data (Secure Enclave is used on all devices beginning with the iPhone 5S). Since the key is generated based on the passcode used, you need that exact passcode (or its FaceID or touchID surrogate) to use the keys to decrypt your data and use your device. But the passcode itself is never saved in memory. Macworld and other Apple tech sites have had articles explaining why the passcode is not recoverable. You cannot recover something that isn’t saved in the first place.


That’s why Apple cannot help if you forget the screen lock passcode. And the only way to reset it is to erase and restore the device. When restoring and setting up the device again, entirely new encryption keys are generated.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Where is my passcode stored?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.