SecKeyCreateWithData for a private key

Is it possible to use SecKeyCreateWithData to create a Private Key object that is

not stored in the blockchain? It is working fine for the Public Key object. Note: these

are not stored in the secure enclave.


I know some may not consider it a best practice but the use case is the following.

We have a situation whereby the private key needs to be backed up in case the

user loses their device or the lose their 2FA method for signing back into iCloud.

It would be preferable for them to use their existing keys (that may be shared with

lots of vendors) than to create need public/private keys and have to update all of

their accounts.


-Rosco

Replies

Jul 9 2018

Is it possible to use

SecKeyCreateWithData
to create a Private Key object that is not stored in the blockchain?

I’m presuming that you mean keychain and not blockchain. If so, the answer is “Yes” in general, although this won’t work on older versions of macOS.

Share and Enjoy

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

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