Evolution of Cryptography
Cryptography has been around for thousands of years. It started out with simple ciphers and slowly evolved into what it is now for example RSA (Rivest-Shammir-Adleman algorithm). We're going to revisit the algorithms from the past and see how they've worked and why these new algorithms had to be made.
When we talk about cryptography, we would call the message you want to encrypt the plaintext and after the encryption the ciphertext.
There are two types of encryptions, Symmetric and Asymmetric.
When we talk about cryptography, we would call the message you want to encrypt the plaintext and after the encryption the ciphertext.
There are two types of encryptions, Symmetric and Asymmetric.
Symmetric Encryptions
Symmetric encryptions are encryptions that uses the same key to encrypt and decrypt messages. A few examples are:
- Additive/ Cesars Cipher
- Multiplicative Ciphers
- Affine Cipher
- Vigenere Cipher
Additive Cipher
This is the most basic cipher thats been around for a very long time. We essentially take the alphabet and convert it to numbers. For example the letter A would be 1 and Z would be 26. In the additive cipher, we have a key which is the number. This key is known by both people in the conversation. It converts each letter to a number and adds on to that number. With this new number we convert it back into the alphabet with the message not making any clear sense. In the below example, hello world was used as the message.
Now after the person receives the message, they can easily convert back to the original message by using the same key and subtracting the new position to get back to the old placement. A quick note is that we use a modulus of 26 for these alphabet ciphers since there aren't any letters past 26.
Multiplicative Cipher
The multiplicative cipher is similar to the additive one. Instead of adding we're multiplying by the key. Here is where modulus 26 comes in to play a lot since we will be multiplying by big numbers eventually.
In order to decipher the message, you take the key given and get the multiplicative inverse of that key. You would have to calculate it but heres a few of them
Since we used the key of 5, our inverse is 21. So now we multiply each ciphertext letter by 21 as well as using mod26. When done so correctly, you should get the original message "Hello World".
Affine Cipher
This cipher combines both the additive and multiplicative cipher. First you apply the additive key then the multiplicative key. If we take the following example hello world and use the additive key of 2 and multiplicative key of 3 we get the following:
In order to go backwards its exactly the same as before. Apply the multiplicative inverse of the key and then subtract the result with the additive key.
Vigenere Cipher
This Vigenere Cipher is more of a complex one. It uses a table of the alphabet laid across the top row and a column.
Now this cipher takes a keyword to encrypt the message. The key letter is placed on the top and the plaintext is on the left column, The keyword can be of any length but if shorter than the message repeats itself. You will take one letter at a time of both the key and plaintext. If we use the key of "city" with the message "Nice to meet you" and encrypt it, our end result will be pqvc vw fcgb rmw.
When deciphering it, we use the keyword on the top and go down until we hit the corresponding ciphertext letter. On the left column will be your plaintext letter. For example, the first three letter of the cipher text are pqv and the first three letters of the keyword are cit. Putting it into practice will look like this:
Conclusion
Next time we will talk about the asymmetric ciphers. From the following we can see these are symmetric because the key has to be known by both parties instead of having individual ones. These ciphers aren't used anymore because they're really easy to crack which isn't a good thing for our information that we don't want others to see. Trying to crack these ciphers manually is possible but with the release of computers, these can be done within a matter of seconds of even minutes because of how many computations computers can do so quickly.
Comments
Post a Comment