SlideShare a Scribd company logo
1 of 41
CRYPTOGRAPHY AND
NETWORK SECURITY
FOURTH EDITION, BY WILLIAM STALLINGS, LECTURE SLIDES BY LAWRIE BROWN
PRESENTED BY
UMAKANT BHASKAR GOHATRE
ASSISTANT PROFESSOR, SMT. INDIRA GANDHI COLLEGE OF ENGINEERING, NAVI
MUMBAI
CLASSICAL ENCRYPTION
TECHNIQUES
Many savages at the present day regard their
names as vital parts of themselves, and therefore
take great pains to conceal their real names, lest
these should give to evil-disposed persons a
handle by which to injure their owners.
ā€”The Golden Bough, Sir James George Frazer
SYMMETRIC ENCRYPTION
ā€¢ or conventional / private-key / single-key
ā€¢ sender and recipient share a common key
ā€¢ all classical encryption algorithms are private-key
ā€¢ was only type prior to invention of public-key in 1970ā€™s
ā€¢ and by far most widely used
SOME BASIC TERMINOLOGY
ā€¢ plaintext - original message
ā€¢ ciphertext - coded message
ā€¢ cipher - algorithm for transforming plaintext to ciphertext
ā€¢ key - info used in cipher known only to sender/receiver
ā€¢ encipher (encrypt) - converting plaintext to ciphertext
ā€¢ decipher (decrypt) - recovering ciphertext from plaintext
ā€¢ cryptography - study of encryption principles/methods
ā€¢ cryptanalysis (codebreaking) - study of principles/
methods of deciphering ciphertext without knowing key
ā€¢ cryptology - field of both cryptography and cryptanalysis
SYMMETRIC CIPHER MODEL
REQUIREMENTS
ā€¢ two requirements for secure use of symmetric
encryption:
ā€¢ a strong encryption algorithm
ā€¢ a secret key known only to sender / receiver
ā€¢ mathematically have:
Y = EK(X)
X = DK(Y)
ā€¢ assume encryption algorithm is known
ā€¢ implies a secure channel to distribute key
CRYPTOGRAPHY
ā€¢ characterize cryptographic system by:
ā€¢ type of encryption operations used
ā€¢ substitution / transposition / product
ā€¢ number of keys used
ā€¢ single-key or private / two-key or public
ā€¢ way in which plaintext is processed
ā€¢ block / stream
CRYPTANALYSIS
ā€¢ objective to recover key not just message
ā€¢ general approaches:
ā€¢ cryptanalytic attack
ā€¢ brute-force attack
CRYPTANALYTIC ATTACKS
ā€¢ ciphertext only
ā€¢ only know algorithm & ciphertext, is statistical, know or can identify plaintext
ā€¢ known plaintext
ā€¢ know/suspect plaintext & ciphertext
ā€¢ chosen plaintext
ā€¢ select plaintext and obtain ciphertext
ā€¢ chosen ciphertext
ā€¢ select ciphertext and obtain plaintext
ā€¢ chosen text
ā€¢ select plaintext or ciphertext to en/decrypt
MORE DEFINITIONS
ā€¢ unconditional security
ā€¢ no matter how much computer power or time is available, the cipher cannot be
broken since the ciphertext provides insufficient information to uniquely
determine the corresponding plaintext
ā€¢ computational security
ā€¢ given limited computing resources (eg time needed for calculations is greater
than age of universe), the cipher cannot be broken
BRUTE FORCE SEARCH
ā€¢ always possible to simply try every key
ā€¢ most basic attack, proportional to key size
ā€¢ assume either know / recognise plaintext
Key Size (bits) Number of Alternative
Keys
Time required at 1
decryption/Āµs
Time required at 106
decryptions/Āµs
32 232 = 4.3 ļ‚“ 109 231 Āµs = 35.8 minutes 2.15 milliseconds
56 256 = 7.2 ļ‚“ 1016 255 Āµs = 1142 years 10.01 hours
128 2128 = 3.4 ļ‚“ 1038 2127 Āµs = 5.4 ļ‚“ 1024 years 5.4 ļ‚“ 1018 years
168 2168 = 3.7 ļ‚“ 1050 2167 Āµs = 5.9 ļ‚“ 1036 years 5.9 ļ‚“ 1030 years
26 characters
(permutation)
26! = 4 ļ‚“ 1026 2 ļ‚“ 1026 Āµs = 6.4 ļ‚“ 1012 years 6.4 ļ‚“ 106 years
CLASSICAL SUBSTITUTION
CIPHERS
ā€¢ where letters of plaintext are replaced by other letters
or by numbers or symbols
ā€¢ or if plaintext is viewed as a sequence of bits, then
substitution involves replacing plaintext bit patterns
with ciphertext bit patterns
CAESAR CIPHER
ā€¢ earliest known substitution cipher
ā€¢ by Julius Caesar
ā€¢ first attested use in military affairs
ā€¢ replaces each letter by 3rd letter on
ā€¢ example:
meet me after the toga party
PHHW PH DIWHU WKH WRJD SDUWB
CAESAR CIPHER
ā€¢ can define transformation as:
a b c d e f g h i j k l m n o p q r s t u v w x y z
D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
ā€¢ mathematically give each letter a number
a b c d e f g h i j k l m n o p q r s t u v w x y
z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25
ā€¢ then have Caesar cipher as:
c = E(p) = (p + k) mod (26)
p = D(c) = (c ā€“ k) mod (26)
CRYPTANALYSIS OF CAESAR
CIPHER
ā€¢ only have 26 possible ciphers
ā€¢ A maps to A,B,..Z
ā€¢ could simply try each in turn
ā€¢ a brute force search
ā€¢ given ciphertext, just try all shifts of letters
ā€¢ do need to recognize when have plaintext
ā€¢ eg. break ciphertext "GCUA VQ DTGCM"
MONOALPHABETIC CIPHER
ā€¢ rather than just shifting the alphabet
ā€¢ could shuffle (jumble) the letters arbitrarily
ā€¢ each plaintext letter maps to a different
random ciphertext letter
ā€¢ hence key is 26 letters long
Plain: abcdefghijklmnopqrstuvwxyz
Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
MONOALPHABETIC CIPHER
SECURITY
ā€¢ now have a total of 26! = 4 x 1026 keys
ā€¢ with so many keys, might think is secure
ā€¢ but would be !!!WRONG!!!
ā€¢ problem is language characteristics
LANGUAGE REDUNDANCY
AND CRYPTANALYSIS
ā€¢ human languages are redundant
ā€¢ eg "th lrd s m shphrd shll nt wnt"
ā€¢ letters are not equally commonly used
ā€¢ in English E is by far the most common letter
ā€¢ followed by T,R,N,I,O,A,S
ā€¢ other letters like Z,J,K,Q,X are fairly rare
ā€¢ have tables of single, double & triple letter
frequencies for various languages
ENGLISH LETTER FREQUENCIES
USE IN CRYPTANALYSIS
ā€¢ key concept - monoalphabetic substitution ciphers
do not change relative letter frequencies
ā€¢ discovered by Arabian scientists in 9th century
ā€¢ calculate letter frequencies for ciphertext
ā€¢ compare counts/plots against known values
ā€¢ if caesar cipher look for common peaks/troughs
ā€¢ peaks at: A-E-I triple, NO pair, RST triple
ā€¢ troughs at: JK, X-Z
ā€¢ for monoalphabetic must identify each letter
ā€¢ tables of common double/triple letters help
EXAMPLE CRYPTANALYSIS
ā€¢ given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
ā€¢ count relative letter frequencies (see text)
ā€¢ guess P & Z are e and t
ā€¢ guess ZW is th and hence ZWP is the
ā€¢ proceeding with trial and error finally get:
it was disclosed yesterday that several informal
but
direct contacts have been made with political
representatives of the viet cong in moscow
PLAYFAIR CIPHER
ā€¢ not even the large number of keys in a
monoalphabetic cipher provides security
ā€¢ one approach to improving security was to encrypt
multiple letters
ā€¢ the Playfair Cipher is an example
ā€¢ invented by Charles Wheatstone in 1854, but named
after his friend Baron Playfair
PLAYFAIR KEY MATRIX
ā€¢ a 5X5 matrix of letters based on a keyword
ā€¢ fill in letters of keyword (sans duplicates)
ā€¢ fill rest of matrix with other letters
ā€¢ eg. using the keyword 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
ENCRYPTING AND DECRYPTING
ā€¢ plaintext is encrypted two letters at a time
1. if a pair is a repeated letter, insert filler like 'Xā€™
2. if both letters fall in the same row, replace each with letter to right (wrapping back
to start from end)
3. if both letters fall in the same column, replace each with the letter below it (again
wrapping to top from bottom)
4. otherwise each letter is replaced by the letter in the same row and in the column
of the other letter of the pair
SECURITY OF PLAYFAIR CIPHER
ā€¢ security much improved over
monoalphabetic
ā€¢ since have 26 x 26 = 676 digrams
ā€¢ would need a 676 entry frequency table
to analyse (verses 26 for a
monoalphabetic)
ā€¢ and correspondingly more ciphertext
ā€¢ was widely used for many years
ā€¢ eg. by US & British military in WW1
ā€¢ it can be broken, given a few hundred
letters
ā€¢ since still has much of plaintext structure
POLYALPHABETIC CIPHERS
ā€¢ polyalphabetic substitution ciphers
ā€¢ improve security using multiple cipher alphabets
ā€¢ make cryptanalysis harder with more alphabets to
guess and flatter frequency distribution
ā€¢ use a key to select which alphabet is used for
each letter of the message
ā€¢ use each alphabet in turn
ā€¢ repeat from start after end of key is reached
VIGENƈRE CIPHER
ā€¢ simplest polyalphabetic substitution cipher
ā€¢ effectively multiple caesar ciphers
ā€¢ key is multiple letters long K = k1 k2 ... kd
ā€¢ ith letter specifies ith alphabet to use
ā€¢ use each alphabet in turn
ā€¢ repeat from start after d letters in message
ā€¢ decryption simply works in reverse
EXAMPLE OF VIGENƈRE CIPHER
ā€¢ write the plaintext out
ā€¢ write the keyword repeated above it
ā€¢ use each key letter as a caesar cipher key
ā€¢ encrypt the corresponding plaintext letter
ā€¢ eg using keyword deceptive
key: deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
AIDS
ā€¢ simple aids can assist with en/decryption
ā€¢ a Saint-Cyr Slide is a simple manual aid
ā€¢ a slide with repeated alphabet
ā€¢ line up plaintext 'A' with key letter, eg 'C'
ā€¢ then read off any mapping for key letter
ā€¢ can bend round into a cipher disk
ā€¢ or expand into a VigenĆØre Tableau
SECURITY OF VIGENƈRE CIPHERS
ā€¢ have multiple ciphertext letters for each plaintext letter
ā€¢ hence letter frequencies are obscured
ā€¢ but not totally lost
ā€¢ start with letter frequencies
ā€¢ see if look monoalphabetic or not
ā€¢ if not, then need to determine number of alphabets,
since then can attach each
KASISKI METHOD
ā€¢ method developed by Babbage / Kasiski
ā€¢ repetitions in ciphertext give clues to period
ā€¢ so find same plaintext an exact period apart
ā€¢ which results in the same ciphertext
ā€¢ of course, could also be random fluke
ā€¢ eg repeated ā€œVTWā€ in previous example
ā€¢ suggests size of 3 or 9
ā€¢ then attack each monoalphabetic cipher
individually using same techniques as before
AUTOKEY CIPHER
ā€¢ ideally want a key as long as the message
ā€¢ VigenĆØre proposed the autokey cipher
ā€¢ with keyword is prefixed to message as key
ā€¢ knowing keyword can recover the first few letters
ā€¢ use these in turn on the rest of the message
ā€¢ but still have frequency characteristics to attack
ā€¢ eg. given key deceptive
key: deceptivewearediscoveredsav
plaintext: wearediscoveredsaveyourself
ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA
ONE-TIME PAD
ā€¢ if a truly random key as long as the message is used, the
cipher will be secure
ā€¢ called a One-Time pad
ā€¢ is unbreakable since ciphertext bears no statistical
relationship to the plaintext
ā€¢ since for any plaintext & any ciphertext there exists a key
mapping one to other
ā€¢ can only use the key once though
ā€¢ problems in generation & safe distribution of key
TRANSPOSITION CIPHERS
ā€¢ now consider classical transposition or permutation
ciphers
ā€¢ these hide the message by rearranging the letter order
ā€¢ without altering the actual letters used
ā€¢ can recognise these since have the same frequency
distribution as the original text
RAIL FENCE CIPHER
ā€¢ 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
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
Key: 3 4 2 1 5 6 7
Plaintext: a t t a c k p
o s t p o n e
d u n t i l t
w o a m x y z
Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
PRODUCT CIPHERS
ā€¢ ciphers using substitutions or transpositions
are not secure because of language
characteristics
ā€¢ hence consider using several ciphers in
succession to make harder, but:
ā€¢ two substitutions make a more complex
substitution
ā€¢ two transpositions make more complex
transposition
ā€¢ but a substitution followed by a transposition
makes a new much harder cipher
ā€¢ this is bridge from classical to modern
ciphers
ROTOR MACHINES
ā€¢ before modern ciphers, rotor machines
were most common complex ciphers in
use
ā€¢ widely used in WW2
ā€¢ German Enigma, Allied Hagelin, Japanese
Purple
ā€¢ implemented a very complex, varying
substitution cipher
ā€¢ used a series of cylinders, each giving one
substitution, which rotated and changed
after each letter was encrypted
ā€¢ with 3 cylinders have 263=17576
alphabets
HAGELIN ROTOR MACHINE
STEGANOGRAPHY
ā€¢ an alternative to encryption
ā€¢ hides existence of message
ā€¢ using only a subset of letters/words in a longer message
marked in some way
ā€¢ using invisible ink
ā€¢ hiding in LSB in graphic image or sound file
ā€¢ has drawbacks
ā€¢ high overhead to hide relatively few info bits
SUMMARY
ā€¢ have considered:
ā€¢ classical cipher techniques and terminology
ā€¢ monoalphabetic substitution ciphers
ā€¢ cryptanalysis using letter frequencies
ā€¢ Playfair cipher
ā€¢ polyalphabetic ciphers
ā€¢ transposition ciphers
ā€¢ product ciphers and rotor machines
ā€¢ stenography

More Related Content

What's hot

Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptographyG Prachi
Ā 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherMona Rajput
Ā 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Mohamed Loey
Ā 
Cryptography & network security
Cryptography & network securityCryptography & network security
Cryptography & network securitysathu30
Ā 
Chapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutanChapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutannewbie2019
Ā 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher SystemAsad Ali
Ā 
Ch02...1
Ch02...1Ch02...1
Ch02...1nathanurag
Ā 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
Ā 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniquesShubham Jain
Ā 
Cryptography with caesar Cipher
Cryptography with caesar CipherCryptography with caesar Cipher
Cryptography with caesar CipherDushhyant Kumar
Ā 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques Dr. Kapil Gupta
Ā 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2AfiqEfendy Zaen
Ā 
Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Mohamed Loey
Ā 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniquesMohd Arif
Ā 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodelpriyapavi96
Ā 

What's hot (20)

Classical Encryption
Classical EncryptionClassical Encryption
Classical Encryption
Ā 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptography
Ā 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Ā 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
Ā 
Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1Computer Security Lecture 2: Classical Encryption Techniques 1
Computer Security Lecture 2: Classical Encryption Techniques 1
Ā 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
Ā 
Cryptography & network security
Cryptography & network securityCryptography & network security
Cryptography & network security
Ā 
Chapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutanChapter 8 cryptography lanjutan
Chapter 8 cryptography lanjutan
Ā 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher System
Ā 
Ch02...1
Ch02...1Ch02...1
Ch02...1
Ā 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
Ā 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
Ā 
Cryptography with caesar Cipher
Cryptography with caesar CipherCryptography with caesar Cipher
Cryptography with caesar Cipher
Ā 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques
Ā 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
Ā 
Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2Computer Security Lecture 3: Classical Encryption Techniques 2
Computer Security Lecture 3: Classical Encryption Techniques 2
Ā 
Cryptography
Cryptography Cryptography
Cryptography
Ā 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
Ā 
Product Cipher
Product CipherProduct Cipher
Product Cipher
Ā 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodel
Ā 

Similar to Cryptography and Network Security

Information and network security 12 classical substitution ciphers
Information and network security 12 classical substitution ciphersInformation and network security 12 classical substitution ciphers
Information and network security 12 classical substitution ciphersVaibhav Khanna
Ā 
unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.pptHetaDesai13
Ā 
Classical Encryption Techniques.pdf
Classical Encryption Techniques.pdfClassical Encryption Techniques.pdf
Classical Encryption Techniques.pdfDevangShukla10
Ā 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.pptutsavkakkad1
Ā 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryptionRashmi Burugupalli
Ā 
Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4Kabul Education University
Ā 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.pptGhamdan5
Ā 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.pptRaghavRathi40
Ā 
the art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptthe art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptjamkhan10
Ā 
This is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptThis is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptvimalguptaofficial
Ā 
Crytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptCrytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptMuhammadShajid1
Ā 
Best book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptBest book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptnicolausalex722
Ā 
detailed presentation on cryptography analysis
detailed presentation on cryptography analysisdetailed presentation on cryptography analysis
detailed presentation on cryptography analysisBARATH800940
Ā 
7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffffmaninthemirrorrror
Ā 

Similar to Cryptography and Network Security (20)

ch02.ppt
ch02.pptch02.ppt
ch02.ppt
Ā 
UNIT 2.ppt
UNIT 2.pptUNIT 2.ppt
UNIT 2.ppt
Ā 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
Ā 
Information and network security 12 classical substitution ciphers
Information and network security 12 classical substitution ciphersInformation and network security 12 classical substitution ciphers
Information and network security 12 classical substitution ciphers
Ā 
Ch02
Ch02Ch02
Ch02
Ā 
unit 2.ppt
unit 2.pptunit 2.ppt
unit 2.ppt
Ā 
cryptography.ppt
cryptography.pptcryptography.ppt
cryptography.ppt
Ā 
Classical Encryption Techniques.pdf
Classical Encryption Techniques.pdfClassical Encryption Techniques.pdf
Classical Encryption Techniques.pdf
Ā 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.ppt
Ā 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryption
Ā 
Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4
Ā 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
Ā 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
Ā 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
Ā 
the art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptthe art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.ppt
Ā 
This is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptThis is the presentation ofcryptography.ppt
This is the presentation ofcryptography.ppt
Ā 
Crytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptCrytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.ppt
Ā 
Best book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptBest book for the cryptography doctor.ppt
Best book for the cryptography doctor.ppt
Ā 
detailed presentation on cryptography analysis
detailed presentation on cryptography analysisdetailed presentation on cryptography analysis
detailed presentation on cryptography analysis
Ā 
7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff
Ā 

More from Smt. Indira Gandhi College of Engineering, Navi Mumbai, Mumbai

More from Smt. Indira Gandhi College of Engineering, Navi Mumbai, Mumbai (20)

Artificial Intelligence (AI) application in Agriculture Area
Artificial Intelligence (AI) application in Agriculture Area Artificial Intelligence (AI) application in Agriculture Area
Artificial Intelligence (AI) application in Agriculture Area
Ā 
VLSI Design Book CMOS_Circuit_Design__Layout__and_Simulation
VLSI Design Book CMOS_Circuit_Design__Layout__and_SimulationVLSI Design Book CMOS_Circuit_Design__Layout__and_Simulation
VLSI Design Book CMOS_Circuit_Design__Layout__and_Simulation
Ā 
Question Bank: Network Management in Telecommunication
Question Bank: Network Management in TelecommunicationQuestion Bank: Network Management in Telecommunication
Question Bank: Network Management in Telecommunication
Ā 
INTRODUCTION TO CYBER LAW The Concept of Cyberspace Cyber law Cyber crime.pdf
INTRODUCTION TO CYBER LAW The Concept of Cyberspace Cyber law Cyber crime.pdfINTRODUCTION TO CYBER LAW The Concept of Cyberspace Cyber law Cyber crime.pdf
INTRODUCTION TO CYBER LAW The Concept of Cyberspace Cyber law Cyber crime.pdf
Ā 
LRU_Replacement-Policy.pdf
LRU_Replacement-Policy.pdfLRU_Replacement-Policy.pdf
LRU_Replacement-Policy.pdf
Ā 
Network Management Principles and Practice - 2nd Edition (2010)_2.pdf
Network Management Principles and Practice - 2nd Edition (2010)_2.pdfNetwork Management Principles and Practice - 2nd Edition (2010)_2.pdf
Network Management Principles and Practice - 2nd Edition (2010)_2.pdf
Ā 
Euler Method Details
Euler Method Details Euler Method Details
Euler Method Details
Ā 
Mini Project fo BE Engineering students
Mini Project fo BE Engineering  students  Mini Project fo BE Engineering  students
Mini Project fo BE Engineering students
Ā 
Mini Project for Engineering Students BE or Btech Engineering students
Mini Project for Engineering Students BE or Btech Engineering students Mini Project for Engineering Students BE or Btech Engineering students
Mini Project for Engineering Students BE or Btech Engineering students
Ā 
Ballistics Detsils
Ballistics Detsils Ballistics Detsils
Ballistics Detsils
Ā 
VLSI Design_LAB MANUAL By Umakant Gohatre
VLSI Design_LAB MANUAL By Umakant GohatreVLSI Design_LAB MANUAL By Umakant Gohatre
VLSI Design_LAB MANUAL By Umakant Gohatre
Ā 
cyber crime, Cyber Security, Introduction, Umakant Bhaskar Gohatre
cyber crime, Cyber Security, Introduction, Umakant Bhaskar Gohatre cyber crime, Cyber Security, Introduction, Umakant Bhaskar Gohatre
cyber crime, Cyber Security, Introduction, Umakant Bhaskar Gohatre
Ā 
Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...Image Compression, Introduction Data Compression/ Data compression, modelling...
Image Compression, Introduction Data Compression/ Data compression, modelling...
Ā 
Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...Introduction Data Compression/ Data compression, modelling and coding,Image C...
Introduction Data Compression/ Data compression, modelling and coding,Image C...
Ā 
Python overview
Python overviewPython overview
Python overview
Ā 
Python numbers
Python numbersPython numbers
Python numbers
Ā 
Python networking
Python networkingPython networking
Python networking
Ā 
Python multithreading
Python multithreadingPython multithreading
Python multithreading
Ā 
Python modules
Python modulesPython modules
Python modules
Ā 
Python loops
Python loopsPython loops
Python loops
Ā 

Recently uploaded

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
Ā 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
Ā 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
Ā 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
Ā 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
Ā 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
Ā 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
Ā 
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
Ā 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
Ā 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
Ā 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
Ā 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĆ£o Esperancinha
Ā 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
Ā 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
Ā 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
Ā 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
Ā 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
Ā 
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort serviceGurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort servicejennyeacort
Ā 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
Ā 

Recently uploaded (20)

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
Ā 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
Ā 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
Ā 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Ā 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
Ā 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
Ā 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
Ā 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
Ā 
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
Ā 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
Ā 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
Ā 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
Ā 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Ā 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
Ā 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
Ā 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
Ā 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Ā 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Ā 
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort serviceGurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Ā 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
Ā 

Cryptography and Network Security

  • 1. CRYPTOGRAPHY AND NETWORK SECURITY FOURTH EDITION, BY WILLIAM STALLINGS, LECTURE SLIDES BY LAWRIE BROWN PRESENTED BY UMAKANT BHASKAR GOHATRE ASSISTANT PROFESSOR, SMT. INDIRA GANDHI COLLEGE OF ENGINEERING, NAVI MUMBAI
  • 2. CLASSICAL ENCRYPTION TECHNIQUES Many savages at the present day regard their names as vital parts of themselves, and therefore take great pains to conceal their real names, lest these should give to evil-disposed persons a handle by which to injure their owners. ā€”The Golden Bough, Sir James George Frazer
  • 3. SYMMETRIC ENCRYPTION ā€¢ or conventional / private-key / single-key ā€¢ sender and recipient share a common key ā€¢ all classical encryption algorithms are private-key ā€¢ was only type prior to invention of public-key in 1970ā€™s ā€¢ and by far most widely used
  • 4. SOME BASIC TERMINOLOGY ā€¢ plaintext - original message ā€¢ ciphertext - coded message ā€¢ cipher - algorithm for transforming plaintext to ciphertext ā€¢ key - info used in cipher known only to sender/receiver ā€¢ encipher (encrypt) - converting plaintext to ciphertext ā€¢ decipher (decrypt) - recovering ciphertext from plaintext ā€¢ cryptography - study of encryption principles/methods ā€¢ cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertext without knowing key ā€¢ cryptology - field of both cryptography and cryptanalysis
  • 6. REQUIREMENTS ā€¢ two requirements for secure use of symmetric encryption: ā€¢ a strong encryption algorithm ā€¢ a secret key known only to sender / receiver ā€¢ mathematically have: Y = EK(X) X = DK(Y) ā€¢ assume encryption algorithm is known ā€¢ implies a secure channel to distribute key
  • 7. CRYPTOGRAPHY ā€¢ characterize cryptographic system by: ā€¢ type of encryption operations used ā€¢ substitution / transposition / product ā€¢ number of keys used ā€¢ single-key or private / two-key or public ā€¢ way in which plaintext is processed ā€¢ block / stream
  • 8. CRYPTANALYSIS ā€¢ objective to recover key not just message ā€¢ general approaches: ā€¢ cryptanalytic attack ā€¢ brute-force attack
  • 9. CRYPTANALYTIC ATTACKS ā€¢ ciphertext only ā€¢ only know algorithm & ciphertext, is statistical, know or can identify plaintext ā€¢ known plaintext ā€¢ know/suspect plaintext & ciphertext ā€¢ chosen plaintext ā€¢ select plaintext and obtain ciphertext ā€¢ chosen ciphertext ā€¢ select ciphertext and obtain plaintext ā€¢ chosen text ā€¢ select plaintext or ciphertext to en/decrypt
  • 10. MORE DEFINITIONS ā€¢ unconditional security ā€¢ no matter how much computer power or time is available, the cipher cannot be broken since the ciphertext provides insufficient information to uniquely determine the corresponding plaintext ā€¢ computational security ā€¢ given limited computing resources (eg time needed for calculations is greater than age of universe), the cipher cannot be broken
  • 11. BRUTE FORCE SEARCH ā€¢ always possible to simply try every key ā€¢ most basic attack, proportional to key size ā€¢ assume either know / recognise plaintext Key Size (bits) Number of Alternative Keys Time required at 1 decryption/Āµs Time required at 106 decryptions/Āµs 32 232 = 4.3 ļ‚“ 109 231 Āµs = 35.8 minutes 2.15 milliseconds 56 256 = 7.2 ļ‚“ 1016 255 Āµs = 1142 years 10.01 hours 128 2128 = 3.4 ļ‚“ 1038 2127 Āµs = 5.4 ļ‚“ 1024 years 5.4 ļ‚“ 1018 years 168 2168 = 3.7 ļ‚“ 1050 2167 Āµs = 5.9 ļ‚“ 1036 years 5.9 ļ‚“ 1030 years 26 characters (permutation) 26! = 4 ļ‚“ 1026 2 ļ‚“ 1026 Āµs = 6.4 ļ‚“ 1012 years 6.4 ļ‚“ 106 years
  • 12. CLASSICAL SUBSTITUTION CIPHERS ā€¢ where letters of plaintext are replaced by other letters or by numbers or symbols ā€¢ or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns
  • 13. CAESAR CIPHER ā€¢ earliest known substitution cipher ā€¢ by Julius Caesar ā€¢ first attested use in military affairs ā€¢ replaces each letter by 3rd letter on ā€¢ example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB
  • 14. CAESAR CIPHER ā€¢ can define transformation as: a b c d e f g h i j k l m n o p q r s t u v w x y z D E F G H I J K L M N O P Q R S T U V W X Y Z A B C ā€¢ mathematically give each letter a number a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ā€¢ then have Caesar cipher as: c = E(p) = (p + k) mod (26) p = D(c) = (c ā€“ k) mod (26)
  • 15. CRYPTANALYSIS OF CAESAR CIPHER ā€¢ only have 26 possible ciphers ā€¢ A maps to A,B,..Z ā€¢ could simply try each in turn ā€¢ a brute force search ā€¢ given ciphertext, just try all shifts of letters ā€¢ do need to recognize when have plaintext ā€¢ eg. break ciphertext "GCUA VQ DTGCM"
  • 16. MONOALPHABETIC CIPHER ā€¢ rather than just shifting the alphabet ā€¢ could shuffle (jumble) the letters arbitrarily ā€¢ each plaintext letter maps to a different random ciphertext letter ā€¢ hence key is 26 letters long Plain: abcdefghijklmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext: ifwewishtoreplaceletters Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
  • 17. MONOALPHABETIC CIPHER SECURITY ā€¢ now have a total of 26! = 4 x 1026 keys ā€¢ with so many keys, might think is secure ā€¢ but would be !!!WRONG!!! ā€¢ problem is language characteristics
  • 18. LANGUAGE REDUNDANCY AND CRYPTANALYSIS ā€¢ human languages are redundant ā€¢ eg "th lrd s m shphrd shll nt wnt" ā€¢ letters are not equally commonly used ā€¢ in English E is by far the most common letter ā€¢ followed by T,R,N,I,O,A,S ā€¢ other letters like Z,J,K,Q,X are fairly rare ā€¢ have tables of single, double & triple letter frequencies for various languages
  • 20. USE IN CRYPTANALYSIS ā€¢ key concept - monoalphabetic substitution ciphers do not change relative letter frequencies ā€¢ discovered by Arabian scientists in 9th century ā€¢ calculate letter frequencies for ciphertext ā€¢ compare counts/plots against known values ā€¢ if caesar cipher look for common peaks/troughs ā€¢ peaks at: A-E-I triple, NO pair, RST triple ā€¢ troughs at: JK, X-Z ā€¢ for monoalphabetic must identify each letter ā€¢ tables of common double/triple letters help
  • 21. EXAMPLE CRYPTANALYSIS ā€¢ given ciphertext: UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ ā€¢ count relative letter frequencies (see text) ā€¢ guess P & Z are e and t ā€¢ guess ZW is th and hence ZWP is the ā€¢ proceeding with trial and error finally get: it was disclosed yesterday that several informal but direct contacts have been made with political representatives of the viet cong in moscow
  • 22. PLAYFAIR CIPHER ā€¢ not even the large number of keys in a monoalphabetic cipher provides security ā€¢ one approach to improving security was to encrypt multiple letters ā€¢ the Playfair Cipher is an example ā€¢ invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair
  • 23. PLAYFAIR KEY MATRIX ā€¢ a 5X5 matrix of letters based on a keyword ā€¢ fill in letters of keyword (sans duplicates) ā€¢ fill rest of matrix with other letters ā€¢ eg. using the keyword 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
  • 24. ENCRYPTING AND DECRYPTING ā€¢ plaintext is encrypted two letters at a time 1. if a pair is a repeated letter, insert filler like 'Xā€™ 2. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end) 3. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom) 4. otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the pair
  • 25. SECURITY OF PLAYFAIR CIPHER ā€¢ security much improved over monoalphabetic ā€¢ since have 26 x 26 = 676 digrams ā€¢ would need a 676 entry frequency table to analyse (verses 26 for a monoalphabetic) ā€¢ and correspondingly more ciphertext ā€¢ was widely used for many years ā€¢ eg. by US & British military in WW1 ā€¢ it can be broken, given a few hundred letters ā€¢ since still has much of plaintext structure
  • 26. POLYALPHABETIC CIPHERS ā€¢ polyalphabetic substitution ciphers ā€¢ improve security using multiple cipher alphabets ā€¢ make cryptanalysis harder with more alphabets to guess and flatter frequency distribution ā€¢ use a key to select which alphabet is used for each letter of the message ā€¢ use each alphabet in turn ā€¢ repeat from start after end of key is reached
  • 27. VIGENƈRE CIPHER ā€¢ simplest polyalphabetic substitution cipher ā€¢ effectively multiple caesar ciphers ā€¢ key is multiple letters long K = k1 k2 ... kd ā€¢ ith letter specifies ith alphabet to use ā€¢ use each alphabet in turn ā€¢ repeat from start after d letters in message ā€¢ decryption simply works in reverse
  • 28. EXAMPLE OF VIGENƈRE CIPHER ā€¢ write the plaintext out ā€¢ write the keyword repeated above it ā€¢ use each key letter as a caesar cipher key ā€¢ encrypt the corresponding plaintext letter ā€¢ eg using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ
  • 29. AIDS ā€¢ simple aids can assist with en/decryption ā€¢ a Saint-Cyr Slide is a simple manual aid ā€¢ a slide with repeated alphabet ā€¢ line up plaintext 'A' with key letter, eg 'C' ā€¢ then read off any mapping for key letter ā€¢ can bend round into a cipher disk ā€¢ or expand into a VigenĆØre Tableau
  • 30. SECURITY OF VIGENƈRE CIPHERS ā€¢ have multiple ciphertext letters for each plaintext letter ā€¢ hence letter frequencies are obscured ā€¢ but not totally lost ā€¢ start with letter frequencies ā€¢ see if look monoalphabetic or not ā€¢ if not, then need to determine number of alphabets, since then can attach each
  • 31. KASISKI METHOD ā€¢ method developed by Babbage / Kasiski ā€¢ repetitions in ciphertext give clues to period ā€¢ so find same plaintext an exact period apart ā€¢ which results in the same ciphertext ā€¢ of course, could also be random fluke ā€¢ eg repeated ā€œVTWā€ in previous example ā€¢ suggests size of 3 or 9 ā€¢ then attack each monoalphabetic cipher individually using same techniques as before
  • 32. AUTOKEY CIPHER ā€¢ ideally want a key as long as the message ā€¢ VigenĆØre proposed the autokey cipher ā€¢ with keyword is prefixed to message as key ā€¢ knowing keyword can recover the first few letters ā€¢ use these in turn on the rest of the message ā€¢ but still have frequency characteristics to attack ā€¢ eg. given key deceptive key: deceptivewearediscoveredsav plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA
  • 33. ONE-TIME PAD ā€¢ if a truly random key as long as the message is used, the cipher will be secure ā€¢ called a One-Time pad ā€¢ is unbreakable since ciphertext bears no statistical relationship to the plaintext ā€¢ since for any plaintext & any ciphertext there exists a key mapping one to other ā€¢ can only use the key once though ā€¢ problems in generation & safe distribution of key
  • 34. TRANSPOSITION CIPHERS ā€¢ now consider classical transposition or permutation ciphers ā€¢ these hide the message by rearranging the letter order ā€¢ without altering the actual letters used ā€¢ can recognise these since have the same frequency distribution as the original text
  • 35. RAIL FENCE CIPHER ā€¢ 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 MEMATRHTGPRYETEFETEOAAT
  • 36. 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 Key: 3 4 2 1 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
  • 37. PRODUCT CIPHERS ā€¢ ciphers using substitutions or transpositions are not secure because of language characteristics ā€¢ hence consider using several ciphers in succession to make harder, but: ā€¢ two substitutions make a more complex substitution ā€¢ two transpositions make more complex transposition ā€¢ but a substitution followed by a transposition makes a new much harder cipher ā€¢ this is bridge from classical to modern ciphers
  • 38. ROTOR MACHINES ā€¢ before modern ciphers, rotor machines were most common complex ciphers in use ā€¢ widely used in WW2 ā€¢ German Enigma, Allied Hagelin, Japanese Purple ā€¢ implemented a very complex, varying substitution cipher ā€¢ used a series of cylinders, each giving one substitution, which rotated and changed after each letter was encrypted ā€¢ with 3 cylinders have 263=17576 alphabets
  • 40. STEGANOGRAPHY ā€¢ an alternative to encryption ā€¢ hides existence of message ā€¢ using only a subset of letters/words in a longer message marked in some way ā€¢ using invisible ink ā€¢ hiding in LSB in graphic image or sound file ā€¢ has drawbacks ā€¢ high overhead to hide relatively few info bits
  • 41. SUMMARY ā€¢ have considered: ā€¢ classical cipher techniques and terminology ā€¢ monoalphabetic substitution ciphers ā€¢ cryptanalysis using letter frequencies ā€¢ Playfair cipher ā€¢ polyalphabetic ciphers ā€¢ transposition ciphers ā€¢ product ciphers and rotor machines ā€¢ stenography