Sending secret codes that adversaries cannot read has been a cornerstone of communication since forever. The science of protecting information through codes and ciphers is called Cryptography and is one of the largest areas of Computer Science today.
The earliest known uses of cryptography dates back to around 2000BC! One of the most famous ciphers of antiquity is called “The Caesar Cipher” named after Julius Caesar who used it to encode battle strategies.
GET INSTANT HELP FROM EXPERTS!
- Looking for any kind of help on your academic work (essay, assignment, project)?
- Want us to review, proofread or tidy up your work?
- Want a helping hand so that you can focus on the more important tasks?
Hire us as project guide/assistant. Contact us for more information
Today, Cryptography is the cornerstone of internet communication and commerce. We rely on encrypted messages to send payments, passwords, and data. We use the same principles for storing user information and even checking time.
Caesar Cipher
The Caesar Cipher is a classic fun cipher that even children use to pass notes. In this cipher, each letter is rotated by some rotation amount. For example, if the rotation amount is 3 then “a” becomes “d” and “b” becomes “e” etc.
Once every letter is rotated the “cipher text” or encrypted message can be sent. The receiver of the cipher text must then decrypt the message by using the same rotation amount.
For people of antiquity, most of whom were illiterate and untrained in math, this was sufficient for sending communications.
Read more on Caesar Cipher, and how to break it.
Hacking Caesar
The basic limitation of Caesar cipher is that since we rotate each letter by the same amount and we only have 26 distinct rotations, there are only 26 cipher texts that can exist for a given message.
One can attack the Caesar cipher by using a brute force attack and test all of these. One of these must produce the decrypted message; to choose the correct one you can use a simple yet effective cryptographic tool – frequency analysis. This attack works by examining what you expect the message to look like.
You can look at the most common letters of the potential messages and see how well it matches with English. In English different characters appear very differently, for example, the letter “e” appears far more often than “z”.
Read: Relative frequencies of letters in the English language.
If the message was random gibberish, then frequency analysis would never work, but in reality messages contain information (in English) so by seeing how the different messages compare to the “English distribution” you can make a good guess.
The longer the message the more effective frequency analysis is.
Vigenere Cipher
The Vigenere Cipher is a more complex rotating cipher (like the Enigma Machine).
The biggest limitation of substitution ciphers (like the Caesar cipher) is the relatively small number of combinations possible, and ease of frequency analysis which makes computers exceptionally good at breaking them.
GET INSTANT HELP FROM EXPERTS!
- Looking for any kind of help on your academic work (essay, assignment, project)?
- Want us to review, proofread or tidy up your work?
- Want a helping hand so that you can focus on the more important tasks?
Hire us as project guide/assistant. Contact us for more information
The Vigenere Cipher solves this by using a changing rotation parameter.
To do this, instead of a rotation amount, it takes a password string; the password string is replicated until it is the same length or longer than the message and each letter (when converted to a numerical value) is used as a rotation amount.
For example. If you have a string like “dog”, every first letter will be rotated by the number value of ’d’ (rotated by 3), every second letter will be rotated by ’o’ (rotated by 14), and every third letter will be rotated by ’g’ (rotated by 6).
This results in a changing relationship between input and output letters and makes it almost impossible to break by hand.
Here’s another explanation of the Vigenere Cipher.
One-Time-Pad (OTP)
More complex ciphers were still insufficient to defeat computers because they were predictable and brute-forcible.
In case of the Vigenere Cipher, short or simple keys quickly degrade the quality of the encryption and relying on people to create passwords is problematic.
Computer Scientists and mathematicians came up with a principle that any encryption scheme that relies on adversaries not knowing how it works (like the case of The Enigma Machine) is not secure because it is too strong of an assumption, at some point someone will either leak the method or figure it out. This is known as Kerckhoffs’s principle.
The One-Time-Pad is the most fundamental truly secure encryption scheme and is extensively used in the modern world. It works on the bit level.
By viewing the message as a string of bits and randomly either flipping or leaving each one, the resulting cipher text is equally likely to be any string of bits and cannot be distinguished from random. OTP is secure because it generates a random key that completely masks the message. Be aware that using the same key more than once can start making it vulnerable to frequency analysis.
Read more on One Time Pad here.
GET INSTANT HELP FROM EXPERTS!
- Looking for any kind of help on your academic work (essay, assignment, project)?
- Want us to review, proofread or tidy up your work?
- Want a helping hand so that you can focus on the more important tasks?
StudyMumbai.com is an educational resource for students, parents, and teachers, with special focus on Mumbai. Our staff includes educators with several years of experience. Our mission is to simplify learning and to provide free education. Read more about us.
Leave a Reply
You must be logged in to post a comment.