MODULE-1
A MODEL FOR
NETWORK SECURITY
The following image explains that in secure communication between
two parties (principals), information must be protected from
opponents who may threaten confidentiality, authenticity, and
integrity. Security involves:
Security-related transformation – such as encryption or adding codes
to verify sender identity.
Shared secret information – like encryption keys, known only to the
parties, to scramble and unscramble messages.
A trusted third party may help distribute secrets or resolve authenticity
disputes.
A general model for secure communication between two parties, involving:
[Link] a secure transformation algorithm.
[Link] secret information (e.g., encryption keys).
[Link] and sharing the secret securely.
[Link] a protocol that combines the algorithm and secret to deliver the service.
Beyond this model, other threats include unwanted access to systems, often from
hackers, disgruntled employees, or criminals. These attacks may exploit vulnerabilities,
leading to:
Information access threats – unauthorized interception or modification of data.
Service threats – exploiting flaws to disrupt legitimate users.
Viruses and worms are examples of software attacks, introduced via infected media
or networks. To counter unwanted access, two defense layers are used:
Gatekeeper functions – password-based logins and logic to block unauthorized
users and detect malicious software.
Internal controls – monitoring activity and analyzing stored data to detect
intrusions.
CLASSICAL ENCRYPTION TECHNIQUES
Symmetric encryption, also referred to as conventional
encryption or single-key encryption.
An original message is known as the plaintext, while the coded
message is called the ciphertext. The process of converting from
plaintext to ciphertext is known as enciphering or encryption;
restoring the plaintext from the ciphertext is deciphering or
decryption. The many schemes used for encryption constitute
the area of study known as cryptography. Such a scheme is
known as a cryptographic system or a cipher. Techniques used
for deciphering a message without any knowledge of the
enciphering details fall into the area of cryptanalysis.
Cryptanalysis is what the layperson calls “breaking the code.”
The areas of cryptography and cryptanalysis together are called
cryptology.
Symmetric Cipher model
A symmetric encryption scheme has five ingredients
Plaintext: This is the original intelligible message or data that is fed into the
algorithm as input.
Encryption algorithm: The encryption algorithm performs various substitutions and
transformations on the plaintext.
Secret key: The secret key is also input to the encryption algorithm. The key
is a value independent of the plaintext and of the algorithm. The
algorithm will produce a different output depending on the specific key
being used at the time. The exact substitutions and transformations
performed by the algorithm depend on the key.
Ciphertext: This is the scrambled message produced as output. It depends
on the plaintext and the secret key. For a given message, two different
keys will produce two different ciphertexts. The ciphertext is an apparently
random stream of data and, as it stands, is unintelligible.
Decryption algorithm: This is essentially the encryption algorithm run in
reverse. It takes the ciphertext and the secret key and produces the
original plaintext.
There are two requirements for secure use of conventional
encryption:
We need a strong encryption algorithm. At a minimum, we would
like the algorithm to be such that an opponent who knows the
algorithm and has access to one or more ciphertexts would be
unable to decipher the ciphertext or figure out the key. This
requirement is usually stated in a stronger form: The opponent
should be unable to decrypt ciphertext or discover the key even if
he or she is in possession of a number of ciphertexts together with
the plaintext that produced each ciphertext.
Sender and receiver must have obtained copies of the secret key
in a secure fashion and must keep the key secure. If someone else
discovers the key and knows the algorithm, all communication
using this key is readable.
Let us take a closer look at the essential elements of a symmetric encryption
scheme, using Figure 2.2. A source produces a message in plaintext,
The M elements of X are letters in some finite alphabet.
Traditionally, the alphabet usually consisted of the 26 capital letters.
Nowadays, the binary alphabet {0,1} is typically used. For encryption, a key
of the form
is generated. If the key is generated at the message
source, then it must also be provided to the destination by means of some
secure channel. Alternatively, a third party could generate the key and
securely deliver it to both source and destination.
With the message X and the encryption key K as input, the encryption
algorithm forms the ciphertext
. We can write this as
This notation indicates that Y is produced by using encryption algorithm E as a
function of the plaintext X, with the specific function determined by the value of the
key K.
The intended receiver, in possession of the key, is able to invert the
transformation:
encryption (E) and decryption (D) algorithms.
Cryptanalysis and Brute-Force Attack
Typically, the objective of attacking an encryption system is to recover the key in
use rather than simply to recover the plaintext of a single ciphertext.
There are two general approaches to attacking a conventional encryption scheme:
• Cryptanalysis: Cryptanalytic attacks rely on the nature of the algorithm plus
perhaps some knowledge of the general characteristics of the plaintext or
even some sample plaintext–ciphertext pairs. This type of attack exploits the
characteristics of the algorithm to attempt to deduce a specific plaintext or to
deduce the key being used.
• Brute-force attack: The attacker tries every possible key on a piece of cipher-
text until an intelligible translation into plaintext is obtained. On average, half
of all possible keys must be tried to achieve success.
The two basic building blocks of all encryption techniques are substitution and
transposition.
A substitution technique is one in which the letters of plaintext are replaced byother letters
or by numbers or symbols.1 If the plaintext is viewed as a sequence of bits, then
substitution involves replacing plaintext bit patterns with ciphertext bit patterns
Caesar cipher:
The earliest known, and the simplest, use of a substitution cipher was by Julius Caesar.
The Caesar cipher involves replacing each letter of the alphabet with the letter standing
three places further down the alphabet. For example
For each plaintext letter p, substitute the ciphertext letter C:
C= E(3, p)= (p + 3) mod 26
Three important characteristics of this problem enabled us to use a brute-
force cryptanalysis:
1. The encryption and decryption algorithms are known.
2. There are only 25 keys to try.
3. The language of the plaintext is known and easily recognizable.
MONOALPHABETIC CIPHERS
With only 25 possible keys, the Caesar cipher is far from
secure. A dramatic increase in the key space can be
achieved by allowing an arbitrary substitution. Before pro-
ceeding, we define the term permutation. A permutation
of a finite set of elements S is an ordered sequence of all
the elements of S, with each element appearing exactly
once.
For example, if S= {a, b, c}, there are six permutations
of S: abc, acb, bac, bca, cab, cba
MONOALPHABETIC CIPHERS
If the cryptanalyst knows the nature of the plaintext (e.g., noncompressed English text),
then the analyst can exploit the regularities of the language.
PLAYFAIR CIPHERS
The best-known multiple-letter encryption cipher is the Playfair, which treats
digrams in the plaintext as single units and translates these units into
ciphertext digrams.
The Playfair algorithm is based on the use of a 5 * 5 matrix of letters
constructed using a keyword.
In this case, the keyword is monarchy. The matrix is constructed by filling in the letters of the
keyword (minus duplicates) from left to right and from top to bottom, and then filling in the
remainder of the matrix with the remaining letters in alphabetic order. The letters I and J
count as one letter.
PLAYFAIR CIPHERS
Plaintext is encrypted two letters at a time, according to the following
rules:
1. Repeating plaintext letters that are in the same pair are separated with a filler
letter, such as x, so that balloon would be treated as ba lx lo on.
2. Two plaintext letters that fall in the same row of the matrix are each replaced by
the letter to the right, with the first element of the row circularly following the last.
For example, ar is encrypted as RM.
3. Two plaintext letters that fall in the same column are each replaced by the letter
beneath, with the top element of the column circularly following the last. For
example, mu is encrypted as CM.
4. Otherwise, each plaintext letter in a pair is replaced by the letter that lies in its
own row and the column occupied by the other plaintext letter. Thus, hs becomes
BP and ea becomes IM (or JM, as the encipherer wishes).
The Playfair cipher is a great advance over simple monoalphabetic ciphers.
Hill Cipher
Another interesting multiletter cipher is the Hill cipher, developed by the mathematician Lester Hill
in 1929.
Polyalphabetic Ciphers
Another way to improve on the simple monoalphabetic technique is to use differ-
ent monoalphabetic substitutions as one proceeds through the plaintext message.
The general name for this approach is polyalphabetic substitution cipher. All these
techniques have the following features in common:
1. A set of related monoalphabetic substitution rules is used.
2. A key determines which particular rule is chosen for a given transformation.
Vigenère Cipher
The best known, and one of the simplest, polyalphabetic ciphers is the Vigenère cipher. In this
scheme, the set of related monoalphabetic substitution rules consists of the 26 Caesar ciphers with
shifts of 0 through 25.
Each cipher is denoted by a key letter, which is the ciphertext letter that substitutes for the
plaintext letter a. Thus, a Caesar cipher with a shift of 3 is denoted by the key value 3.
We can express the Vigenère cipher in the following manner. Assume a sequence of plaintext
letters P= p0, p1, p2, c, pn- 1 and a key consisting of the sequence of letters K= k0, k1, k2, c, km- 1,
where typically m 6 n.
The sequence of ciphertext letters C= C0, C1, C2, c, Cn- 1 is calculated as follows: C= C0, C1, C2, c,
Cn- 1 = E(K, P)= E[(k0, k1, k2, c, km- 1), (p0, p1, p2, c, pn- 1)]= (p0 + k0) mod 26, (p1 + k1) mod 26, c,
(pm- 1 + km- 1) mod 26, (pm + k0) mod 26, (pm + 1 + k1) mod 26, c, (p2m- 1 + km- 1) mod 26, c
Thus, the first letter of the key is added to the first letter of the plaintext, mod 26, the second letters
are added, and so on through the first m letters of the plaintext. For the next m letters of the plaintext,
the key letters are repeated. This process continues until all of the plaintext sequence is encrypted.
A general equation of the encryption process is
Ci = (pi + ki mod m) mod 26 (2.3) .
Compare this with Equation (2.1) for the Caesar cipher. In essence, each plaintext character is
encrypted with a different Caesar cipher, depending on the corresponding key character.
Similarly, decryption is a generalization of Equation (2.2):
pi = (Ci- ki mod m) mod 26
The strength of this cipher is that there are multiple ciphertext letters for each plaintext letter,
one for each unique letter of the keyword. Thus, the letter frequency information is obscured.
The periodic nature of the keyword can be eliminated by using a nonrepeating keyword that is
as long as the message itself.
Vigenère proposed what is referred to as an autokey system, in which a keyword is
concatenated with the plaintext itself to provide a running key. For our example,
Even this scheme is vulnerable to cryptanalysis. Because the key and the plaintext share the same
frequency distribution of letters, a statistical technique can be applied.
VERNAM CIPHER
The ultimate defense against such a cryptanalysis is to choose a keyword that is as long as the
plaintext and has no statistical relationship to it. Such a system was introduced by an AT&T engineer
named Gilbert Vernam in 1918.
One-Time Pad:
An Army Signal Corp officer, Joseph Mauborgne, proposed an improvement to the Vernam cipher that yields
the ultimate in security.
Mauborgne suggested using a random key that is as long as the message, so that the key need not be
repeated.
In addition, the key is to be used to encrypt and decrypt a single message, and then is discarded.
Each new message requires a new key of the same length as the new message. Such a scheme, known as a
one-time pad, is unbreakable.
In theory, we need look no further for a cipher. The one-time pad offers complete
security but, in practice, has two fundamental difficulties:
1. There is the practical problem of making large quantities of random keys. Any
heavily used system might require millions of random characters on a regular basis.
Supplying truly random characters in this volume is a significant task.
2. Even more daunting is the problem of key distribution and protection. For every
message to be sent, a key of equal length is needed by both sender and receiver.
Thus, a mammoth key distribution problem exists.
Because of these difficulties, the one-time pad is of limited utility and is useful
primarily for low-bandwidth channels requiring very high security.
chapter ends
THANK YOU