Hello,
Given the following example:
let privateKeyA = P521.KeyAgreement.PrivateKey() //Stored locally on device
let publicKeyA = privateKeyA.publicKey
let publicKeyAString = publicKeyA.rawRepresentation.base64EncodedString() //Stored on the server
My question is how do I later convert the publicKeyAString back into a proper publicKey of type: "P521.KeyAgreement.PublicKey"
With the end goal of something like:
let sharedSecret = try? privateKeyB.sharedSecretFromKeyAgreement(with: publicKeyA)