Click here to Skip to main content
15,887,856 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I found several solutions where I can use the RSA Provider to Encrypt a message with the public key and Decrypt it with the private one.

But what I want to have is to Encrypt with the private key and Decrypt with the public key.

I want to store the public key in my app and encrypt a license for example on my dev machine with the private key, send it to the app and let the information decrypt with a public key.

How can I achieve that?


What I have tried:

I tried to follow this post but It is not working fine.
RSA Private Key Encryption[^]
Posted
Updated 14-Dec-18 3:28am

1 solution

It's not supposed to work that way: the public key isn't safe if it's inside your app, because anyone who has access to the app can get the public key from that!

See here: cryptography - Can one encrypt with a private key/decrypt with a public key? - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900