SlideShare uma empresa Scribd logo
1 de 59
Baixar para ler offline
Chapter 1:Chapter 1:Chapter 1:Chapter 1:----
Conventional Encryption:
Classical Encryption Techniques
By:- Sarthak Patel (www.sarthakpatel.in)
Outline
Conventional Encryption Model
Steganography
Classical EncryptionTechniques
Sarthak Patel (www.sarthakpatel.in)2
Classical encryption techniques
As opposed to modern cryptography
Goals:
to introduce basic concepts & terminology of encryption
to prepare you for studying modern cryptography
Sarthak Patel (www.sarthakpatel.in)3
Principles of Security
Security Goals:
Confidentiality
Integrity
Authentication
Non-repudiation
Sarthak Patel (www.sarthakpatel.in)4
Non-repudiation
Access Control
Availability
Loss of Confidentiality
• SecretA B
Sarthak Patel (www.sarthakpatel.in)5
C
Attack:-Interception
Absence of Authentication
BA I am User A
Sarthak Patel (www.sarthakpatel.in)6
C
Attack:-Fabrication
Loss of Integrity
• Ideal RouteA B
Sarthak Patel (www.sarthakpatel.in)7
C
Attack:-Modification
Non-repudiation
A B
I never sent that message,
which you claim to have
received
Sarthak Patel (www.sarthakpatel.in)8
A B
Access Control
The principles of access control determines who should be able
to access what.
Access control is broadly related to two areas: role
management and rule management.
Sarthak Patel (www.sarthakpatel.in)9
Loss of Availability
A B
Sarthak Patel (www.sarthakpatel.in)10
A B
Attack:-Interruption
C
Basic terminology
Plaintext: original message to be encrypted
Ciphertext: the encrypted message
Enciphering or encryption: the process of converting
plaintext into ciphertext
Sarthak Patel (www.sarthakpatel.in)11
plaintext into ciphertext
Encryption algorithm: performs encryption
Two inputs: a plaintext and a secret key
Symmetric Cipher Model
Sarthak Patel (www.sarthakpatel.in)12
Contd…
Deciphering or decryption: recovering plaintext from ciphertext
Decryption algorithm: performs decryption
Two inputs: ciphertext and secret key
Sarthak Patel (www.sarthakpatel.in)13
Secret key: same key used for encryption and decryption
Also referred to as a symmetric key
Contd…
Cipher or cryptographic system : a scheme for encryption and
decryption
Cryptography: science of studying ciphers
Sarthak Patel (www.sarthakpatel.in)14
Cryptanalysis: science of studying attacks against cryptographic
systems
Cryptology: cryptography + cryptanalysis
Ciphers
Symmetric cipher: same key used for encryption and
decryption
Block cipher: encrypts a block of plaintext at a time (typically 64 or
128 bits)
Sarthak Patel (www.sarthakpatel.in)15
128 bits)
Stream cipher: encrypts data one bit or one byte at a time
Asymmetric cipher: different keys used for encryption
and decryption
Symmetric Encryption
or conventional / secret-key / single-key
sender and recipient share a common key
all classical encryption algorithms are symmetric
The only type of ciphers prior to the invention of
asymmetric-key ciphers in 1970’s
Sarthak Patel (www.sarthakpatel.in)16
asymmetric-key ciphers in 1970’s
by far most widely used
Symmetric Encryption
Mathematically:
Y = EK(X) or Y = E(K, X)
X = DK(Y) or X = D(K, Y)
X = plaintext
Y = ciphertext
K = secret key
Sarthak Patel (www.sarthakpatel.in)17
K = secret key
E = encryption algorithm
D = decryption algorithm
Both E and D are known to public
Cryptanalysis
Objective: to recover the plaintext of a
ciphertext or, more typically, to recover the secret
key.
Kerkhoff’s principle: the adversary knows all details
about a cryptosystem except the secret key.
Sarthak Patel (www.sarthakpatel.in)18
about a cryptosystem except the secret key.
Two general approaches:
brute-force attack
non-brute-force attack (cryptanalytic attack)
Brute-Force Attack
Try every key to decipher the ciphertext.
On average, need to try half of all possible keys
Time needed proportional to size of key space
Key Size (bits) Number of Alternative
Keys
Time required at 1
decryption/µs
Time required at 106
decryptions/µs
Sarthak Patel (www.sarthakpatel.in)19
Keys decryption/µs 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
Cryptanalytic Attacks
May be classified by how much information needed by the
attacker:
Ciphertext-only attack
Known-plaintext attack
Sarthak Patel (www.sarthakpatel.in)20
Known-plaintext attack
Chosen-plaintext attack
Chosen-ciphertext attack
Ciphertext-only attack
Given: a ciphertext c
Q: what is the plaintext m?
An encryption scheme is completely insecure if it cannot
resist ciphertext-only attacks.
Sarthak Patel (www.sarthakpatel.in)21
Known-plaintext attack
Given: (m1,c1), (m2,c2), …, (mk,ck) and a new ciphertext c.
Q: what is the plaintext of c?
Q: what is the secret key in use?
Sarthak Patel (www.sarthakpatel.in)22
Chosen-plaintext attack
Given: (m1,c1), (m2,c2), …, (mk,ck), where m1,m2, …, mk are
chosen by the adversary; and a new ciphertext c.
Q: what is the plaintext of c, or what is the secret key?
Sarthak Patel (www.sarthakpatel.in)23
Q: what is the plaintext of c, or what is the secret key?
Example: chosen-plaintext attack
In 1942, US Navy cryptanalysts discovered that Japan was planning
an attack on “AF”.
They believed that “AF” means Midway island.
Pentagon didn’t think so.
Sarthak Patel (www.sarthakpatel.in)24
Pentagon didn’t think so.
US forces in Midway sent a plain message that their freshwater
supplies were low.
Shortly, US intercepted a Japanese ciphertext saying that “AF” was
low on water.
This proved that “AF” is Midway.
Chosen-ciphertext attack
Given: (m1,c1), (m2,c2), …, (mk,ck), where c1,c2, …, ck are
chosen by the adversary; and a new ciphertext c.
Q: what is the plaintext of c, or what is the secret key?
Sarthak Patel (www.sarthakpatel.in)25
Classical Ciphers
Plaintext is viewed as a sequence of elements (e.g.,
bits or characters)
Substitution cipher: replacing each element of the
plaintext with another element.
Sarthak Patel (www.sarthakpatel.in)26
Transposition (or permutation) cipher: rearranging
the order of the elements of the plaintext.
Product cipher: using multiple stages of substitutions
and transpositions
Caesar Cipher
Earliest known substitution cipher
Invented by Julius Caesar
Each letter is replaced by the letter three positions further down the
alphabet.
• Plain: 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
Sarthak Patel (www.sarthakpatel.in)27
• Plain: 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
Cipher: D E F G H I J K L M N O P Q R ST UVW XY ZA B C
Example: ohio state RKLRVWDWH
Caesar Cipher
Mathematically, map letters to numbers:
a, b, c, ..., x, y, z
0, 1, 2, ..., 23, 24, 25
Then the general Caesar cipher is:
c = E (p) = (p + k) mod 26
Sarthak Patel (www.sarthakpatel.in)28
c = EK(p) = (p + k) mod 26
p = DK(c) = (c – k) mod 26
Can be generalized with any alphabet.
Cryptanalysis of Caesar Cipher
Key space: {0, 1, ..., 25}
Vulnerable to brute-force attacks.
E.g., break ciphertext “KHOOR“
Answer is:“HELLO”
Sarthak Patel (www.sarthakpatel.in)29
Answer is:“HELLO”
Monoalphabetic Substitution Cipher
Shuffle the letters and map each plaintext letter to a different
random ciphertext letter:
Plain letters: abcdefghijklmnopqrstuvwxyz
Cipher letters: DKVQFIBJWPESCXHTMYAUOLRGZN
Sarthak Patel (www.sarthakpatel.in)30
Cipher letters: DKVQFIBJWPESCXHTMYAUOLRGZN
Plaintext: ifwewishtoreplaceletters
Ciphertext:WIRFRWAJUHYFTSDVFSFUUFYA
What does a key look like?
Monoalphabetic Cipher Security
Now we have a total of 26! = 4 x 1026 keys.
With so many keys, it is secure against brute-force attacks.
But not secure against some cryptanalytic attacks.
Problem is language characteristics.
Sarthak Patel (www.sarthakpatel.in)31
Problem is language characteristics.
Language Statistics and
Cryptanalysis
Human languages are not random.
Letters are not equally frequently used.
In English, E is by far the most common letter, followed
byT,A, R, N, I, O, S.
Sarthak Patel (www.sarthakpatel.in)32
byT,A, R, N, I, O, S.
Other letters like Z, J, K, Q, X are fairly rare.
There are tables of single, double & triple letter
frequencies for various languages
English Letter Frequencies
Sarthak Patel (www.sarthakpatel.in)33
Statistics for double & triple letters
In decreasing order of frequency
Double letters:
to he an in re on, …
Sarthak Patel (www.sarthakpatel.in)34
Triple letters:
the and for nab, …
Use in Cryptanalysis
Key concept: monoalphabetic substitution does not change
relative letter frequencies
To attack, we
Sarthak Patel (www.sarthakpatel.in)35
To attack, we
calculate letter frequencies for ciphertext
compare this distribution against the known one
Example Cryptanalysis
Given ciphertext:
UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ
VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX
EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ
Count relative letter frequencies (see next page)
Guess {P, Z} = {e, t}
Sarthak Patel (www.sarthakpatel.in)36
Guess {P, Z} = {e, t}
Of double letters, ZW has highest frequency, so guess
ZW = th and hence ZWP = 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
Letter frequencies in ciphertext
P 13.33 H 5.83 F 3.33 B 1.67 C 0.00
Z 11.67 D 5.00 W 3.33 G 1.67 K 0.00
S 8.33 E 5.00 Q 2.50 Y 1.67 L 0.00
U 8.33 V 4.17 T 2.50 I 0.83 N 0.00
Sarthak Patel (www.sarthakpatel.in)37
U 8.33 V 4.17 T 2.50 I 0.83 N 0.00
O 7.50 X 4.17 A 1.67 J 0.83 R 0.00
M
6.67
Polyalphabetic Substitution Ciphers
A sequence of monoalphabetic ciphers (M1, M2, M3, ...,
Mk) is used in turn to encrypt letters.
A key determines which sequence of ciphers to use.
Each plaintext letter has multiple corresponding
ciphertext letters.
Sarthak Patel (www.sarthakpatel.in)38
ciphertext letters.
This makes cryptanalysis harder since the letter
frequency distribution will be flatter.
Example(Poly): Vigenère Cipher
Simplest polyalphabetic substitution cipher
Consider the set of all Caesar ciphers:
{ Ca, Cb, Cc, ..., Cz }
Key: e.g. security
Encrypt each letter using C , C , C , C ,C , C , C , C in
Sarthak Patel (www.sarthakpatel.in)39
Encrypt each letter using Cs, Ce, Cc, Cu,Cr, Ci, Ct, Cy in
turn.
Repeat from start after Cy.
Decryption simply works in reverse.
Example of Vigenère Cipher
Keyword: deceptive
key:
deceptivedeceptivedeceptive
plaintext: wearediscoveredsaveyourself
Sarthak Patel (www.sarthakpatel.in)40
plaintext: wearediscoveredsaveyourself
ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
Key Plain Text
Sarthak Patel (www.sarthakpatel.in)41
Playfair Cipher
Not even the large number of keys in a monoalphabetic
cipher provides security.
One approach to improving security is to encrypt multiple
letters at a time.
The Playfair Cipher is the best known such cipher.
Sarthak Patel (www.sarthakpatel.in)42
The Playfair Cipher is the best known such cipher.
Invented by CharlesWheatstone in 1854, but named after his
friend Baron Playfair.
Playfair Key Matrix
Use a 5 x 5 matrix.
Fill in letters of the key (w/o duplicates).
Fill the rest of matrix with other letters.
E.g., key = MONARCHY.
Sarthak Patel (www.sarthakpatel.in)43
E.g., key = MONARCHY.
MM OO NN AA RR
CC HH YY BB DD
EE FF GG I/JI/J KK
LL PP QQ SS TT
UU VV WW XX ZZ
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 the letter to
its right (circularly).
3. If both letters fall in the same column, replace each with the the
Sarthak Patel (www.sarthakpatel.in)44
3. If both letters fall in the same column, replace each with the the
letter below it (circularly).
4. Otherwise, each letter is replaced by the letter in the same row but
in the column of the other letter of the pair.
Example of Playfair Cipher
Key: MONARCHY
Plaintext: BALLOON
MM OO NN AA RR
CC HH YY BB DD
EE FF GG I/JI/J KK
LL PP QQ SS TT
UU VV WW XX ZZ
Sarthak Patel (www.sarthakpatel.in)45
oBA LX LO ON
Ciphertext: IB SU PM NA
UU VV WW XX ZZ
Security of Playfair Cipher
Security is much improved over the simple
monoalphabetic cipher.
Was widely used for many decades
eg. by US & British military inWW1 and earlyWW2
Sarthak Patel (www.sarthakpatel.in)46
Once thought to be unbreakable.
Actually, it can be broken, because it still leaves some
structure of plaintext intact.
Rotor Cipher Machines
Before modern ciphers, rotor machines were most common complex
ciphers in use.
Widely used inWW2.
Used a series of rotating cylinders.
Sarthak Patel (www.sarthakpatel.in)47
Implemented a polyalphabetic substitution cipher of period K.
With 3 cylinders, K = 263 =17,576.
With 5 cylinders, K = 265 =12 x 106.
What is a key?
If the adversary has a machine
If the adversary doesn’t have a machine
Sarthak Patel (www.sarthakpatel.in)4
8
German secret setting sheets
Sarthak Patel (www.sarthakpatel.in)49
Date
Which rotors to use (there were 10 rotors)
Ring setting
Plugboard setting
The Rotors
Sarthak Patel (www.sarthakpatel.in)50
Enigma Rotor Machine
Sarthak Patel (www.sarthakpatel.in)51
Enigma Rotor Machine
Sarthak Patel (www.sarthakpatel.in)52
Transposition Ciphers
Also called permutation ciphers.
Shuffle the plaintext, without altering the actual letters used.
Example: i) ColumnarTransposition Ciphers
ii) Rail FenceTechnique
Sarthak Patel (www.sarthakpatel.in)53
ii) Rail FenceTechnique
Columnar Transposition Ciphers
Plaintext is written row by row in a rectangle.
Ciphertext: write out the columns in an order
specified by a key.
C O M E H O
Sarthak Patel (www.sarthakpatel.in)54
Key: 3 4 2 1 5 6
Plaintext:
Ciphertext: MTOR EOWN OERE CMRT HMAO
OOFA
C O M E H O
M E T O M O
R R O W A F
T E R N O O
Rail Fence Technique
Rail fence technique involves writing plain text as sequence
of diagonals and then reading it row-by-row to produce
cipher text.
PlainText: COME HOMETOMORROW
C M H M T M R O
Sarthak Patel (www.sarthakpatel.in)55
C M H M T M R O
O E O E O O R W
CipherText: CMHMTMRO OEOEOORW
Product Ciphers
Uses a sequence of substitutions and transpositions
Harder to break than just substitutions or transpositions
This is a bridge from classical to modern ciphers.
Sarthak Patel (www.sarthakpatel.in)56
Steganography
Hide a message in another message.
Invisible ink,Tiny pin punctures or minute variations between
handwritten characters, pencil marks etc.
E.g., hide your plaintext in a graphic image
Sarthak Patel (www.sarthakpatel.in)57
Each pixel has 3 bytes specifying the RGB color
The least significant bits of pixels can be changed w/o greatly affecting
the image quality
So can hide messages in these LSBs
Summary
Have considered:
classical cipher techniques and terminology
monoalphabetic substitution ciphers
cryptanalysis using letter frequencies
Sarthak Patel (www.sarthakpatel.in)58
cryptanalysis using letter frequencies
Playfair cipher
polyalphabetic ciphers
transposition ciphers
product ciphers and rotor machines
Steganography
Symmetric Asymmetric
Symmetric cryptography uses the same secret
(private) key to encrypt and decrypt its data
Asymmetric uses both a public and private key
Symmetric requires that the secret key be known
by the party encrypting the data and the party
Asymmetric allows for distribution of your public
key to anyone with which they can encrypt the
Sarthak Patel (www.sarthakpatel.in)59
by the party encrypting the data and the party
decrypting the data
key to anyone with which they can encrypt the
data they want to send securely and then it can
only be decoded by the person having the private
key
Faster than Asymmetric The issue with asymmetric is that it is about 1000
times slower than symmetric encryption which
makes it impractical when trying to encrypt large
amounts of data
Less Security compare to Asymmetric Stronger Security compare to Symmetric

Mais conteúdo relacionado

Mais procurados

Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
Mohd Arif
 

Mais procurados (20)

Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Classical Encryption Techniques
Classical Encryption TechniquesClassical Encryption Techniques
Classical Encryption Techniques
 
Symmetric ciphermodel
Symmetric ciphermodelSymmetric ciphermodel
Symmetric ciphermodel
 
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
 
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
 
Network security Encryption
Network security EncryptionNetwork security Encryption
Network security Encryption
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
 
Substitution techniques
Substitution techniquesSubstitution techniques
Substitution techniques
 
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
 
Cryptography
CryptographyCryptography
Cryptography
 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryption
 
Cryptography and Information Security
Cryptography and Information SecurityCryptography and Information Security
Cryptography and Information Security
 
overview of cryptographic techniques
overview of cryptographic techniquesoverview of cryptographic techniques
overview of cryptographic techniques
 
Caesar cipher
Caesar cipherCaesar cipher
Caesar cipher
 
Overview on Cryptography and Network Security
Overview on Cryptography and Network SecurityOverview on Cryptography and Network Security
Overview on Cryptography and Network Security
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Ch02
Ch02Ch02
Ch02
 
Cipher techniques
Cipher techniquesCipher techniques
Cipher techniques
 
One time pad Encryption:
One time pad Encryption:One time pad Encryption:
One time pad Encryption:
 
Cryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie BrownCryptography and Network Security William Stallings Lawrie Brown
Cryptography and Network Security William Stallings Lawrie Brown
 

Destaque

Anninhmang K13 Mtt
Anninhmang K13 MttAnninhmang K13 Mtt
Anninhmang K13 Mtt
Quynh Khuong
 
December report small
December report smallDecember report small
December report small
Lisa Testart
 
Creating rhythms
Creating rhythmsCreating rhythms
Creating rhythms
mb2music
 
452. invernadero a base de hidroponia
452. invernadero a base de hidroponia452. invernadero a base de hidroponia
452. invernadero a base de hidroponia
dec-admin
 
248. contra la basura
248. contra la basura248. contra la basura
248. contra la basura
dec-admin
 
351.creando el área de juego
351.creando el área de juego351.creando el área de juego
351.creando el área de juego
dec-admin
 
Fomentemos los valores civicos de amistad y convivencia social
Fomentemos los valores civicos de amistad y convivencia socialFomentemos los valores civicos de amistad y convivencia social
Fomentemos los valores civicos de amistad y convivencia social
dec-admin
 
Northware - AX Services and Support - LITE
Northware - AX Services and Support - LITENorthware - AX Services and Support - LITE
Northware - AX Services and Support - LITE
Imre Szenttornyay, MSc.
 
213.jardin botanico
213.jardin botanico213.jardin botanico
213.jardin botanico
dec-admin
 
152. juntos cambiemos la cara de mi escuela
152. juntos cambiemos la cara de mi escuela152. juntos cambiemos la cara de mi escuela
152. juntos cambiemos la cara de mi escuela
dec-admin
 

Destaque (20)

Navigating Electronic Signature Law In Florida
Navigating Electronic Signature Law In FloridaNavigating Electronic Signature Law In Florida
Navigating Electronic Signature Law In Florida
 
Cryptography
CryptographyCryptography
Cryptography
 
Classical cipher
Classical cipherClassical cipher
Classical cipher
 
Cryptography
Cryptography Cryptography
Cryptography
 
Anninhmang K13 Mtt
Anninhmang K13 MttAnninhmang K13 Mtt
Anninhmang K13 Mtt
 
Cryptography
CryptographyCryptography
Cryptography
 
December report small
December report smallDecember report small
December report small
 
Data Protection Techniques and Cryptography
Data Protection Techniques and CryptographyData Protection Techniques and Cryptography
Data Protection Techniques and Cryptography
 
cryptography
cryptographycryptography
cryptography
 
CI_CONF 2012: Scaling - Chris Miller
CI_CONF 2012: Scaling - Chris MillerCI_CONF 2012: Scaling - Chris Miller
CI_CONF 2012: Scaling - Chris Miller
 
Creating rhythms
Creating rhythmsCreating rhythms
Creating rhythms
 
452. invernadero a base de hidroponia
452. invernadero a base de hidroponia452. invernadero a base de hidroponia
452. invernadero a base de hidroponia
 
248. contra la basura
248. contra la basura248. contra la basura
248. contra la basura
 
351.creando el área de juego
351.creando el área de juego351.creando el área de juego
351.creando el área de juego
 
Unidad 3 sección 3
Unidad 3 sección 3Unidad 3 sección 3
Unidad 3 sección 3
 
Fomentemos los valores civicos de amistad y convivencia social
Fomentemos los valores civicos de amistad y convivencia socialFomentemos los valores civicos de amistad y convivencia social
Fomentemos los valores civicos de amistad y convivencia social
 
Northware - AX Services and Support - LITE
Northware - AX Services and Support - LITENorthware - AX Services and Support - LITE
Northware - AX Services and Support - LITE
 
213.jardin botanico
213.jardin botanico213.jardin botanico
213.jardin botanico
 
152. juntos cambiemos la cara de mi escuela
152. juntos cambiemos la cara de mi escuela152. juntos cambiemos la cara de mi escuela
152. juntos cambiemos la cara de mi escuela
 
Karimanal thrml co_design_itherm2010_final
Karimanal thrml co_design_itherm2010_finalKarimanal thrml co_design_itherm2010_final
Karimanal thrml co_design_itherm2010_final
 

Semelhante a IS Unit 1_Conventional Encryption_Classical Encryption Techniques

Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
AfiqEfendy Zaen
 
Cyptography and network security
Cyptography and network securityCyptography and network security
Cyptography and network security
Priyanka Karancy
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information Security
Bikramjit Sarkar, Ph.D.
 
Automated Security Response through Online Learning with Adaptive Con jectures
Automated Security Response through Online Learning with Adaptive Con jecturesAutomated Security Response through Online Learning with Adaptive Con jectures
Automated Security Response through Online Learning with Adaptive Con jectures
Kim Hammar
 

Semelhante a IS Unit 1_Conventional Encryption_Classical Encryption Techniques (20)

Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Network security CS2
Network security CS2Network security CS2
Network security CS2
 
Cryptography
CryptographyCryptography
Cryptography
 
keeloq-final
keeloq-finalkeeloq-final
keeloq-final
 
Detailed cryptographic analysis of contact tracing protocols
Detailed cryptographic analysis of contact tracing protocolsDetailed cryptographic analysis of contact tracing protocols
Detailed cryptographic analysis of contact tracing protocols
 
Module 1.pptx
Module 1.pptxModule 1.pptx
Module 1.pptx
 
cryptography_priceton_university_fall_2007.ppt
cryptography_priceton_university_fall_2007.pptcryptography_priceton_university_fall_2007.ppt
cryptography_priceton_university_fall_2007.ppt
 
Cryptography
CryptographyCryptography
Cryptography
 
02 Information System Security
02  Information System Security02  Information System Security
02 Information System Security
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
 
What is Cryptography?
What is Cryptography?What is Cryptography?
What is Cryptography?
 
Cyptography and network security
Cyptography and network securityCyptography and network security
Cyptography and network security
 
A Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
A Tutorial on Linear and Differential Cryptanalysis by Howard M. HeysA Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
A Tutorial on Linear and Differential Cryptanalysis by Howard M. Heys
 
Network security attacks
Network security attacksNetwork security attacks
Network security attacks
 
Symmetric
SymmetricSymmetric
Symmetric
 
Unit 1
Unit 1Unit 1
Unit 1
 
SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY SYMMETRIC CRYPTOGRAPHY
SYMMETRIC CRYPTOGRAPHY
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information Security
 
Automated Security Response through Online Learning with Adaptive Con jectures
Automated Security Response through Online Learning with Adaptive Con jecturesAutomated Security Response through Online Learning with Adaptive Con jectures
Automated Security Response through Online Learning with Adaptive Con jectures
 
Engineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric EncryptionEngineering Cryptographic Applications: Symmetric Encryption
Engineering Cryptographic Applications: Symmetric Encryption
 

Mais de Sarthak Patel (7)

IS Unit 9_Web Security
IS Unit 9_Web SecurityIS Unit 9_Web Security
IS Unit 9_Web Security
 
IS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email SecurityIS Unit 8_IP Security and Email Security
IS Unit 8_IP Security and Email Security
 
IS Unit 7_Network Security
IS Unit 7_Network SecurityIS Unit 7_Network Security
IS Unit 7_Network Security
 
Is unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functionsIs unit 5_message authentication and hash functions
Is unit 5_message authentication and hash functions
 
Is unit 4_number_theory
Is unit 4_number_theoryIs unit 4_number_theory
Is unit 4_number_theory
 
IS Unit 3_Public Key Cryptography
IS Unit 3_Public Key CryptographyIS Unit 3_Public Key Cryptography
IS Unit 3_Public Key Cryptography
 
Is unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniquesIs unit 2_conventional encryption techniques
Is unit 2_conventional encryption techniques
 

Último

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

IS Unit 1_Conventional Encryption_Classical Encryption Techniques

  • 1. Chapter 1:Chapter 1:Chapter 1:Chapter 1:---- Conventional Encryption: Classical Encryption Techniques By:- Sarthak Patel (www.sarthakpatel.in)
  • 2. Outline Conventional Encryption Model Steganography Classical EncryptionTechniques Sarthak Patel (www.sarthakpatel.in)2
  • 3. Classical encryption techniques As opposed to modern cryptography Goals: to introduce basic concepts & terminology of encryption to prepare you for studying modern cryptography Sarthak Patel (www.sarthakpatel.in)3
  • 4. Principles of Security Security Goals: Confidentiality Integrity Authentication Non-repudiation Sarthak Patel (www.sarthakpatel.in)4 Non-repudiation Access Control Availability
  • 5. Loss of Confidentiality • SecretA B Sarthak Patel (www.sarthakpatel.in)5 C Attack:-Interception
  • 6. Absence of Authentication BA I am User A Sarthak Patel (www.sarthakpatel.in)6 C Attack:-Fabrication
  • 7. Loss of Integrity • Ideal RouteA B Sarthak Patel (www.sarthakpatel.in)7 C Attack:-Modification
  • 8. Non-repudiation A B I never sent that message, which you claim to have received Sarthak Patel (www.sarthakpatel.in)8 A B
  • 9. Access Control The principles of access control determines who should be able to access what. Access control is broadly related to two areas: role management and rule management. Sarthak Patel (www.sarthakpatel.in)9
  • 10. Loss of Availability A B Sarthak Patel (www.sarthakpatel.in)10 A B Attack:-Interruption C
  • 11. Basic terminology Plaintext: original message to be encrypted Ciphertext: the encrypted message Enciphering or encryption: the process of converting plaintext into ciphertext Sarthak Patel (www.sarthakpatel.in)11 plaintext into ciphertext Encryption algorithm: performs encryption Two inputs: a plaintext and a secret key
  • 12. Symmetric Cipher Model Sarthak Patel (www.sarthakpatel.in)12
  • 13. Contd… Deciphering or decryption: recovering plaintext from ciphertext Decryption algorithm: performs decryption Two inputs: ciphertext and secret key Sarthak Patel (www.sarthakpatel.in)13 Secret key: same key used for encryption and decryption Also referred to as a symmetric key
  • 14. Contd… Cipher or cryptographic system : a scheme for encryption and decryption Cryptography: science of studying ciphers Sarthak Patel (www.sarthakpatel.in)14 Cryptanalysis: science of studying attacks against cryptographic systems Cryptology: cryptography + cryptanalysis
  • 15. Ciphers Symmetric cipher: same key used for encryption and decryption Block cipher: encrypts a block of plaintext at a time (typically 64 or 128 bits) Sarthak Patel (www.sarthakpatel.in)15 128 bits) Stream cipher: encrypts data one bit or one byte at a time Asymmetric cipher: different keys used for encryption and decryption
  • 16. Symmetric Encryption or conventional / secret-key / single-key sender and recipient share a common key all classical encryption algorithms are symmetric The only type of ciphers prior to the invention of asymmetric-key ciphers in 1970’s Sarthak Patel (www.sarthakpatel.in)16 asymmetric-key ciphers in 1970’s by far most widely used
  • 17. Symmetric Encryption Mathematically: Y = EK(X) or Y = E(K, X) X = DK(Y) or X = D(K, Y) X = plaintext Y = ciphertext K = secret key Sarthak Patel (www.sarthakpatel.in)17 K = secret key E = encryption algorithm D = decryption algorithm Both E and D are known to public
  • 18. Cryptanalysis Objective: to recover the plaintext of a ciphertext or, more typically, to recover the secret key. Kerkhoff’s principle: the adversary knows all details about a cryptosystem except the secret key. Sarthak Patel (www.sarthakpatel.in)18 about a cryptosystem except the secret key. Two general approaches: brute-force attack non-brute-force attack (cryptanalytic attack)
  • 19. Brute-Force Attack Try every key to decipher the ciphertext. On average, need to try half of all possible keys Time needed proportional to size of key space Key Size (bits) Number of Alternative Keys Time required at 1 decryption/µs Time required at 106 decryptions/µs Sarthak Patel (www.sarthakpatel.in)19 Keys decryption/µs 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
  • 20. Cryptanalytic Attacks May be classified by how much information needed by the attacker: Ciphertext-only attack Known-plaintext attack Sarthak Patel (www.sarthakpatel.in)20 Known-plaintext attack Chosen-plaintext attack Chosen-ciphertext attack
  • 21. Ciphertext-only attack Given: a ciphertext c Q: what is the plaintext m? An encryption scheme is completely insecure if it cannot resist ciphertext-only attacks. Sarthak Patel (www.sarthakpatel.in)21
  • 22. Known-plaintext attack Given: (m1,c1), (m2,c2), …, (mk,ck) and a new ciphertext c. Q: what is the plaintext of c? Q: what is the secret key in use? Sarthak Patel (www.sarthakpatel.in)22
  • 23. Chosen-plaintext attack Given: (m1,c1), (m2,c2), …, (mk,ck), where m1,m2, …, mk are chosen by the adversary; and a new ciphertext c. Q: what is the plaintext of c, or what is the secret key? Sarthak Patel (www.sarthakpatel.in)23 Q: what is the plaintext of c, or what is the secret key?
  • 24. Example: chosen-plaintext attack In 1942, US Navy cryptanalysts discovered that Japan was planning an attack on “AF”. They believed that “AF” means Midway island. Pentagon didn’t think so. Sarthak Patel (www.sarthakpatel.in)24 Pentagon didn’t think so. US forces in Midway sent a plain message that their freshwater supplies were low. Shortly, US intercepted a Japanese ciphertext saying that “AF” was low on water. This proved that “AF” is Midway.
  • 25. Chosen-ciphertext attack Given: (m1,c1), (m2,c2), …, (mk,ck), where c1,c2, …, ck are chosen by the adversary; and a new ciphertext c. Q: what is the plaintext of c, or what is the secret key? Sarthak Patel (www.sarthakpatel.in)25
  • 26. Classical Ciphers Plaintext is viewed as a sequence of elements (e.g., bits or characters) Substitution cipher: replacing each element of the plaintext with another element. Sarthak Patel (www.sarthakpatel.in)26 Transposition (or permutation) cipher: rearranging the order of the elements of the plaintext. Product cipher: using multiple stages of substitutions and transpositions
  • 27. Caesar Cipher Earliest known substitution cipher Invented by Julius Caesar Each letter is replaced by the letter three positions further down the alphabet. • Plain: 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 Sarthak Patel (www.sarthakpatel.in)27 • Plain: 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 Cipher: D E F G H I J K L M N O P Q R ST UVW XY ZA B C Example: ohio state RKLRVWDWH
  • 28. Caesar Cipher Mathematically, map letters to numbers: a, b, c, ..., x, y, z 0, 1, 2, ..., 23, 24, 25 Then the general Caesar cipher is: c = E (p) = (p + k) mod 26 Sarthak Patel (www.sarthakpatel.in)28 c = EK(p) = (p + k) mod 26 p = DK(c) = (c – k) mod 26 Can be generalized with any alphabet.
  • 29. Cryptanalysis of Caesar Cipher Key space: {0, 1, ..., 25} Vulnerable to brute-force attacks. E.g., break ciphertext “KHOOR“ Answer is:“HELLO” Sarthak Patel (www.sarthakpatel.in)29 Answer is:“HELLO”
  • 30. Monoalphabetic Substitution Cipher Shuffle the letters and map each plaintext letter to a different random ciphertext letter: Plain letters: abcdefghijklmnopqrstuvwxyz Cipher letters: DKVQFIBJWPESCXHTMYAUOLRGZN Sarthak Patel (www.sarthakpatel.in)30 Cipher letters: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext: ifwewishtoreplaceletters Ciphertext:WIRFRWAJUHYFTSDVFSFUUFYA What does a key look like?
  • 31. Monoalphabetic Cipher Security Now we have a total of 26! = 4 x 1026 keys. With so many keys, it is secure against brute-force attacks. But not secure against some cryptanalytic attacks. Problem is language characteristics. Sarthak Patel (www.sarthakpatel.in)31 Problem is language characteristics.
  • 32. Language Statistics and Cryptanalysis Human languages are not random. Letters are not equally frequently used. In English, E is by far the most common letter, followed byT,A, R, N, I, O, S. Sarthak Patel (www.sarthakpatel.in)32 byT,A, R, N, I, O, S. Other letters like Z, J, K, Q, X are fairly rare. There are tables of single, double & triple letter frequencies for various languages
  • 33. English Letter Frequencies Sarthak Patel (www.sarthakpatel.in)33
  • 34. Statistics for double & triple letters In decreasing order of frequency Double letters: to he an in re on, … Sarthak Patel (www.sarthakpatel.in)34 Triple letters: the and for nab, …
  • 35. Use in Cryptanalysis Key concept: monoalphabetic substitution does not change relative letter frequencies To attack, we Sarthak Patel (www.sarthakpatel.in)35 To attack, we calculate letter frequencies for ciphertext compare this distribution against the known one
  • 36. Example Cryptanalysis Given ciphertext: UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ Count relative letter frequencies (see next page) Guess {P, Z} = {e, t} Sarthak Patel (www.sarthakpatel.in)36 Guess {P, Z} = {e, t} Of double letters, ZW has highest frequency, so guess ZW = th and hence ZWP = 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
  • 37. Letter frequencies in ciphertext P 13.33 H 5.83 F 3.33 B 1.67 C 0.00 Z 11.67 D 5.00 W 3.33 G 1.67 K 0.00 S 8.33 E 5.00 Q 2.50 Y 1.67 L 0.00 U 8.33 V 4.17 T 2.50 I 0.83 N 0.00 Sarthak Patel (www.sarthakpatel.in)37 U 8.33 V 4.17 T 2.50 I 0.83 N 0.00 O 7.50 X 4.17 A 1.67 J 0.83 R 0.00 M 6.67
  • 38. Polyalphabetic Substitution Ciphers A sequence of monoalphabetic ciphers (M1, M2, M3, ..., Mk) is used in turn to encrypt letters. A key determines which sequence of ciphers to use. Each plaintext letter has multiple corresponding ciphertext letters. Sarthak Patel (www.sarthakpatel.in)38 ciphertext letters. This makes cryptanalysis harder since the letter frequency distribution will be flatter.
  • 39. Example(Poly): Vigenère Cipher Simplest polyalphabetic substitution cipher Consider the set of all Caesar ciphers: { Ca, Cb, Cc, ..., Cz } Key: e.g. security Encrypt each letter using C , C , C , C ,C , C , C , C in Sarthak Patel (www.sarthakpatel.in)39 Encrypt each letter using Cs, Ce, Cc, Cu,Cr, Ci, Ct, Cy in turn. Repeat from start after Cy. Decryption simply works in reverse.
  • 40. Example of Vigenère Cipher Keyword: deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself Sarthak Patel (www.sarthakpatel.in)40 plaintext: wearediscoveredsaveyourself ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
  • 41. Key Plain Text Sarthak Patel (www.sarthakpatel.in)41
  • 42. Playfair Cipher Not even the large number of keys in a monoalphabetic cipher provides security. One approach to improving security is to encrypt multiple letters at a time. The Playfair Cipher is the best known such cipher. Sarthak Patel (www.sarthakpatel.in)42 The Playfair Cipher is the best known such cipher. Invented by CharlesWheatstone in 1854, but named after his friend Baron Playfair.
  • 43. Playfair Key Matrix Use a 5 x 5 matrix. Fill in letters of the key (w/o duplicates). Fill the rest of matrix with other letters. E.g., key = MONARCHY. Sarthak Patel (www.sarthakpatel.in)43 E.g., key = MONARCHY. MM OO NN AA RR CC HH YY BB DD EE FF GG I/JI/J KK LL PP QQ SS TT UU VV WW XX ZZ
  • 44. 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 the letter to its right (circularly). 3. If both letters fall in the same column, replace each with the the Sarthak Patel (www.sarthakpatel.in)44 3. If both letters fall in the same column, replace each with the the letter below it (circularly). 4. Otherwise, each letter is replaced by the letter in the same row but in the column of the other letter of the pair.
  • 45. Example of Playfair Cipher Key: MONARCHY Plaintext: BALLOON MM OO NN AA RR CC HH YY BB DD EE FF GG I/JI/J KK LL PP QQ SS TT UU VV WW XX ZZ Sarthak Patel (www.sarthakpatel.in)45 oBA LX LO ON Ciphertext: IB SU PM NA UU VV WW XX ZZ
  • 46. Security of Playfair Cipher Security is much improved over the simple monoalphabetic cipher. Was widely used for many decades eg. by US & British military inWW1 and earlyWW2 Sarthak Patel (www.sarthakpatel.in)46 Once thought to be unbreakable. Actually, it can be broken, because it still leaves some structure of plaintext intact.
  • 47. Rotor Cipher Machines Before modern ciphers, rotor machines were most common complex ciphers in use. Widely used inWW2. Used a series of rotating cylinders. Sarthak Patel (www.sarthakpatel.in)47 Implemented a polyalphabetic substitution cipher of period K. With 3 cylinders, K = 263 =17,576. With 5 cylinders, K = 265 =12 x 106. What is a key? If the adversary has a machine If the adversary doesn’t have a machine
  • 49. German secret setting sheets Sarthak Patel (www.sarthakpatel.in)49 Date Which rotors to use (there were 10 rotors) Ring setting Plugboard setting
  • 50. The Rotors Sarthak Patel (www.sarthakpatel.in)50
  • 51. Enigma Rotor Machine Sarthak Patel (www.sarthakpatel.in)51
  • 52. Enigma Rotor Machine Sarthak Patel (www.sarthakpatel.in)52
  • 53. Transposition Ciphers Also called permutation ciphers. Shuffle the plaintext, without altering the actual letters used. Example: i) ColumnarTransposition Ciphers ii) Rail FenceTechnique Sarthak Patel (www.sarthakpatel.in)53 ii) Rail FenceTechnique
  • 54. Columnar Transposition Ciphers Plaintext is written row by row in a rectangle. Ciphertext: write out the columns in an order specified by a key. C O M E H O Sarthak Patel (www.sarthakpatel.in)54 Key: 3 4 2 1 5 6 Plaintext: Ciphertext: MTOR EOWN OERE CMRT HMAO OOFA C O M E H O M E T O M O R R O W A F T E R N O O
  • 55. Rail Fence Technique Rail fence technique involves writing plain text as sequence of diagonals and then reading it row-by-row to produce cipher text. PlainText: COME HOMETOMORROW C M H M T M R O Sarthak Patel (www.sarthakpatel.in)55 C M H M T M R O O E O E O O R W CipherText: CMHMTMRO OEOEOORW
  • 56. Product Ciphers Uses a sequence of substitutions and transpositions Harder to break than just substitutions or transpositions This is a bridge from classical to modern ciphers. Sarthak Patel (www.sarthakpatel.in)56
  • 57. Steganography Hide a message in another message. Invisible ink,Tiny pin punctures or minute variations between handwritten characters, pencil marks etc. E.g., hide your plaintext in a graphic image Sarthak Patel (www.sarthakpatel.in)57 Each pixel has 3 bytes specifying the RGB color The least significant bits of pixels can be changed w/o greatly affecting the image quality So can hide messages in these LSBs
  • 58. Summary Have considered: classical cipher techniques and terminology monoalphabetic substitution ciphers cryptanalysis using letter frequencies Sarthak Patel (www.sarthakpatel.in)58 cryptanalysis using letter frequencies Playfair cipher polyalphabetic ciphers transposition ciphers product ciphers and rotor machines Steganography
  • 59. Symmetric Asymmetric Symmetric cryptography uses the same secret (private) key to encrypt and decrypt its data Asymmetric uses both a public and private key Symmetric requires that the secret key be known by the party encrypting the data and the party Asymmetric allows for distribution of your public key to anyone with which they can encrypt the Sarthak Patel (www.sarthakpatel.in)59 by the party encrypting the data and the party decrypting the data key to anyone with which they can encrypt the data they want to send securely and then it can only be decoded by the person having the private key Faster than Asymmetric The issue with asymmetric is that it is about 1000 times slower than symmetric encryption which makes it impractical when trying to encrypt large amounts of data Less Security compare to Asymmetric Stronger Security compare to Symmetric