I have an RSA signed file and the public RSA key of the signer (as a text file).
I will validate the signature by calling IEngineCrypto::DecryptPublic() but first I need to turn my RSA key file into the FRSAKeyHandle that DecryptPublic() needs.
Does anyone know how to do this?
The only function I can see that creates an FRSAKeyHandle is CreateRSAKey() but that generates a new public/private keypair, it doesn’t take an existing public key.
Does anyone have any experience or examples for what must surely be a common use case for the crypto library?
Just call FRSA::CreateKey, it needs a public exponent which is usually 65537 (0x010001), a private exponent and a modulus. Remember to make sure all input arrays contain a single little endian large integer, you can get it by calling FBase64::Decode with a PEM key string that has no header and tail.