In .NET 5 and 6, we can use RSA.ImportFromPem to import a PEM-formatted RSA public key . Older .NET Core versions and .NET Framework don’t offer that functionality – but with some extension methods and a little help from CryptoAPI, we can fill that gap. .NET Core 3.1 and below Although .NET Core 3.1 and older versions don’t support RSA.ImportFromPem, they do support 2 other useful methods: RSA.ImportRSAPublicKey, which imports a public key from a DER-encoded PKCS#1 RSAPublicKey structur...