The shift cipher, also known as the caesar cipher, is one of the oldest cryptosystems known to man. It is very simple, and rather uneffective, however for anyone interested in cryptography, it is important to understand the classic cryptosystems, why they are weak, and how to make them better. This article assumes a basic understanding of cryptology terminology, but will tell you everything you need to know about this simple cryptosystem.
The Cryptography
The shift cipher is really beautiful in its simplicity, which is unfortunately what makes it a weak cryptosystem. To start, you need to map all the letters of the English alphabet to numbers, starting with 0. So, a is 0, b is 1, all the way to z is 25. Once you have obtained your alphabet mapping, you need to pick a number. Now you can pick any number you want, however all arithmetic in this cryptosystem, and indeed most others, are done modulo 26, which means any number over 26 will just wrap around to n (mod 26). Once you have chosen your key, you begin to transform each letter of your plaintext by that number. For instance, if your key was 2, a becomes C, b becomes D, etc. To decrypt, simply do the transformation in reverse. C becomes a, D becomes b, etc. That's it.
The Cryptanalysis
Breaking the shift cipher is really easy, because of the fact that there are only 26 possible keys. It would be entirely possible to just brute-force your way through it by hand, it would just be really tedious. A computer program could brute force the cipher in literally mili-seconds, and this is what makes the shift cipher so weak. It is also possible to do frequency type attacks on this cipher, because it is both symmetric and one-to-one. To do a frequency-based attack on this, or indeed, any other primitive cipher like this, you need some background about the english language (or whatever other language your plain/ciphertext is in). Because this is beyond the scope of this article, just take my word for it that E is the most common letter in the english alphabet, followed by 4 other groups of letters ranked by frequency. These are:
T A O N I
R S H L D
C U P F M
Y B G V
K Q X J Z
So, what can you do with this information? Well, you look for the most frequent occuring letters in the ciphertext, whatever the most common letter is, assume that's e in plaintext. By simple subtraction (key = Most Common Letter - E) you get a very good guess as to the key. If that is not the key, proceed to the next common letter and continue until you find the plaintext that makes sense.
There are many other frequency-type attacks, as well as a ton of research into the english language and probability. You could examine digraphs,trigraphs, initial and final letters, vowel distribution, etc. For such a simple cipher this is really not necessary though.
Summary
C = ciphertext
p = plaintext
k = key
Encryption:
C ---> p + k (mod 26)
Decryption:
p ---> C - k (mod 26)
Number of Possible keys:
26
Strength:
Virtually none.
As you can see, the shift cipher, although it has no security applications in todays world, is interesting from a historical standpoint and provides insight into the evolution of modern cryptology.
Published by The Dude
The dude enjoys all things typical dudes do. Video Games, Cars, Humor, Girls, Legal and Illegal drugs, Computers. Ya know, the usual. The Dude has an awesome new site coming soon. Be sure to look for it. It'... View profile
- Fear, Sex, and Identity in Herman Melville's Typee An exploration of the uncanny effects of cannibalism, sex, and tattoing upon postcolonialism generally, and Melville studies specifically.
Finding Classic Car Auto Insurance on the InternetFinding the right classic car auto insurance for your car can be difficult through traditional insurance companies. Try these sources to get auto insurance for your classic car.- Favorite Classic British Movies from an English Childhood - Part OneWhen I was a child growing up in England, one of our family traditions was that my Mum and I would sit down in front of the TV on a Sunday afternoon and watch classic British movies. These are some of my favorites.
- The Caesar Cipher: Simplest Substitution Ciphers in the WorldThe Caesar Cipher, named for Julius Caesar who used it in his military campaigns, is one of the simplest and easiest substitution ciphers in the world. This article discusses the history and uses of the cipher.
- Three Email Encryption Methods to Protect YourselfSince the beginning of time, the concept of passing secret messages has existed. The objective has been to successfully send and receive messages that none but the sender and receiver understand. So, how does one prot...
- World Baseball Classic- Will the World Watch?
- Kafka and Postmodernism
- New York Asian Film Festival 2006
- KitchenAid K45SS Classic Stand Mixer: A Cook's Dream
- Classic Boxing Matchups - Volume I
- The Zodiac Killer
- Classic Holiday Movies for the Whole Family




1 Comments
Post a CommentI'm a fan of National Treasure movie so I find this article a good read.