Recently I have a project that needs encryption support. The requirement is to encrypt with the private key of RSA algorithm and decrypt with the public key. I went the algorithm again and thought it is doable, so I began to write a prototype with c#. But I got an ‘invalid key’ error when decrpting the data encrypted from the private key.
After some search,I learnt that it is by design of .Net framework. It disables decryping with public key for security reason.
Finally I came to implement the RSA algorithm myself to achieve what I want to do.