Topic 3
Topic 3
CLASSICAL ENCRYPTION
TECHNIQUES
SYMMETRIC CIPHER MODEL
• Symmetric ones use the same key (called a secret key or private key)
• A symmetric cipher is one that uses the same key for encryption and
decryption.
Convertion of Plain text to cipher
text
CLASSICAL ENCRYPTION TECHNIQUES:
STREAM CIPHER
Substitution techniques
a. Caesar Cipher
b. Monoalphabetic ciphers
i. Playfair cipher
ii.Hill cipher
c. Polyalphabetic Ciphers
i. Vigenere Ciphere
ii. Vernam Cipher
d. One time pad
caeser cipher
caeser cipher( is also called as SHIFT CIPHER)
• Caesar used to encrypt his messages using a very simple algorithm, which
could be easily decrypted if you know the key.
• He would take each letter of the alphabet and replace it with a letter a
certain distance away from that letter(shift key). When he got to the end, he
would wrap back around to the beginning.
Rule of Caeser cipher:(both
encrpt,decrpt)
• Step1:Message of Encryption/Decryption
• Step2:choosing the shift key value(possible only 25 keys)
• Step3:Implementation process
C=E(K,P)=(P+K)mod26-------->Encryption
P=D(K,C)=(C-K)mod26--------->Decryption
Simple example of caeser cipher
shift key:3
Implementation:
3
a mod b
HOW TO FIND MOD VALUE?
a<b=a
Eg:
Frequence in %
Relative frequency incipher
letters
value : P,Z are high value
plain text :E ,T
Single frequency with highest
and lowest:
• High freq->P,Z--E,T
->S,U,O,M,H---a,h,i,n,o,r,s
Low freq -> {A,B,G,Y,I,J}-----{b,j,k,q,v,x}
Making in letter sequence:
(Paired text )
Playfair cipher
Making of Matrix:(5*5)
BOTH SENER AND RECEIVER KNOW THE KEY
RULES FOR ENCRYPT:
1. Both letter are exactly same in the pair (add X) in between them
2. If a letter occur in Same row ->move to one step right(right+1)
3. If a letter occur in Same column->move to one step
below(bottom+1)
4. Differents in Row and Column(get the value of their rectagle edge
value)
RULES FOR ENCRYPT WITH
EXAMPLE:
RULES FOR DECRYPT:
1. Both letter are exactly same in the pair (add X) in between them
2. If a letter occur in Same row ->move to one step left(left-1)
3. If a letter occur in Same column->move to one step top(top-1)
4. Differents in Row and Column(get the value of their rectagle edge
value)
RULES FOR DECRYPT WITH
EXAMPLE:
Example for playfiar
ACTIVITY 1
ACTIVITY 2
MODULE 3:CLASSICAL
ENCRYPTION TECHNIQUES
Polyalphabetic Cipher
Polyalphabetic Cipher:
• A poly-alphabetic cipher is any cipher based on substitution
• In polyalphabetic substitution ciphers, the plaintext letters are
enciphered differently based upon their installation in the text.
• Rather than being a one-to-one correspondence, there is a one-to-
many relationship between each letter and its substitutes
STEPS:
Step1:Plain text index.
Get the value for index from table
Step 2:Key(THE)-If its short key then “repeat it”.
Step 3:Key index->take value from the table.
Step 4:
for encrpt: (K+Plain text index)mod 26
for decry: (cipher textindex-K) mod26
Vigenere Cipher Encryption:
Step1,2:Plain text index,Key value (THE)
Step 3: key index -> value from table:
STEP 4:(k index+cipher
index)mod 26
ENCRYPTED FULLY:
DECRYPTION:same rules have
follows
cipher index value:
Plain index=(c-k)mode26:
DECRYPTED FINALLY:
one time pad
one time pad
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.
● Suppose that a cryptanalyst had managed to find these two keys. Two plausible plaintexts are
produced. How is the cryptanalyst to decide which is the correct decryption (i.e., which is the
correct key)? If the actual key were produced in a truly random fashion, then the cryptanalyst
cannot say that one of these two keys is more likely than the other.
● Thus, there is no way to decide which key is correct and therefore which plaintext is correct.
Therefore, the code is unbreakable.
● 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 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 very big key distribution problem
exists.