You are on page 1of 9

Cryptography is the art and science of achieving security by encoding message to make

them non-readable.
Cryptanalysis is the technique of decoding message from a non-readable format back to
readable format without knowing how they were initially converted from readable format
to non-readable format.

A cryptanalyst can do any or all of six different things:

attempt to break a single message


attempt to recognize patterns in encrypted messages, to be able to break
subsequent ones by applying a straightforward decryption algorithm

attempt to infer some meaning without even breaking the encryption, such as
noticing an unusual frequency of communication or determining something by
whether the communication was short or long

attempt to deduce the key, in order to break subsequent messages easily

attempt to find weaknesses in the implementation or environment of use of


encryption

attempt to find general weaknesses in an encryption algorithm, without


necessarily having intercepted any messages

Plain text and Cipher text-:


plain text or clear text signifies a message that can be understood by the sender , the
recipient and also by anyone else who gets an access to that message.
When plain text message is codified using any suitable scheme , the resulting message is
called as cipher text.
Two primary ways in which plain text message can be codified to obtain the
corresponding cipher text
Substitution (in which one letter is exchanged for another ) and Transposition (in which
the order of the letters is rearranged.)

Substitution Techniques are Caesar Cipher, Modified Version of Caesar Cipher, Mono-
alphabetic Cipher etc.
The Caesar Cipher-:
Julius Caesar is said to have been the first to use this scheme, in which each letter is
translated to a letter a fixed number of places after it in the alphabet. Caesar used a shift
of 3, so that plaintext letter pi was enciphered as ciphertext letter ci by the rule

A full translation chart of the Caesar cipher is shown here.


Plaintext ABCDEFGHIJKLMNOPQRSTUVWXYZ

Ciphertext defghijklmnopqrstuvwxyzabc

Using this encryption, the message

TREATY IMPOSSIBLE

would be encoded as

T R E A T Y I M P O S S I B L E

w u h d w b l p s r v v l e o h

Suppose you are given the following ciphertext message, and you want to try to
determine the original plaintext.

wklv phvvdjh lv qrw wrr kdug wr euhdn

For instance, if wrr is SEE, wr would have to be SE, which is unlikely. However, if wrr is
TOO, wr would be TO, which is quite reasonable. Substituting T for w and O for r, the
message becomes

wklv phvvdjh lv qrw wrr kdug wr euhdn

T--- ------- -- -OT TOO ---- TO -----

The -OT could be cot, dot, got, hot, lot, not, pot, rot, or tot; a likely choice is not.
Unfortunately, q = N does not give any more clues because q appears only once in this
sample.

The word lv is also the end of the word wklv, which probably starts with T. Likely two-
letter words that can also end a longer word include so, is, in, etc. However, so is unlikely
because the form T-SO is not recognizable; IN is ruled out because of the previous
assumption that q is N. A more promising alternative is to substitute IS for lv throughout,
and continue to analyze the message in that way

transposition is an encryption in which the letters of the message are rearranged. With
transposition, the cryptography aims for diffusion, widely spreading the information from
the message or the key across the ciphertext. Transpositions try to break established
patterns. Because a transposition is a rearrangement of the symbols of a message, it is
also known as a permutation

Columnar Transpositions

As with substitutions, we begin this study of transpositions by examining a simple


example. The columnar transposition is a rearrangement of the characters of the plaintext
into columns.

The following set of characters is a five-column transposition. The plaintext characters


are written in rows of five and arranged one row after another, as shown here.

c1 c2 C3 c4 c5

c6 c7 C8 c9 c10

c11 c12 etc.

For instance, suppose you want to write the plaintext message THIS IS A MESSAGE TO
SHOW HOW A COLUMNAR TRANSPOSITION WORKS. We arrange the letters in five columns
as

T H I S I

S A M E S

S A G E T

O S H O W

H O W A C

O L U M N

A R T R A

N S P O S

I T I O N

W O R K S

The resulting ciphertext would then be read down the columns as

tssoh oaniw haaso lrsto imghw


utpir seeoa mrook istwc nasns

In this example, the length of this message happens to be a multiple of five, so all
columns are the same length. However, if the message length is not a multiple of the
length of a row, the last columns will be one or more letters short. When this happens, we
sometimes use an infrequent letter such as X to fill in any short columns
Making "Good" Encryption Algorithms
Shannon's Characteristics of "Good" Ciphers
1. The amount of secrecy needed should determine the amount of labor appropriate
for the encryption and decryption
2. The set of keys and the enciphering algorithm should be free from complexity
3. Errors in ciphering should not propagate and cause corruption of further
information in the message
4. The size of the enciphered text should be no larger than the text of the original
message

Properties of "Trustworthy" Encryption Systems

Commercial users have several requirements that must be satisfied when they select an
encryption algorithm. Thus, when we say that encryption is "commercial grade," we
mean that it meets these constraints:

It is based on sound mathematics. Good cryptographic algorithms are not just


invented; they are derived from solid principles.
It has been analyzed by competent experts and found to be sound. Even the best
cryptographic experts can think of only so many possible attacks, and the
developers may become too convinced of the strength of their own algorithm.
Thus, a review by critical outside experts is essential.

It has stood the "test of time." As a new algorithm gains popularity, people
continue to review both its mathematical foundations and the way it builds upon
those foundations. Although a long period of successful use and analysis is not a
guarantee of a good algorithm, the flaws in many algorithms are discovered
relatively soon after their release.

Symmetric and Asymmetric Encryption Systems-:

Recall that the two basic kinds of encryptions are symmetric (also called "secret key")
and asymmetric (also called "public key"). Symmetric algorithms use one key, which
works for both encryption and decryption. Usually, the decryption algorithm is closely
related to the encryption one. (For example, the Caesar cipher with a shift of 3 uses the
encryption algorithm "substitute the character three letters later in the alphabet" with the
decryption "substitute the character three letters earlier in the alphabet.")

The symmetric systems provide a two-way channel to their users: A and B share a secret
key, and they can both encrypt information to send to the other as well as decrypt
information from the other. As long as the key remains secret, the system also provides
authentication, proof that a message received was not fabricated by someone other than
the declared sender. Authenticity is ensured because only the legitimate sender can
produce a message that will decrypt properly with the shared key.

leads to a problem: key distribution


How do A and B obtain their shared secret key? And only A and B can use that key for
their encrypted communications. If A wants to share encrypted communication with
another user C, A and C need a different shared key. Key distribution is the major
difficulty in using symmetric encryption. In general, n users who want to communicate in
pairs need n * (n 1)/2 keys. In other words, the number of keys needed increases at a
rate proportional to the square of the number of users! So a property of symmetric
encryption systems is that they require a means of key distribution

Public key systems, you can send a public key in an e-mail message or post it in a public
directory. Only the corresponding private key, which presumably is kept private, can
decrypt what has been encrypted with the public key
Stream and Block Ciphers-:Most of the ciphers studied in this chapter are stream
ciphers; that is, they convert one symbol of plaintext immediately into a symbol of
ciphertext. (The exception is the columnar transposition cipher.) The transformation
depends only on the symbol, the key, and the control information of the encipherment
algorithm. A model of stream enciphering is shown in figure

A block cipher encrypts a group of plaintext symbols as one block. The columnar
transposition and other transpositions are examples of block ciphers. In the columnar
transposition, the entire message is translated as one block. The block size need not have
any particular relationship to the size of a character. Block ciphers work on blocks of
plaintext and produce blocks of ciphertext . as shown Figure In the figure, the central
box represents an encryption machine: The previous plaintext pair is converted to po, the
current one being converted is IH, and the machine is soon to convert ES
Comparing Stream and Block Algorithms

Stream Encryption Algorithms Block Encryption Algorithms


Speed of transformation. Because each High diffusion. Information
Advantages symbol is encrypted without regard for from the plain-text is diffused
any other plaintext symbols, each into several ciphertext
symbol can be encrypted as soon as it symbols. One ciphertext block
is read. Thus, the time to encrypt a may depend on several
symbol depends only on the
Stream Encryption Algorithms Block Encryption Algorithms
encryption algorithm itself, not on the plaintext letters.
time it takes to receive more plaintext.
Immunity to insertion of
Low error propagation. Because each symbols. Because blocks of
symbol is separately encoded, an error symbols are enciphered, it is
in the encryption process affects only impossible to insert a single
that character. symbol into one block. The
length of the block would then
be incorrect, and the
decipherment would quickly
reveal the insertion.
Low diffusion. Each symbol is Slowness of encryption. The
Disadvantages separately enciphered. Therefore, all person or machine using a
the information of that symbol is block cipher must wait until an
contained in one symbol of the entire block of plaintext
ciphertext. symbols has been received
before starting the encryption
Susceptibility to malicious insertions process.
and modifications. Because each
symbol is separately enciphered, an Error propagation. An error
active interceptor who has broken the will affect the transformation
code can splice together pieces of of all other characters in the
previous messages and transmit a same block
spurious new message that may look
authentic.

Confusion and Diffusion


Two additional important concepts are related to the amount of work required to perform
an encryption. An encrypting algorithm should take the information from the plaintext
and transform it so that the interceptor cannot readily recognize the message. The
interceptor should not be able to predict what will happen to the ciphertext by changing
one character in the plaintext. We call this characteristic confusion. An algorithm
providing good confusion has a complex functional relationship between the
plaintext/key pair and the ciphertext. In this way, it will take an interceptor a long time to
determine the relationship between plaintext, key, and ciphertext; therefore, it will take
the interceptor a long time to break the code
The cipher should also spread the information from the plaintext over the entire
ciphertext so that changes in the plaintext affect many parts of the ciphertext. This
principle is called diffusion, the characteristic of distributing the information from single
plaintext letters over the entire output. Good diffusion means that the interceptor needs
access to much of the ciphertext to be able to infer the algorithm

CryptanalysisBreaking Encryption Schemes-:

What does a cryptanalyst do when confronted with an unknown, and possibly very
strong, encryption scheme? Four possible situations confront the cryptanalyst, depending
on what information is available

ciphertext
full plaintext

partial plaintext

algorithm

these four cases suggest five different approaches the analyst can use
Ciphertext Only-:The decryption had to be based on probabilities, distributions, and
characteristics of the available ciphertext, plus publicly available knowledge.This is also
called known plaintext attack.
Full or Partial Plaintext-: The analyst may be fortunate enough to have a sample
message and its decipherment
interceptor has both C and P and needs only to deduce the E for which C = E(P) to find
D. In this case the analyst is attempting to find E (or D) by using a known plaintext attack
this is also called probable plaintext analysis
Ciphertext of Any Plaintext-:This attack is called a chosen plaintext attack . The
analyst may have infiltrated the sender's transmission process so as to be able to cause
messages to be encrypted and sent at will. For instance, the analyst may be able to insert
records into a database and observe the change in statistics after the insertions. sending a
particular message to a particular network user observe the change. The cryptanalyst may
be an insider or have an inside colleague and thus be able to cause certain transactions to
be reflected in ciphertext. A chosen plaintext attack is very favorable to the analyst
Algorithm and Ciphertext-: The analyst may have available both the encryption
algorithm and the ciphertext. In a chosen ciphertext attack, the analyst can run the
algorithm on massive amounts of plaintext to find one plaintext message that encrypts as
the ciphertext. The purpose of a chosen ciphertext attack is to deduce the sender's
encryption key so as to be able to decrypt future messages by simply applying the
sender's decryption key to intercepted ciphertext. This approach fails if two or more
distinct keys can produce the same ciphertext as the result of encrypting (different)
meaningful plaintext
Ciphertext and Plaintext-: The cryptanalyst may be lucky enough to have some pairs of
plaintext and matching ciphertext.

Weaknesses-: A cryptanalyst works against humans, who can be hurried, lazy, careless,
nave, or uninformed. Humans sometimes fail to change cryptographic keys when
needed, broadcast cryptographic keys in the clear, or choose keys in a predictable manner.
That is, the algorithm may be strong and the implementation effective, but the people
using it fail in some way and open up the encryption to detection. People have been
known to be careless, discarding sensitive material that could give a spy access to
plaintext by matching known ciphertext. And humans can sometimes be bribed or
coerced

You might also like