Professional Documents
Culture Documents
Security Notes2
Security Notes2
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.
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
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
Ciphertext defghijklmnopqrstuvwxyzabc
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.
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
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
c1 c2 C3 c4 c5
c6 c7 C8 c9 c10
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
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
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 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.
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.
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
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