Unit-1 Part-2
Unit-1 Part-2
Unit-1 Part-2
•Caeser cipher
•Monoalphabetic cipher
•Playfair cipher
•Hill cipher
•Polyalphabetic cipher
Caesar Cipher
• KEY K=5
• WORD = NEW
• N value is 13 C=(13+5) mod 26 = 18 is ‘S’
• E value is 4 C=(4+5) mod 26 = 9 is ‘J’
• W value is 22 C =(22+5)mod 26 =1 is ‘B’
• For NEW the cipher text is SJB.
• Caeser cipher also callesd as additive ciphers or
shift ciphers.
MONOALPHABETIC SUBSTITUTION CIPHER
•In monoalphabetic substitution the relation ship between a
symbol in the plain text to a symbol in the cipher text is always
one-to-one.
•After sender and receiver agreed to a single key that key is
used to encrypt each letter in the plain text or decrypt each
letter in the cipher text.
•A better solution is to create a mapping between each plain
text character and corresponding cipher text character.
•An example key for monoalphabetic cipher.
Plain Text
abcdefghIjklmnopqrstuvwxyz
Cipher text
noatrbecfuxdqgylkhvIjmpzsw
MONOALPHABETIC SUBSTITUTION CIPHER
• 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 proceeding, 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.
• In general, there are n! permutations of a set of n elements,
because the first element can be chosen in one of n ways,
the second in n - 1 ways, the third in n – 2 ways, and so on.
MONOALPHABETIC SUBSTITUTION CIPHER
EX: Message : encrypt
Plain text : encrypy
Ciphertext : rgahsli
PLAYFAIR CIPHER
•After completion of this session. Students will
learn about
•Understand the basic working of playfair cipher
•Know about diagrams and generation of diagrams
with/without filter characters.
•This cipher is also called as wheatstone playfair
cipher.
•This cipher is manual symmetric encryption
technique.
PLAYFAIR CIPHER contd..
•This cipher is multiple letter encryption cipher.
•In this cipher plain text alphabets are split as
diagrams.
•This technique uses 5*5 matrix constructed using a
keyword (EX: Monarchy).
M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
PLAYFAIR CIPHER contd..
• Here the key is MONARCHY. We can take any
other key also.
•In 5*5 matrix we can enter non repeated words.
•I and J occupies same cell.
Rules for encryption using playfair cipher.
1. Diagrams
2. Repeating letter-filter it
3. Same column select immediate down element
↓ wrap around.
4. Same row select immediate right element →
wrap around
5. Rectangle ⇆ swap
EXAMPLE
•Plain text: ATTACK
•Diagram : AT TA CK
EXAMPLE-2
• MOSQUE
HILL CIPHER
POLYALPHABETIC CIPHER
• Another way to improve on the simple
monoalphabetic technique is to use different
monoalphabetic substitutions as one proceeds
through the plaintext message.
• The general name for this approach is
polyalphabetic substitution cipher.
• Polyalphabetic substitution ciphers are
1. Vigenere cipher
2. One-time pad cipher
VIGENERE CIPHER
One Time Pad
• In cryptography, a one-time pad is a system in which
a randomly generated private key is used only once
to encrypt a message that is then decrypted by the
receiver using a matching one-time pad and key.
• One-time pad cipher is a type of Vignere cipher which
includes the following features −
• It is an unbreakable cipher.
• The key is exactly same as the length of message which
is encrypted.
• The key is made up of random symbols.
• As the name suggests, key is used one time only and
never used again for any other message to be
encrypted.
One Time Pad contd..
• Due to this, encrypted message will be vulnerable to
attack for a cryptanalyst. The key used for a one-time
pad cipher is called pad, as it is printed on pads of
paper.
Encryption
• To encrypt a letter, a user needs to write a key
underneath the plaintext.
• The plaintext letter is placed on the top and the key
letter on the left.
• The cross section achieved between two letters is the
plain text.
• It is described in the example in the next slide.
One Time Pad contd..
One Time Pad contd..
Decryption
• To decrypt a letter, user takes the key letter on
the left and finds cipher text letter in that row.
• The plain text letter is placed at the top of the
column where the user can find the cipher
text letter.
TRANSPOSTION TECHNIQUES
C O R P O R
A T E B R I
D G E