This question already has an answer here:
First of all let me point out that I am aware of all the theory behind asymmetric encryption and signing, and other related areas like signcryption, etc. It seems that mathematically it is possible to do what title suggests, however there is not a single working example of how to do it in practice, if possible at all.
I want to ENCRYPT the message/data with a private RSA key (signing it won't suffice) and save it to a file. An application will open that file and decrypt the message with a public RSA key. To point out, anyone can have the public key. This is not a concern in this case.
I want to make it impossible to SEE the message content that is not created by the holder of private key. Signing the message with RSA private key is not acceptable (or signing with a symmetric key and then encrypting the key) because the message content is READABLE but only a subject to validation. Circumventing the authentication validation could be as trivial as a single call patching.
Is there a single working example (that is potentially not ruining the algorithm) of encrypting the message with a private and decrypting the message with a public key. As a side note: it would be great if this would be doable in dotnet.
Thank you very much in advance.