Posts

Post not yet marked as solved
3 Replies
okay understand. thank you for your help.Another thing that I recognized.If I call the function SecKeyGeneratePair(<keyparamters>) with the same key parameters twice, it succeeds and I get two different key pairs.So far so good. Lets call them keyPair_A and keyPair_B.Now to retrieve a keypair from the secure enclave, I use the function SecItemCopyMatching(<keyparamters>) and I will get the key (keyreference) that matches the <keyparameters>. In my case I will get only keyPair_A. I will not be able to retrieve keyPair_B.So what makes me wondering here is, why does the second call of SecKeyGeneratePair(...) not return an error like "keypair already exists"?That would make sense to me. Or if it does not return an error, but instead would overwrite the keyPair_A with keyPair_B. I know you are probably not the one who makes the design decisions here, but perhaps you have some more information for me :-)