Professional Documents
Culture Documents
CLASSIC CRYPTOGRAPHY:
The earliest forms of secret writing required little more
than local pen and paper analogs, as most people could not read.
More literacy, or literate opponents, required actual
cryptography. The main classical cipher types are transposition
ciphers, which rearrange the order of letters in a message (e.g.,
'hello world' becomes 'ehlol owrdl' in a trivially simple
rearrangement scheme), and substitution ciphers, which
systematically replace letters or groups of letters with other
letters or groups of letters (e.g., 'fly at once' becomes 'gmz bu
podf' by replacing each letter with the one following it in the
Latin alphabet). Simple versions of either have never offered
much confidentiality from enterprising opponents.
An early substitution cipher was the Caesar cipher, in
which each letter in the plaintext was replaced by a letter some
fixed number of positions further down the alphabet. It was
named after Julius Caesar who is reported to have used it, with
a shift of 3, to communicate with his generals during his military
campaigns, just like EXCESS-3 code in boolean algebra. There
is record of several early Hebrew ciphers as well. The earliest
known use of cryptography is some carved ciphertext on stone
in Egypt (ca 1900 BC), but this may have been done for the
amusement of literate observers. The next oldest is bakery
recipes from Mesopotamia. Cryptography is recommended in
the books as a way for lovers to communicate without
inconvenient discovery.
The Greeks of Classical times are said to have known of
ciphers (e.g., the scytale transposition cipher claimed to have
been used by the Spartan military). Steganography (i.e., hiding
even the existence of a message so as to keep it confidential)
was also first developed in ancient times. An early example,
from Herodotus, concealed a message—a tattoo on a slave's
shaved head—under the regrown hair. Another Greek method
was developed by Polybius (now called the "Polybius Square").
More modern examples of steganography include the use of
invisible ink, microdots, and digital watermarks to conceal
information.
Ciphertexts produced by a classical cipher (and some
modern ciphers) always reveal statistical information about the
plaintext, which can often be used to break them. After the
discovery of frequency analysis perhaps by the Arab
mathematician and polymath, Al-Kindi (also known as
Alkindus), in the 9th century, nearly all such ciphers became
more or less readily breakable by any informed attacker. Such
classical ciphers still enjoy popularity today, though mostly as
puzzles (see cryptogram). Al-Kindi wrote a book on
cryptography entitled Risalah fi Istikhraj al-Mu'amma
(Manuscript for the Deciphering Cryptographic Messages), in
which described the first cryptanalysis techniques.
CRYPTOGRAP
HY
Where Complexity Finally Comes In
Handy….
HIMANSHU BAJORIA
B.E.E -IV
ROLL- 000710801059
CRYPTOGRAPHY
SERVICES
Any new design of Cryptographic technique must
accomplish the above requisites. Cryptography not only protects
data from theft or alteration, but can also be used for user
authentication.
Hence, the various security requirements for a Cryptographic
technique including:
PASSIVE ATTACKS:
ACTIVE ATTACKS:
CLASSICAL CIPHER
Historical pen and paper ciphers used in the past are
sometimes known as classical ciphers. They include simple
substitution ciphers or Caesar’s cipher and transposition
ciphers. For example “GOOD DOG” can be encrypted as
“PLLX XLP” where “L” substitutes for “O”, “P” for “G”, and
“X” for “D” in the message. Transposition of the letters “GOOD
DOG” can result in “DGOGDOO”. Julius Caesar used to
substitute each alphabet key characters down or up accordingly
and where the key used by him was 3.
Figure: Double Transposition
MODERN CIPHER
In cryptography several new ways of encrypting the message
was further devised. These algorithms were a bit more
complicated than the previous classical ciphers. Generally
modern ciphers are classified according to their input size based
or key based.
INPUT BASED CIPHERS:
The most common input size based ciphers are block cipher
and stream cipher and are described as follows.
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.
STREAM CIPHER:
In cryptography, a stream cipher is a symmetric key cipher
where plaintext bits are combined with a pseudorandom cipher
bit stream (key stream), 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.
HASH FUNCTIONS:
The system described above has some problems. It is slow,
and it produces an enormous volume of data—at least double the
size of the original information. An improvement on the above
scheme is the addition of a one-way hash function in the
process. A one-way hash function takes variable-length input in
this case, a message of any length, even thousands or millions of
bits—and produces a fixed-length output; say, 160 bits.
The hash function ensures that, if the information is changed
in any way—even by just one bit—an entirely different output
value is produced. PGP uses a cryptographically strong hash
function on the plaintext the user is signing. This generates a
fixed-length data item known as a message digest. Then PGP
uses the digest and the private key to create the “signature.”
PGP transmits the signature and the plaintext together. Upon
receipt of the message, the recipient uses PGP to recompute the
digest, thus verifying the signature. PGP can encrypt the
plaintext or not; signing plaintext is useful if some of the
recipients are not interested in or capable of verifying the
signature. As long as a secure hash function is used, there is no
way to take someone’s signature from one document and attach
it to another, or to alter a signed message in any way. The
slightest change to a signed document will cause the digital
signature verification process to fail. Digital signatures play a
major role in authenticating and validating the keys of other
PGP users.
ENCRYPTION MODES
The ciphers in use are generally following these four encryption
modes:
ELECTRONIC CODEBOOK (EBC):
Electronic Codebook (ECB) mode is the simplest, most
obvious application: the secret key is used to encrypt the
plaintext block to form a cipher text block. Two identical
plaintext blocks, then, will always generate the same cipher
text block. Although this is the most common mode of block
ciphers, it is susceptible to a variety of brute-force attacks
CIPHER BLOCK CHAINING:
Cipher Block Chaining (CBC) mode adds a feedback
mechanism to the encryption scheme. In CBC, the plaintext is
exclusively-O Red (XORed) with the previous cipher text
block prior to encryption. In this mode, two identical blocks
of plaintext never encrypt to the same cipher text.
CIPHER FEEDBACK (CFB):
Cipher Feedback (CFB) mode is a block cipher
implementation as a self synchronizing stream cipher. CFB
mode allows data to be encrypted in units smaller than the
block size, which might be useful in some applications such
as encrypting interactive terminal input. If we were using 1-
byte CFB mode, for example, each incoming character is
placed into a shift register the same size as the block,
encrypted, and the block transmitted. At the receiving side,
the cipher text is decrypted and the extra bits in the block (i.e.,
everything above and beyond the one byte) are discarded.