Cipher: Difference between revisions
imported>Sandy Harris (→Combining operations: delete a heading, add one) |
imported>Sandy Harris |
||
Line 8: | Line 8: | ||
==Classical cipher components== | ==Classical cipher components== | ||
There are two fundamental operations in ciphers, which strong systems combine. '''Substitution''' exchanges ciphertext for plaintext. As a trivial example, | There are two fundamental operations in ciphers, which strong systems combine. '''Substitution''' exchanges ciphertext for plaintext. As a trivial example, a substitution cipher could shift letters one place in the alphabet, so ZEBRAS would become AFCSBT. This is a '''monoalphabetic''' cipher; the same transformation is applied to each symbol of plaintext. For a slightly more complex example that is '''polyalphabetic''', shift the odd letters one alphabetic place and the even letters two places, so that ZEBRAS becomes AGCTBU. | ||
The other operation, '''transposition''', changes the order of the plaintext elements. For example, a trivial transposition exchanges the order of each pair of letters, so ZEBRAS would become EZRBSA. | |||
As a simple example of the multiple operations in real ciphers, if the mechanism were substitution followed by transposition, ZEBRAS would become FASCTB. Transposition followed by substitution would convert ZEBRAS to FASCTB. | As a simple example of the multiple operations in real ciphers, if the mechanism were substitution followed by transposition, ZEBRAS would become FASCTB. Transposition followed by substitution would convert ZEBRAS to FASCTB. | ||
Real-world systems, of course, are much more complex, typically performing transposition and substitution on chunks of plaintext far longer than a few bits, and with a complex variable key | Real-world systems, of course, are much more complex, typically performing transposition and substitution on chunks of plaintext far longer than a few bits, and with a complex variable key. | ||
==Types of cipher== | ==Types of cipher== | ||
A [[one-time pad]], which is provably secure against certain attacks, has a totally random key of the same length of the message. | A [[one-time pad]], which is provably secure against certain attacks, has a totally random key of the same length of the message. |
Revision as of 19:45, 1 August 2008
Information can be encrypted in two basic ways, cipher and code. Ciphers apply an algorithm and a cryptographic key to plaintext in the form of bits or characters; the process of encryption is unaware of linguistic structure such as words. It would make no difference to a cipher if its inputs were the complete works of William Shakespeare, a digitized image of a toxic waste dump, the closing price of every stock on the Tokyo stock exchange, or an order to invade Vatican City.
Most often, there is a one-to-one correspondence between the elements — bits or bytes — of the plaintext, although some ciphers insert nonsense padding into the ciphertext, to lessen the statistical relationship between plaintext and ciphertext. Padding that was mistaken for plaintext has changed the course of battles.
Another technique for hiding the real message content is called masking, which is used on dedicated communications channels. On a channel where there is no cost for transmission, essentially random noise, in the form that does not appear superficially different than the encrypted messages, is transmitted whenever there is no traffic to send.
Classical cipher components
There are two fundamental operations in ciphers, which strong systems combine. Substitution exchanges ciphertext for plaintext. As a trivial example, a substitution cipher could shift letters one place in the alphabet, so ZEBRAS would become AFCSBT. This is a monoalphabetic cipher; the same transformation is applied to each symbol of plaintext. For a slightly more complex example that is polyalphabetic, shift the odd letters one alphabetic place and the even letters two places, so that ZEBRAS becomes AGCTBU.
The other operation, transposition, changes the order of the plaintext elements. For example, a trivial transposition exchanges the order of each pair of letters, so ZEBRAS would become EZRBSA.
As a simple example of the multiple operations in real ciphers, if the mechanism were substitution followed by transposition, ZEBRAS would become FASCTB. Transposition followed by substitution would convert ZEBRAS to FASCTB.
Real-world systems, of course, are much more complex, typically performing transposition and substitution on chunks of plaintext far longer than a few bits, and with a complex variable key.
Types of cipher
A one-time pad, which is provably secure against certain attacks, has a totally random key of the same length of the message.