How to convert base64 encoded private key and public key with EC with secp256r1 (curve) to SecKey using swift4 code?

I am searching for a way using swift4 code (not terminal commands) to convert base64 encoded private key and public key with EC with secp256r1 (curve) to SecKey.

After I get private and public SecKey, I will be signing some data and verifying the same with SHA256withECDSA algorithm.

Replies

I am searching for a way using swift4 code (not terminal commands) to convert base64 encoded private key and public key with EC with secp256r1 (curve) to SecKey.

Is this iOS or macOS?

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com