Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

CRYTOPOGRAPHY

INTRODUCTION
CRYTOPOGRAPHY
1. Mod Operation
2. Matrix
Adjoint of a Matrix
Determinant Matrix
Inverse Matrix
CRYTOPOGRAPHY
1. Plain text: An Original Message Is Known As The Plaintext
2. Encryption: Process Of Converting From Plaintext To Ciphertext
3. Decryption:restoring The Plaintext From The Ciphertext
4. Key
5. Ciphertext: Coded Message
CRYTOPOGRAPHY
1. Symmetric Encryption Or Single-key Encryption
2. Asymmetric Encryption Or Two-key, Or Public-key Encryption
3. Stream Ciphers: Process Messages a Bit Or Byte At A Time
4. Block Ciphers: Process Messages In Blocks
CRYTOPOGRAPHY
CLASSICAL ENCRYPTION TECHNIQUES: MODULE – 1
1.SYMMETRIC CIPHER MODEL

• Fig: Simplified Model of Symmetric Encryption


A SYMMETRIC ENCRYPTION SCHEME HAS FIVE
INGREDIENTS
1. Plaintext
2. Encryption or Enciphering
3. Secret key
4. Ciphertext
5. Decryption or Diciphering
➢ CRYPTOGRAPHY…securing information
➢ CRYPTOANALYSIS…study of dicipher
➢ CRYPTOLOGY….. The area of cryptography and cryptanalysis
TWO REQUIREMENTS FOR SECURE USE OF
CONVENTIONAL ENCRYPTION
• strong encryption algorithm
• Sender and receiver must have obtained copies of the secret key
MODEL OF SYMMETRIC CRYPTOSYSTEM

Fig:Model of Symmetric Cryptosystem


MODEL OF SYMMETRIC CRYPTOSYSTEM

• A source produces a message in plaintext, X = [X1, X2, ….. XM].


• For encryption, a key of the form K = [K1, K2, ….., KJ] is generated
• The encryption algorithm forms the ciphertext Y = [Y1,Y2, …..YN].
• Y = E(K, X)
• X = D(K,Y)
CRYPTOGRAPHIC SYSTEMS ARE CHARACTERIZED
ALONG THREE INDEPENDENT DIMENSIONS:
• The type of operations used for transforming plaintext to ciphertext
• The number of keys used
• The way in which the plaintext is processed
A. block cipher
B. stream cipher
CRYPTANALYSIS AND BRUTE-FORCE ATTACK

• Cryptanalysis
• Brute-force attack
2.SUBSTITUTION CIPHERS`

1. Substitution
NOTE:
Plain text in lowercase
Cipher text in uppercase
CAESAR CIPHER

• Julius Caesar
• Replaces each letter of the alphabet with the letter standing 3 places further
down the alphabet.

NOTE: letter following z is A

example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
CAESAR CIPHER

Key : 3
CAESAR CIPHER

• A shift may be of any amount, so that the general Caesar algorithm is


C= E(k, p) = (p + k) mod 26
where k takes on a value in the range 1 to 25
The decryption algorithm is :
p = D(k, C) = (C - k) mod 26
D---decryption
K----key
CAESAR CIPHER

• brute-force cryptanalysis is easily performed


Three important characteristics of this problem enabled us to use a bruteforce
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.
CAESAR CIPHER
BRUTEFORCE CRYPTANALYSIS:
CAESAR CIPHER

• Problems
MONOALPHABETIC CIPHER

• Permutation
• 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
MONOALPHABETIC CIPHER
A B C D E F G . . Z
G T U X Q P W . . N

Encryption:
Plain text: CAD
Cipher text: UGX
Decryption:
Cipher text: UGX
Plain text: CAD
MONOALPHABETIC CIPHER

• In English alphabet letter E is most frequently used—12.7%


• Second most common letter is T -------9.056%
• Two letter combinations we called DIGRAMS
• Most common together letter is TH –(plain text)
• Cipher text most common together letter is ZW
• Three letter combination is called TRIGRAM
• Most trigram used in the English text is THE
MONOALPHABETIC CIPHER

Standard most common using letter is E P----16/120*100=13.33%


Here most common using letter is P Z----14/120*100=11.67%
Standard Second most common letter is T
Here Second most common letter is Z
Now Replace
UTQSOVUOHXMOEVGPOTEEVSGTWSTOEFEESXUDBMETSXAIT
PLAYFAIR CIPHER

• The best-known multiple-letter encryption cipher is the Playfair


• invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair
• The Playfair algorithm is based on the use of a 5 * 5 matrix of letters constructed using a
keyword.
PLAYFAIR KEY MATRIX

• Key : MONARCHY
• First we enter a given key
• start with alphabet A letter
• But here A is present in the key
• There fore start with alphabet B
• Combine I/J
• Note: if any one box empty after entering alphabets means wrong
PLAYFAIR CIPHER

Problems
Step1: construct matrix
Step2: broke the plain text in group of 2 alphabets
Step3: if both the alphabets are same or only letter is left
then add X after first first alphabet
Plain text: 1) JAZZ 2) OFF 3) WORLD

JA ZX ZX OF FX WO RL DX
HILL CIPHER

• Hill Algorithm
problems
POLYALPHABETIC CIPHERS

• polyalphabetic substitution ciphers


• improve security using multiple cipher alphabets
• make cryptanalysis harder with more alphabets to guess and flatter frequency
distribution
VIGENÈRE CIPHER
• We can express the Vigenère cipher in the following manner
• Assume a sequence of plaintext letters P = p0, p1, p2, …., pn-1
• key consisting of the sequence of letters K = k0, k1, k2, …., km-1,
• ciphertext letters C = C0, C1, C2, ……, Cn-1
• C=E(K,P)
• C = C0, C1, C2, … Cn-1 = E(K, P) = E[(k0, k1, k2, …, km-1), (p0, p1, p2, …., pn-1)]
• (p0 + k0)mod 26, (p1 + k1)mod 26, ....., (pm-1 + km-1)mod 26,
• 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
• This process continues until all of the plaintext sequence is encrypted
VIGENÈRE CIPHER
• A general equation of the encryption process is
• Ci = (pi + ki mod m)mod 26
• decryption : pi = (Ci – ki mod m)mod 26
• For example, if the keyword is deceptive
• the message “we are discovered save yourself” ---------------problem
VIGENÈRE CIPHER

• Vigenère proposed what is referred to as an autokey system,


• For example, if the keyword is deceptive
• the message “we are discovered save yourself”------------problem
VERNAM CIPHER
• Introduced by an AT&T engineer named Gilbert Vernam in 1918

Introduced by an AT&T engineer named Gilbert Vernam in 1918

The system can be expressed: encryption


ci = pi ⊕ ki
pi = ith binary digit of plaintext
ki = ith binary digit of key
ci = ith binary digit of ciphertext
⊕ = exclusive-or (XOR) operation
decryption simply involves the same bitwise operation: pi = ci ⊕ ki
PROBLEMS
ONE-TIME PAD

• Joseph, proposed an improvement to the Vernam cipher that yields the ultimate in security
• using a random key that is as long as the message
• key need not be repeated
• the key is to be used to encrypt and decrypt a single message, and then is discarded.
• Unbreakable
• (P+K)mod 27
• Space---26
problem
ONE-TIME PAD

• Consider the ciphertext

two fundamental difficulties:


1. large quantities of random keys
2. mammoth key distribution problem exists
TRANSPOSITION TECHNIQUES

Rail fence technique


• write message letters out diagonally over a number of rows
• then read off cipher row by row
• eg. write message out as:
m e m a t r h t g p r y
e t e f e t e o a a t
• giving ciphertext (The encrypted message is)
MEMATRHTGPRYETEFETEOAAT
ROW TRANSPOSITION CIPHERS

• a more complex transposition


• write letters of message out in rows over a specified number of columns
• then reorder the columns according to some key before reading off the rows
• The transposition cipher can be made significantly more secure by performing more than
one stage of transposition
(problem)
STEGANOGRAPHY

1. Character marking
2. Invisible ink
3. Pin punctures
4. Typewriter correction ribbon

You might also like