Thank you for the clarification Quinn!
While my program is running perfectly fine now,
I still have questions regarding its security.
QUESTIONS:
Is there any functionality just with the public key to get an evidence of a corresponding private key to be protected by the Secure Enclave without showing the source code?
Even with the most recent update of iOS 17.4, there is still no way to directly access the functionality of a Secure Element itself, is that right? So far I found a function SecureElementPass, and it seems like it’s the only interaction possible.
What is the difference between using Security API and Apple CryptoKit? I heard some were saying it the matter of habit and device support, but I still would like to hear an opinion of a professional.
Any information regarding that will be helpful. Thank you in advance for your time and effort!
Post
Replies
Boosts
Views
Activity
I found an issue. The problem was due to the limitations of the simulator. As soon as I run the app on my mobile phone, everything started to work
PS: The code above will produce double FaceID check :)
That's the correct version in the end:
func generatePrivateKey() -> SecKey? {
// 1. Create Keys Access Control
guard let accessControl =
SecAccessControlCreateWithFlags(
nil,
kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
[.privateKeyUsage, .biometryCurrentSet],
nil)
else {
fatalError("cannot set access control")
}