Why can't I use SecKeyCreateDecryptedData in ios10.2.x

Hi friends

i want to use secure enclave to iPad mini2(ios 10.2.1)



ex:

CFErrorRef err=nil;

CFDataRef result = SecKeyCreateDecryptedData(privateKey.m_underlying,kSecKeyAlgorithmECIESEncryptionStandardX963SHA256AESGCM, (__bridge CFDataRef)digest, &err);



but i got err

Error Domain=NSOSStatusErrorDomain Code=-50 "algid:encrypt:ECIES:ECDH:KDFX963:SHA256:AESGCM: algorithm not supported by the key <SecKeyRef:('com.apple.setoken') 0x1740aa6e0>" UserInfo={NSDescription=algid:encrypt:ECIES:ECDH:KDFX963:SHA256:AESGCM: algorithm not supported by the key <SecKeyRef:('com.apple.setoken') 0x1740aa6e0>}



my question is kSecKeyAlgorithmECIESEncryptionStandardX963SHA256AESGCM only for ios 10.3? for SecKeyCreateDecryptedData?

Replies

Does this work if you use an EC key that’s not in the Secure Enclave?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi eskimo

Yes , it work to general an ECC key pair ,

but i can't use secure enclave to encrypt or decrypt when i use ipad mini2(ios10.2),

and it working to iphoneX(ios10.3)


so my question is secure enclave's encrypt or decrypt function is only for device has fingerprint/FaceID and ios10.3 above?