
In
cryptography, ciphertext or cyphertext is the result of
encryption performed on
plaintext using an algorithm, called a
cipher
In cryptography, a cipher (or cypher) is an algorithm for performing encryption or decryption—a series of well-defined steps that can be followed as a procedure. An alternative, less common term is ''encipherment''. To encipher or encode i ...
. Ciphertext is also known as encrypted or encoded information because it contains a form of the original plaintext that is unreadable by a human or computer without the proper cipher to decrypt it. This process prevents the loss of sensitive information via hacking.
Decryption, the inverse of encryption, is the process of turning ciphertext into readable plaintext. Ciphertext is not to be confused with
codetext because the latter is a result of a code, not a cipher.
Conceptual underpinnings
Let
be the plaintext message that Alice wants to secretly transmit to Bob and let
be the encryption cipher, where
is a
cryptographic key. Alice must first transform the plaintext into ciphertext,
, in order to securely send the message to Bob, as follows:
:
In a symmetric-key system, Bob knows Alice's encryption key. Once the message is encrypted, Alice can safely transmit it to Bob (assuming no one else knows the key). In order to read Alice's message, Bob must decrypt the ciphertext using
which is known as the decryption cipher,
:
Alternatively, in a non-symmetric key system, everyone, not just Alice and Bob, knows the encryption key; but the decryption key cannot be inferred from the encryption key. Only Bob knows the decryption key
and decryption proceeds as
:
Types of ciphers
The
history of cryptography began thousands of years ago. Cryptography uses a variety of different types of encryption. Earlier algorithms were performed by hand and are substantially different from modern
algorithms, which are generally executed by a machine.
Historical ciphers
Historical pen and paper ciphers used in the past are sometimes known as
classical ciphers. They include:
*
Substitution cipher: the units of plaintext are replaced with ciphertext (e.g.,
Caesar cipher and
one-time pad)
**
Polyalphabetic substitution cipher: a substitution cipher using multiple substitution alphabets (e.g.,
Vigenère cipher and
Enigma machine)
**
Polygraphic substitution
Polygraphic substitution is a cipher in which a uniform substitution is performed on blocks of letters. When the length of the block is specifically known, more precise terms are used: for instance, a cipher in which pairs of letters are substitu ...
cipher: the unit of substitution is a sequence of two or more letters rather than just one (e.g.,
Playfair cipher)
*
Transposition cipher: the ciphertext is a
permutation
In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or proc ...
of the plaintext (e.g.,
rail fence cipher)
Historical ciphers are not generally used as a standalone encryption technique because they are quite easy to crack. Many of the classical ciphers, with the exception of the one-time pad, can be cracked using
brute force
Brute Force or brute force may refer to:
Techniques
* Brute force method or proof by exhaustion, a method of mathematical proof
* Brute-force attack, a cryptanalytic attack
* Brute-force search, a computer problem-solving technique
People
* Brut ...
.
Modern ciphers
Modern ciphers are more secure than classical ciphers and are designed to withstand a wide range of attacks. An attacker should not be able to find the key used in a modern cipher, even if he knows any amount of plaintext and corresponding ciphertext. Modern encryption methods can be divided into the following categories:
*
Private-key cryptography
Symmetric-key algorithms are algorithms for cryptography that use the same cryptographic keys for both the encryption of plaintext and the decryption of ciphertext. The keys may be identical, or there may be a simple transformation to go between th ...
(
symmetric key algorithm): the same key is used for encryption and decryption
*
Public-key cryptography (
asymmetric key algorithm): two different keys are used for encryption and decryption
In a symmetric key algorithm (e.g.,
DES and
AES
AES may refer to:
Businesses and organizations Companies
* AES Corporation, an American electricity company
* AES Data, former owner of Daisy Systems Holland
* AES Eletropaulo, a former Brazilian electricity company
* AES Andes, formerly AES Gener ...
), the sender and receiver must have a shared key set up in advance and kept secret from all other parties; the sender uses this key for encryption, and the receiver uses the same key for decryption. In an asymmetric key algorithm (e.g.,
RSA
RSA may refer to:
Organizations Academia and education
* Rabbinical Seminary of America, a yeshiva in New York City
*Regional Science Association International (formerly the Regional Science Association), a US-based learned society
*Renaissance S ...
), there are two separate keys: a ''public key'' is published and enables any sender to perform encryption, while a ''private key'' is kept secret by the receiver and enables only him to perform correct decryption.
Symmetric key ciphers can be divided into
block cipher
In cryptography, a block cipher is a deterministic algorithm operating on fixed-length groups of bits, called ''blocks''. Block ciphers are specified cryptographic primitive, elementary components in the design of many cryptographic protocols and ...
s and
stream cipher
stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream (keystream). In a stream cipher, each plaintext digit is encrypted one at a time with the corresponding digit of the keystream ...
s. Block ciphers operate on fixed-length groups of bits, called blocks, with an unvarying transformation. Stream ciphers encrypt plaintext digits one at a time on a continuous stream of data and the transformation of successive digits varies during the encryption process.
Cryptanalysis
Cryptanalysis is the study of methods for obtaining the meaning of encrypted information, without access to the secret information that is normally required to do so. Typically, this involves knowing how the system works and finding a secret key. Cryptanalysis is also referred to as codebreaking or
Password cracking cracking the code
A password, sometimes called a passcode (for example in Apple Inc., Apple devices), is secret data, typically a string of characters, usually used to confirm a user's identity. Traditionally, passwords were expected to be memorized, but the lar ...
. Ciphertext is generally the easiest part of a
cryptosystem
In cryptography, a cryptosystem is a suite of cryptographic algorithms needed to implement a particular security service, such as confidentiality (encryption).
Typically, a cryptosystem consists of three algorithms: one for key generation, one for ...
to obtain and therefore is an important part of cryptanalysis. Depending on what information is available and what type of cipher is being analyzed, cryptanalysts can follow one or more
attack model
In cryptanalysis, attack models or attack types are a classification of cryptographic attacks specifying the kind of access a Cryptanalysis, cryptanalyst has to a system under attack when attempting to "break" an Encryption, encrypted message (also ...
s to crack a cipher.
Attack models
*
Ciphertext-only: the cryptanalyst has access only to a collection of ciphertexts or code texts
*
Known-plaintext: the attacker has a set of ciphertexts to which he knows the corresponding plaintext
*
Chosen-plaintext attack: the attacker can obtain the ciphertexts corresponding to an arbitrary set of plaintexts of his own choosing
** Batch chosen-plaintext attack: where the cryptanalyst chooses all plaintexts before any of them are encrypted. This is often the meaning of an unqualified use of "chosen-plaintext attack".
** Adaptive chosen-plaintext attack: where the cryptanalyst makes a series of interactive queries, choosing subsequent plaintexts based on the information from the previous encryptions.
*
Chosen-ciphertext attack: the attacker can obtain the plaintexts corresponding to an arbitrary set of ciphertexts of his own choosing
**
Adaptive chosen-ciphertext attack
**
Indifferent chosen-ciphertext attack
*
Related-key attack: like a chosen-plaintext attack, except the attacker can obtain ciphertexts encrypted under two different keys. The keys are unknown, but the relationship between them is known; for example, two keys that differ in the one bit.
The ciphertext-only attack model is the weakest because it implies that the cryptanalyst has nothing but ciphertext. Modern ciphers rarely fail under this attack.
Famous ciphertexts
* The
Babington Plot ciphers
* The
Shugborough inscription
* The
Zimmermann Telegram
*
The Magic Words are Squeamish Ossifrage
* The
cryptogram in "
The Gold-Bug"
*
Beale ciphers
*
Kryptos
*
Zodiac Killer ciphers
See also
*
Books on cryptography
*
Cryptographic hash function
*
Frequency analysis
In cryptanalysis, frequency analysis (also known as counting letters) is the study of the frequency of letters or groups of letters in a ciphertext. The method is used as an aid to breaking classical ciphers.
Frequency analysis is based on t ...
*
RED/BLACK concept
*
:Undeciphered historical codes and ciphers
References
Further reading
*
*
* Helen Fouché Gaines, “Cryptanalysis”, 1939, Dover.
*
David Kahn, ''The Codebreakers - The Story of Secret Writing'' () (1967)
*
Abraham Sinkov, ''Elementary Cryptanalysis: A Mathematical Approach'', Mathematical Association of America, 1968.
{{Cryptography navbox
Cryptography