Cipher: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Sandy Harris
imported>Sandy Harris
(→‎Increasing key length: delete heading)
Line 14: Line 14:
==Combining operations==
==Combining operations==
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.
==Increasing key length==
 
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. The example of substitution above was '''monoalphabetic''', with the same transformation 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.
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. The example of substitution above was '''monoalphabetic''', with the same transformation 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.


A [[one-time pad]], which is demostrably unbreakable, has a totally random key of the same length of the message.
A [[one-time pad]], which is demostrably unbreakable, has a totally random key of the same length of the message.

Revision as of 19:35, 1 August 2008

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, assume a substitution cipher shifts letters one place in the alphabet, so ZEBRAS would become AFCSBT.

The alternative, 'transposition, changes the order of the plaintext elements. As a different trivial example, assume a trivial transposition exchanges the order of each pair of letters, so ZEBRAS would become EZRBSA.

Combining operations

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. The example of substitution above was monoalphabetic, with the same transformation 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.

A one-time pad, which is demostrably unbreakable, has a totally random key of the same length of the message.