Cipher

From Citizendium
Revision as of 21:00, 1 August 2008 by imported>Sandy Harris (→‎Classical cipher components)
Jump to navigation Jump to search
This article is a stub and thus not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
 
This editable Main Article is under development and subject to a disclaimer.

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. 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.

In real ciphers, the operations are combined. For example, if the above substitution is followed by transposition, ZEBRAS would become FASCTB. Transposition followed by substitution would convert ZEBRAS to FASCTB.

The example above is a monoalphabetic cipher; the same transformation is applied to each symbol of plaintext. For real use, you need polyalphabetic substitution with more than one transformation in play. As a trivial example, shift the odd letters one alphabetic place and the even letters two places, so that ZEBRAS becomes AGCTBU.

Real systems are more complex in several ways. Typically they work on chunks of plaintext far longer than the single word above. A key controls at least some of the operations; for example the amount to shift might be controlled by the key. Some of the design objectives are usually described as confusion and diffusion, following a famous paper of Claude Shannon.

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.