Advanced Shared Symmetric-Key Methods
Both the substitution and transposition methods discussed so far are shared symmetric-key methods, meaning that both sender and receiver would have to have agreed upon the same secret encryption key before any methods could be sent.
All of the methods so far have been susceptible to frequency analysis since each letter is always mapped to the same encrypted character. More advanced methods get around this weakness. For example, the Enigma machines used in World War II had wheels that rotated. Each wheel was a substitution cipher, but the rotation would cause the substitution used to shift after each character.
For a simplified example, in the initial setup, the wheel might provide the mapping:
Original: [latex]ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789[/latex]
Maps to: [latex]2BQF5WRTD8IJ6HLCOSUVK3A0X9YZN1G4ME7P[/latex]
After the first character is encrypted, the wheel rotates, shifting the mapping one space, resulting in a new shifted mapping:
Original: [latex]ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789[/latex]
Maps to: [latex]P2BQF5WRTD8IJ6HLCOSUVK3A0X9YZN1G4ME7[/latex]
Using this approach, no letter gets encrypted as the same character over and over.
The actual Engima machines used in WWII were more complex. Each wheel consisted of a complex substitution cipher, and multiple wheels were used in a chain. The specific wheels used, order of the wheels, and starting position of the wheels formed the encryption key. While captured Engima devices provided the Allied forces details on the encryption method, the keys still had to be broken to decrypt messages.
These code breaking efforts led to the development of some of the first electronic computers by Alan Turing at Bletchley Park in the United Kingdom. This is generally considered the beginning of modern computing.
In the 1970s, the U.S. government had a competition and ultimately approved an algorithm deemed DES (Data Encryption Standard) to be used for encrypting government data. It became the standard encryption algorithm used. This method used a combination of multiple substitution and transposition steps, along with other steps in which the encryption key is mixed with the message. This method uses an encryption key with length [latex]56[/latex] bits, meaning there are [latex]256[/latex] possible keys.
This number of keys make a brute force attack extremely difficult and costly, but not impossible. In 1998, a team was able to find the decryption key for a message in [latex]2[/latex] days, using about [latex]$250,000[/latex] worth of hardware. However, the price and time will go down as computer power increases.
From 1997 to 2001 the government held another competition, ultimately adopting a new method, deemed AES (Advanced Encryption Standard). This method uses encryption keys with [latex]128[/latex], [latex]192[/latex], or [latex]256[/latex] bits, providing up to [latex]2256[/latex] possible keys, making brute force attacks essentially impossible.