C# – RSA encryption and decryption

Many software use RSA algorithm for generating serial key and protecting it from cracker to release key generator because RSA algorithm is too much complex. Cracking RSA private key from the public key encrypted with 1024 bit, is really not possible with power of current computer. Therefore RSA was applied in many security fields, especially in public key communication. There are a lot of articles on Internet describing how it works so I do not intend to discuss about this algorithm again in this blog. I just would like to make a small example to show how we encrypt and decrypt data with RSA which in some cases will help us to protect our data.
Usually when we encrypt and decrypt data, both of process will need the same key. However RSA allows us to encrypt data with a public key and decrypt data with another key. In .Net, we’ll use RSACryptoServiceProvider as our RSA engine.

Continue reading C# – RSA encryption and decryption