Asymmetric Encryption and Decryption implementation using the RSA algorithm.

  1. Bob (Reciever)
  2. Alice (Sender)
  3. Eve (Eavesdropper)
Alice/Eve/Bob
  1. Alice Console Application
  2. Bob Console Application
  3. Encrypt/Decrypt Service Class Library Application
  • Alice wants to encrypt something she has to use Bob’s Public Key
  • Bob want to encrypt something he has to use Alice’s Public Key
Encryption
  • Alice wants to decrypt something that Bob encrypted she has to use her Private Key
  • Bob wants to decrypt something that Alice encrypted he has to use his Private Key
Decryption

Alice’s public key → private key

Bob’s public key → private key

As I showed in the first two diagrams for this demonstration I consider Alice as the Sender and Bob as the Receiver

  1. Alice (Sender ) Console Application
  2. Bob (Receiver) Console Application
  3. Encrypt/Decrypt Service Class Library Application
Overall Solution
Service Interface Contract
Method Implementation
Alice Program
Bob Program
  1. Run Bob Console App to generate Bob’s public/private key pair
Encryption File Empty
Encryption Success Message
Final Decrypted Message :(

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store