I hit my head trying to generate a private public key pair with kSecAttrTokenIDSecureEnclave so that the private key is created in a secure enclave.
Where is kSecAttrTokenIDSecureEnclave documented? Below is my code that does not work with -50 status.
- (void)generateKeyPair { const UInt8 publicTagString[] = "public"; const UInt8 privateTagString[] = "private"; publicTag = CFDataCreate(0, publicTagString, sizeof(publicTagString)); privateTag = CFDataCreate(0, privateTagString, sizeof(privateTagString)); CFMutableDictionaryRef publicAttr = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, NULL, NULL); CFDictionaryAddValue(publicAttr, kSecAttrApplicationTag, publicTag);
security ios keychain
Randomblue
source share