Thursday, 5 August 2010

Cryptography versus Cryptanalysis

crypto.jpgCryptanalysis is the flip side of cryptography. It is the science of cracking codes, decoding secrets, and in general, breaking cryptographic protocols. To design a robust encryption algorithm, one should use cryptanalysis to find and correct any weaknesses.
The various techniques in cryptanalysis that attempt to compromise cryptosystems are called attacks. A cryptanalyst starts from the decoded message. The cryptanalyst then tries to get this message back into its original form without knowing anything of that original message. This kind of attack is called a ciphertext-only attack. The data that a cryptanalyst needs for this attack is fairly easy to obtain, but it is very difficult to successfully recover the original message.
Manual Systems
Cryptography dates as far back as 1900 B.C., when a scribe in Egypt first carved a derivation of the standard hieroglyphics on clay tablets. Early Indian texts such as the Kama Sutra used ciphers that consisted mostly of simple alphabetic substitutions often based on phonetics. This is somewhat similar to “pig latin” (igpay atinlay), in which the first letter is placed at the end of the word and is followed by the sound “ay.”
Many notable personalities have participated in the evolution of cryptography. For example, Julius Caesar used a simple method of authentication in government communications that was called the “Caesar Cipher.” This method shifted each letter two places further in the alphabet (for example, Z shifts to B, and F shifts to H).
These manual methods were easy to crack, and it was not until people started using machines for encryption that codes became sophisticated.
Crypto Machines
Thomas Jefferson invented a wheel cipher in the 1790s that was used during World War II with only slight modification. The wheel cipher consisted of a set of wheels, each with random orderings of the letters of the alphabet.
In 1844, the development of cryptography was dramatically changed by the invention of the telegraph. Communication with the telegraph was by no means secure, so ciphers were needed to transmit secret information. Just as the telegraph changed cryptography, the radio changed it again in 1895. Now transmissions were open for anyone’s inspection, and physical security was no longer possible.
During World War II, most German codes were predominantly based on the Enigma machine. A British cryptanalysis group first broke the Enigma code early in World War II. Some of the first uses of computers were for decoding Enigma ciphers intercepted from the Germans. The sidebar on the Enigma machine is somewhat detailed, but it gives you an idea of the complexity of mechanical operations that were later replaced by computer processes.
The Enigma Machine
The Enigma machine was a simple cipher machine. It had several components such as a plug board, a light board, a keyboard, a set of rotors, and a reflector (half rotor). The first Enigma machine looked very similar to a typewriter. The machine had several variable settings that could affect the operation of the machine. First, the user had to select three rotors from a set of rotors. A rotor contained one-on-one mappings of all the letters. Another variable element to this machine was the plug board. The plug board allowed for pairs of letters to be remapped before the encryption process started and after it ended.
When a key was pressed, an electrical current was sent through the machine. The current first passed through the plug board, then through the three rotors, then through the reflector, which reversed the current back through the three rotors and then the plug board. Then the encrypted letter was lit on the display. After the display was lit, the rotors rotated. The operation of the rotors was similar to that of an odometer, where the rotor farthest to the right must complete one revolution before the middle rotor rotates one position and so on.
In order to decrypt a message, the receiver needed the encrypted message as well as knowledge of which rotors were used, the connections on the plug board, and the initial settings of the rotors. To decrypt a message, the receiver set up the machine to be identical to the way the sender initially set it up and then typed in the encrypted message. The output of typing in the encrypted message was the original message. Without the knowledge of the state of the machine when the original message was typed in, it was extremely difficult to decode a message.
Computers
By 1948, cryptographers started to use advanced mathematical techniques to calculate ciphers and to prevent computers from unscrambling the ciphers. Symmetric and asymmetric key algorithms were developed to this end. A symmetric key algorithm uses the same key to encrypt and decrypt a message, whereas an asymmetric key algorithm uses two different keys.

No comments:

Post a Comment