In normal ASP.NET for RSA signature / verification, I used the System.Security.Cryptography.RSACryptoServiceProvider class. Everything is clear with him.

That's just in ASP.NET Core, as I understand it, it is not. There is only the abstract class System.Security.Cryptography.RSA :(

Do not tell me which class should be used in ASP.NET Core for RSA algorithms?

    1 answer 1

    You need to add the System.Security.Cryptography.Csp nuget package to the project.json :

     "frameworks": { "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" }, "System.Security.Cryptography.Csp": "4.0.0" }, "imports": "dnxcore50" } } 

    RSACryptoServiceProvider from CoreFX is slightly different from the similar class from the .NET Framework adult. Documentation on it is here .

    • Is it cross-platform? (I can’t understand how to distinguish cross-platform builds from those that work only under Windows :() - Dmitry Garbuz
    • @ DmitryGarbuz yes, such pacts in the description on nuget.org indicate the architecture .NETCore and .NETStandard - kmv