- KeychainTouchID app was installed using Xcode and executed. The key was generated by pressing "Add protected key" and it was used by pressing "Use protected key". The key was generated using Secure Enclave.
- Encrypted iPhone backup on the computer was made using iTunes. All content and settings where erased (Settings -> General -> Reset -> Erase All Content and Settings).
- Encrypted iPhone backup was restored to the same iPhone.
- Reinstallation for KeychainTouchID app needed to do as it was instaled using Xcode.
- KeychainTouchID app was executed.
- So after that:
By pressing "Use protected key" returns -26276 (AAPLKeychainTestsViewController.m @ 288 function -> SecItemCopyMatching)
By pressing "Delete protected key" reutrns -4 (AAPLKeychainTestsViewController.m @ 326 function -> SecItemDelete)
By pressing "Add protected key" returns success, but deletion and usage is not possible.
I found here: errSecInternal = -26276, /* An internal error occured in the Security framework. */
So in this case I can not access new added key.
- Why after backup restore SecItemCopyMatching returns -26276?
- Why it is not possible to delete this key, but it is possible to add?
- Dose sombody had this experience?
- What is the way to go around this problem?
I did post this issue to Apple team, but no answer for more than 1 month.