Encryption

Asif Ahmed

In this post I will provide some links and explain a little bit how encryption can work. A video I would suggest for anyone who wants to understand how encryption works is this. As soon as you click on it, it will autoplay.

It starts off with the premise that you, Person A, want to communicate with Person B across the internet. However, Person C is always listening to your communications. If you tell Person B what encryption method you would like to use, Person C would immediately know and thwart your efforts. The video starts off with trying to explain encryption with colors. Person A tells Person B to agree to a public color that they would both use. This would be known as the public key. Let’s have this color be pink. Person C would also know that the public key is pink. However, both Person A and Person B would have their private keys also. Lets say Person A’s private key is green. Person A would mix his private key with his public key and send this color mixture to Person B. Person C would also get this color mixture, and lets call this color Elmo. Neither Person B or C at this point would know what color Person A’s private key is.

At this point these people know that –

  • Person A knows Person A’s private key is green, and the public key is pink
  • Person B knows Person A’s mixture is Elmo, and the public key is pink
  • Person C knows Person A’s mixture is Elmo, and the public key is pink

At this point Person B mixes his private key, blue, with the public key and send his mixture, Big Bird, to Person A. Now these people know that –

  • Person A knows Person A’s private key is green, Person B’s mixture is Big Bird, and the public key is pink
  • Person B knows Person B’s private key is blue, Person A’s mixture is Elmo, and the public key is pink
  • Person C knows Person A’s mixture is Elmo, Person B’s mixture is Big Bird, and the public key is pink

Now each of them are one step away from having a shared mixture that they could both use as their key. Person A mixes his private key, green, in with the mixture he received from Person B, to create a mixture (pink+green+blue) called Ernie. Person B also mixes his private key, blue, in with the mixture he got from Person A, to create the same mixture (pink+green+blue) called Ernie. Person C is outta luck however because they have to still figure out what color they could subtract from Big Bird or Elmo to get pink. They would need knowledge of one of the private colors to figure it out.

Since we don’t use colors for encryption on the internet, the actual way we do this is with modular arithmetic and huge prime numbers. For our example lets select the prime number, 197. In reality we use huge, huge prime numbers that are hundreds of digits long. The last part of the video mentioned earlier on in this post explains it very well. If you want some more resources you can visit the Wikipedia page or go to this link.