Our customer has their public RSA key stored in a certificate.
We need this key hardcoded in our WinRT app, so we can encrypt client-side. However, we're having issues importing the key into an instance of the CryptographicKey class.
We're using the ImportPublicKey on the RSAProvider:
rsaProvider = AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.RsaPkcs1);
key = rsaProvider.ImportPublicKey(publicKeyBuffer);
We've tried loading several things into the publicKeyBuffer: The certificate, the public key exported from the certificate in several formats.
How do load their public key?