What Is Cryptography?: Cryptography Is The Science of Using Mathematics To Encrypt and Decrypt Data
What Is Cryptography?: Cryptography Is The Science of Using Mathematics To Encrypt and Decrypt Data
While cryptography is the science of securing data, cryptanalysis is the science of analyzing
and breaking secure communication. Classical cryptanalysis involves an interesting
combination of analytical reasoning, application of mathematical tools, pattern finding,
patience, determination, and luck. Cryptanalysts are also called attackers.
And so we begin.
Encryption and decryption
Data that can be read and understood without any special measures is called plaintext or
cleartext. The method of disguising plaintext in such a way as to hide its substance is called
encryption. Encrypting plaintext results in unreadable gibberish called ciphertext. You use
encryption to ensure that information is hidden from anyone for whom it is not intended,
even those who can see the encrypted data. The process of reverting ciphertext to its
original plaintext is called decryption. Figure 1-1 illustrates this process.
Other terms for symmetric-key encryption are secret-key, single-key, shared-key, one-key, and
private-key encryption. Use of the last and first terms can create ambiguity with similar
terminology used in public-key cryptography.
Symmetric-key algorithms can be divided into stream ciphers and block ciphers. Stream ciphers
encrypt the bits of the message one at a time, and block ciphers take a number of bits and encrypt
them as a single unit. Blocks of 64 bits have been commonly used. The Advanced Encryption
Standard (AES) algorithm approved by NIST in December 2001 uses 128-bit blocks.
Some examples of popular and well-respected symmetric algorithms include Twofish, Serpent,
AES (Rijndael), Blowfish, CAST5, RC4, 3DES, and IDEA.
Encrypting a message does not guarantee that this message is not changed while encrypted.
Hence often a message authentication code is added to a ciphertext to ensure that changes to the
ciphertext will be noted by the receiver. Message authentication codes can be constructed from
symmetric ciphers (e.g. CBC-MAC).
However, symmetric ciphers also can be used for non-repudiation purposes by ISO 13888-2
standard.
Another application is to build hash functions from block ciphers. See one-way compression
function for descriptions of several such methods.
Many modern block ciphers are based on a construction proposed by Horst Feistel. Feistel's
construction makes it possible to build invertible functions from other functions that are
themselves not invertible.
1.Stream cipher
From Wikipedia, the free encyclopedia
(Redirected from Stream ciphers)
Jump to: navigation, search
The operation of the keystream generator in A5/1, a LFSR-based stream cipher used to encrypt
mobile phone conversations.
In cryptography, a stream cipher is a symmetric key cipher where plaintext bits are combined
with a pseudorandom cipher bit stream (keystream), typically by an exclusive-or (xor) operation.
In a stream cipher the plaintext digits are encrypted one at a time, and the transformation of
successive digits varies during the encryption. An alternative name is a state cipher, as the
encryption of each digit is dependent on the current state. In practice, the digits are typically
single bits or bytes.
Stream ciphers represent a different approach to symmetric encryption from block ciphers. Block
ciphers operate on large blocks of digits with a fixed, unvarying transformation. This distinction
is not always clear-cut: in some modes of operation, a block cipher primitive is used in such a
way that it acts effectively as a stream cipher. Stream ciphers typically execute at a higher speed
than block ciphers and have lower hardware complexity. However, stream ciphers can be
susceptible to serious security problems if used incorrectly: see stream cipher attacks — in
particular, the same starting state must never be used twice.
In a synchronous stream cipher, the sender and receiver must be exactly in step for decryption to
be successful. If digits are added or removed from the message during transmission,
synchronisation is lost. To restore synchronisation, various offsets can be tried systematically to
obtain the correct decryption. Another approach is to tag the ciphertext with markers at regular
points in the output.
If, however, a digit is corrupted in transmission, rather than added or lost, only a single digit in
the plaintext is affected and the error does not propagate to other parts of the message. This
property is useful when the transmission error rate is high; however, it makes it less likely the
error would be detected without further mechanisms. Moreover, because of this property,
synchronous stream ciphers are very susceptible to active attacks — if an attacker can change a
digit in the ciphertext, he might be able to make predictable changes to the corresponding
plaintext bit; for example, flipping a bit in the ciphertext causes the same bit to be flipped in the
plaintext.
Another approach uses several of the previous N ciphertext digits to compute the keystream.
Such schemes are known as self-synchronizing stream ciphers, asynchronous stream ciphers
or ciphertext autokey (CTAK). The idea of self-synchronization was patented in 1946, and has
the advantage that the receiver will automatically synchronise with the keystream generator after
receiving N ciphertext digits, making it easier to recover if digits are dropped or added to the
message stream. Single-digit errors are limited in their effect, affecting only up to N plaintext
digits.
2.Block cipher
In cryptography, a block cipher is a symmetric key cipher operating on fixed-length groups of
bits, called blocks, with an unvarying transformation. A block cipher encryption algorithm might
take (for example) a 128-bit block of plaintext as input, and output a corresponding 128-bit block
of ciphertext. The exact transformation is controlled using a second input — the secret key.
Decryption is similar: the decryption algorithm takes, in this example, a 128-bit block of
ciphertext together with the secret key, and yields the original 128-bit block of plaintext.
A message longer than the block size (128 bits in the above example) can still be encrypted with
a block cipher by breaking the message into blocks and encrypting each block individually.
However, in this method all blocks are encrypted with the same key, which degrades security
(because each repetition in the plaintext becomes a repetition in the ciphertext). To overcome
this issue, modes of operation are used to make encryption probabilistic. Some modes of
operation, despite the fact that their underlying implementation is a block cipher, allow to
encrypt individual bits. The resulting cipher is called a stream cipher.
An early and highly influential block cipher design was the Data Encryption Standard (DES),
developed at IBM and published as a standard in 1977. A successor to DES, the Advanced
Encryption Standard (AES), was adopted in 2001.
Enigma – WWII German rotor cypher machine—many variants, any user networks for
most of the variants
Purple – highest security WWII Japanese Foreign Office cypher machine; by Japanese
Navy Captain
SIGABA – WWII US cypher machine by William Friedman, Frank Rowlett et al.
TypeX – WWII UK cypher machine
Although the secret and public keys reverse the action of each other, it is
computationally infeasible for anyone to calculate the secret key from a knowledge of
the corresponding public key. With the sort of key lengths that are commonly used in
practice, public-key cryptography has a degree of security that can match that of the
popular symmetric ciphers.
In actual practice, a dual system is used. The message itself is encrypted with a
symmetric cipher, using a randomly generated one-time key, and a public-key
cryptosystem is used to encrypt the key for the cipher. The reason for this dual system
is that symmetric ciphers work much faster than public-key cryptosystems of
comparable strength. Therefore it is advantageous to apply the public-key
cryptosystem to only the fixed-length key, but not to the message itself, which will
usually be much longer.
Public-key cryptography is a cryptographic approach which involves the use of
asymmetric key algorithms instead of or in addition to symmetric key algorithms. Unlike
symmetric key algorithms, it does not require a secure initial exchange of one or
more secret keys to both sender and receiver. The asymmetric key algorithms are used
to create a mathematically related key pair: a secret private key and a published public
key. Use of these keys allows protection of the authenticity of a message by creating
a digital signature of a message using the private key, which can be verified using the
public key. It also allows protection of theconfidentiality and integrity of a message, by
public key encryption, encrypting the message using the public key, which can only be
decrypted using the private key.
Public key cryptography is a fundamental and widely used technology around the world.
It is the approach which is employed by many cryptographic algorithms
and cryptosystems. It underpins such Internet standards as Transport Layer Security
(TLS) (successor to SSL), PGP, and GPG.
reason, it has not completely replaced symmetric cryptography. Here are some of the
Advantages:
to anyone.2. It enables the use of digital certificates and digital timestamps, which
Disadvantages:
Use of cryptography
One of the primary reasons that intruders can be successful is that most of the
information they acquire from a system is in a form that they can read and
comprehend. When you consider the millions of electronic messages that traverse the
Internet each day, it is easy to see how a well-placed network sniffer might capture a
wealth of information that users would not like to have disclosed to unintended
readers. Intruders may reveal the information to others, modify it to misrepresent an
individual or organization, or use it to launch an attack. One solution to this problem
is, through the use of cryptography, to prevent intruders from being able to use the
information that they capture. Encryption is the process of translating information
from its original form (called plaintext) into an encoded, incomprehensible form
(called ciphertext). Decryption refers to the process of taking ciphertext and
translating it back into plaintext. Any type of data may be encrypted, including
digitized images and sounds. Cryptography secures information by protecting its
confidentiality. Cryptography can also be used to protect information about the
integrity and authenticity of data. For example, checksums are often used to verify the
integrity of a block of information. A checksum, which is a number calculated from
the contents of a file, can be used to determine if the contents are correct. An intruder,
however, may be able to forge the checksum after modifying the block of information.
Unless the checksum is protected, such modification might not be detected.
Cryptographic checksums (also called message digests) help prevent undetected
modification of information by encrypting the checksum in a way that makes the
checksum unique. The authenticity of data can be protected in a similar way. For
example, to transmit information to a colleague by E-mail, the sender the information
to protect its confidentiality and then attaches an encrypted digital signature to the
message. When the colleague receives the message, he or she checks the origin of the
message by using a key to verify the sender's digital signature and decrypts the
information using the corresponding decryption key. To protect against the chance of
intruders modifying or forging the information in transit, digital signatures are formed
by encrypting a combination of a checksum of the information and the author's unique
private key. A side effect of such authentication is the concept of nonrepudiation. A
person who places their cryptographic digital signature on an electronic document
cannot later claim that they did not sign it, since in theory they are the only one who
could have created the correct signature. Current laws in several countries, including
the United States, restrict cryptographic technology from export or import across
national borders. In the era of the Internet, it is particularly important to be aware of
all applicable local and foreign regulations governing the use of cryptography.