That’s what I had assumed too, but the technical feasibility to do so doesn’t necessarily mean that SecKeyCreateWithData will act as expected. I had initially assumed it was creating a key with the specified representation but I’ve tried creating it with bogus NSData and it still yields new keys so I now suspect that it simply generates new ones.
Intuitively, the API called by CreateWithData would presumably be a key creation API where it specifies the additional data to use with the key (e.g., an existing x963 representation) but evidently this value must be ignored by the Secure Enclave because it does not appear to generate compatible keys.
So, whilst I suspect it is technically feasible to convert between the representation, I am back to thinking that there is not actually a way to do it with available APIs.
Of course, this is all just my understanding.
Topic:
Privacy & Security
SubTopic:
General
Tags: