[EDIT: please see C# / OPENSSH RSA ENCRYPTION MADE EVEN EASIER]
The struggle to uncover the secrets of importing from and export to OpenSSH keys with Microsoft's .NET RSACryptoServiceProvider is real. It's possible but not practical to do this without BouncyCastle, which may or may not be well-documented (navigating their website is far from a joyful experience), but after trawling the web and playing around I've created the following gists that should be of assistance to anyone who needs to do this in a straightforward manner.
Import and export RSA Keys between C# and PEM format using BouncyCastle
And just because the actual encryption and decryption are always annoying:
Simple RSA Encryption to and Decryption from Base64 encoded strings in C#
after hitting a wall last night with the existing node.js mysql packages, which for some reason have been years behind integrating with mysq...
There's a vast amount of documentation available, but all of it assumes a lot of prior knowledge or very particular use cases. Here'...
[EDIT: please see C# / OPENSSH RSA ENCRYPTION MADE EVEN EASIER ] The struggle to uncover the secrets of importing from and export to OpenS...