An Almost Painless Introduction to Encryption
Anybody who doesn’t happen to have a degree in science or math tends to shy away from the subject of encryption. One could hardly blame the layman – it’s heady stuff! But if you’re involved in telecommunications at any level, operating anything from a desktop computer to a mobile phone, you’re confronted with encryption every day. Here is at least a basic understanding of why encryption has to be such a complex science.
The first codes.
Probably the simplest code you might be familiar with is the letter substitution. One of the most common ones is “rotation-13”, also known as the Caesar cypher. In it, you just break the alphabet into two rows, like this:
A = N, B = O, and so on with 13 pairs to transfer all 26 letters. It’s called a rotation because you can apply the same method to encode and decode any given text. Letter substitution codes can be any kind of pattern where one letter means another one, and are commonly used on the Internet to hide plot spoilers when describing a movie or hide the punchline to a riddle. They even appear in word puzzle games, such as those printed in the daily newspaper.
As you might guess, letter substitutions are easily cracked on paper, and of course even faster to crack with a computer. In the above rotation-13 example, the key to the code is the two rows of letters. Finding the key to any code results in cracking it.
The reason simple letter substitutions are so easy to break is because one can always use letter-frequency analysis to guess at least half the key. In American-standard English, the twelve most commonly-appearing letters are: “ETAOIN SHRDLU”. Sounds like a magic spell, doesn’t it? Well, you could just take any text encoded by letter-substitution and have a computer count how many times each letter appears. The most common letter will represent “A”, the next “T”, and so on.
So let’s expand the concept!
As an intermediate step to understanding more complex cryptography, let’s see if we can imagine a key that would be harder to discover. What if we used a 3-digit number to represent each letter, but the three digits can appear in any order? E could be 428, 284, 842, and so on. With each letter appearing this way, we could also group the digits randomly to try to hide the pattern. Using this scheme with the key letters in the word “WORD” with W = 123, O = 456, R = 789, and D = 015, we could use any of these sequences:
And they could all decode as “WORD”. Our software program would know to ignore the spacing and read the digits in bursts of three, and take the three digits in any order to substitute for the letter in our key table.
But once again, this code is easy to break. Over time, if you had enough sample space (encrypted text) a computer analysis would find a pattern, and once again, where there’s a pattern, there’s a key! But we can still see that it would take much more work to find the pattern, due to the various false leads that you would take if you came upon the encrypted text for the first time without knowing the key.
So cryptography evolves…
Our above two code methods are examples of “stream cyphers”. Stream cyphers encrypt one symbol at a time. Another method is “block cyphers”, which take the symbols in blocks of a set number of characters and encrypt them all at once. Other methods include deterministic hash functions (in which the encrypted text produces a condensed unique ‘key’), asymmetric key cryptography (in which two different keys are used, one to encrypt and one to decrypt), and the one-time pad (in which the plain, unencrypted text is combined with a huge amount of random text, and eliminating the random text is the “key” to decrypting it).
There are many other methods that are used, but by now you’re at least getting the whole point with cryptography: ALL codes can eventually be cracked, but if you have a code algorithm that’s sophisticated enough, it will be practically unbreakable because it would take an eternity to solve it with our present technology.
All of the encryption methods we have now will one day become obsolete, because computers get faster and more powerful all the time. Thus, there is a kind of “arms race” that has gone on since ancient times. We have to keep developing more and more complex algorithms that can stand up to more sophisticated methods of discovering the keys.
What does this mean to the end user?
Just to follow the current conventional wisdom on what the current standard of secure encryption is. Depending on how private your data is (or how paranoid you are!) it is easy to protect confidential data with a variety of available software tools, and a passing knowledge of how they’re used.