lecture 020
TRANSCRIPT
-
8/3/2019 Lecture 020
1/30
Chapter 2Classical Encryption Techniques
Basic Concepts
Models of Encryption and Decryption
Information Security Chapter 2 Classical Encryption Methods
Classical Encryption Methods
Substitution Techniques
Transposition Techniques
1
-
8/3/2019 Lecture 020
2/30
Basic Concepts
plaintext: the original clear message
ciphertext: the transformed message cipher: an algorithm for transforming or
encrypting or ciphering a clear message into
Information Security Chapter 2 Classical Encryption Methods
c p ertext w t w c any unaut or ze partycannot find the plaintext.
key: a data unit used for encryption or decryption.
2
-
8/3/2019 Lecture 020
3/30
Basic Concepts
encipher/encrypt: the process of converting
plaintext to ciphertext using a cipher and akey.
decipher/decrypt: the process of converting
Information Security Chapter 2 Classical Encryption Methods
ciphertext back into plaintext using a cipherand a key.
3
-
8/3/2019 Lecture 020
4/30
Basic Concepts
cryptography: the science/maths of transforming a
plaintext into a ciphertext and then transforming
the ciphertext back into the plaintext.
cryptographic systems are characterized as:
Information Security Chapter 2 Classical Encryption Methods
plain text to ciphertext.
The number of keys used.
The way in which the plaintext is processed.
4
-
8/3/2019 Lecture 020
5/30
Basic Concepts
cryptanalysis: the study of transforming a
ciphertext back into the original plaintext without
knowledge of the key. There are two generalapproaches to attack a conventional scheme:
Information Security Chapter 2 Classical Encryption Methods
Brute-force attack
cryptology: both cryptography and cryptanalysis.
5
-
8/3/2019 Lecture 020
6/30
Models of Encryption and Decryption
Encryption: a process of encoding a message so
that its meaning is not obvious.
Decryption: the reverse process: transforming an
encrypted message back into its normal form.
Information Security Chapter 2 Classical Encryption Methods
decryption key are the same.
Asymmetric key encryption: Encryption key
and decryption key are different.
6
-
8/3/2019 Lecture 020
7/30
Models of Encryption and Decryption
Symmetric
Information Security Chapter 2 Classical Encryption Methods
public/encryption key of Recipient secret key/decryption key of Recipient
e.g. RSA
Asymmetric
7
-
8/3/2019 Lecture 020
8/30
Security of An Encryption Scheme
Unconditionally Secure: the ciphertext generatedby the scheme does not contain enough
information to determine the plaintext no matterhow much ciphertext is available.
Computationally Secure: if the two criteria are
Information Security Chapter 2 Classical Encryption Methods
met: the cost of breaking the cipher exceeds the
value of the encrypted information.
the time required to break the cipher exceedsthe useful lifetime of the information.
8
-
8/3/2019 Lecture 020
9/30
Notation
Encryption: C = E(P) or C = Ekey(P)
Decryption: P = D(C) = D(E(P)) or P = Dkey(C)
Information Security Chapter 2 Classical Encryption Methods
C=Ekey(P), P=Dkey(C)
Asymmetric cryptosystem:
C=EEncryptionKey(P), P=DDecryptionKey(C)
9
-
8/3/2019 Lecture 020
10/30
Mechanism to Make a Cipher
Two basic building blocks of all
conventional encryption techniques:Substitution and Transposition (permutation)
Information Security Chapter 2 Classical Encryption Methods
Substitution: the letters of plaintext arereplaced by other letters or numbers of
symbols
Transposition: the letters of plaintext are
reordered
10
-
8/3/2019 Lecture 020
11/30
Caesar Cipher
Substitution: a letter is replaced by another letter or symbol
Example: Move each letter of the alphabet to the letter
three to the right in the predetermined order of the lettersof the alphabet. AD, BE, CF,
Caesar cipher moves the ith letter of an alphabet to the
Information Security Chapter 2 Classical Encryption Methods
+ t etter. a= , = , c= ,..., i= ,... Encryption C= E(Pi) = i+ k(mod 26)
Decryption Pi = D(C)= C-k (mod 26)
Example: IFMMP = E(HELLO) with k=1
11
-
8/3/2019 Lecture 020
12/30
Cryptanalysis of Caesar Cipher
The encryption/decryption algorithms are known
There are only 25 possible keys (1,...,25), so it is
easy to break by Brute force cryptoanalysis.
The language of the plaintext is known and easily
Information Security Chapter 2 Classical Encryption Methods
Can we make it harder?
include all ASCII codes - 255 keys
Zip the file and then encrypt it - ciphertext becomesunreadable.
12
-
8/3/2019 Lecture 020
13/30
Cryptanalysis of Caesar Cipher
Cryptanalysis by letter frequency
distributions.
If encipherment is achieved by a simple letter
shift then a frequency count of the letter
Information Security Chapter 2 Classical Encryption Methods
s r u ons n e c p er ex w y e esame pattern as the original host language of
the plaintext but shifted.
13
-
8/3/2019 Lecture 020
14/30
English Letter Frequency Distribution
Information Security Chapter 2 Classical Encryption Methods14
-
8/3/2019 Lecture 020
15/30
-
8/3/2019 Lecture 020
16/30
General Monoalphabetic Cipher
Better substitution
Method:
Select a secret word/key (avoid repeating words)
Example: Choose secret words `star wars'. `starwars' has the letters a r and s re eated so we use
Information Security Chapter 2 Classical Encryption Methods
only the letters s, t, a, r, w. Write alphabets into a rectangle, e.g.
16
STARW
BCDEF
GHIJK
LMNOP
QUVXY
Z
-
8/3/2019 Lecture 020
17/30
General Monoalphabetic Cipher
The substitution table
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 25A 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
S B G L Q Z T C H M U A D I N V R E J O X W F K P Y
Information Security Chapter 2 Classical Encryption Methods17
I KNOW ONLY THAT I KNOW NOTHING
H UINF NIAP OCSO H UINF INOCHIT
-
8/3/2019 Lecture 020
18/30
General Monoalphabetic Cipher
Monoalphabetic ciphers are easy to breakbecause they reflect the frequency data ofthe original alphabet
A countermeasure is to provide multiple
Information Security Chapter 2 Classical Encryption Methods18
substitutes, known as homophones, for asingle letter. e.g: letter e be assigned
different cipher symbols such as: 16,74,35
and 21, with each homophone used in
rotation
-
8/3/2019 Lecture 020
19/30
Playfair: A Multiple Letter Encryption Cipher
The best-known multiple-letter cipher.
The algorithm is based on the use of a 55 matrix
of letters constructed using a key word.
Information Security Chapter 2 Classical Encryption Methods
C H Y B DE F G I/J K
L P Q S T
U V W X Z
19
-
8/3/2019 Lecture 020
20/30
Playfair Cipher
The plaintext is encrypted a pair at a time, left over oneneeds to be paired by a filler letter.
Repeating letters of the same pair are separated with afiller letter.
Letters of a pair that fall in the same row are each replacedb the letter to the ri ht. The row is circular with the 1st
Information Security Chapter 2 Classical Encryption Methods20
letter following the last one. Letters of a pair that fall in the same column are each
replaced by the letter beneath. The column is circular withthe 1st letter following the last one.
Otherwise, each plaintext letter is replaced by the letterthat lies in its own row and the column occupied by theother plaintext letter.
-
8/3/2019 Lecture 020
21/30
Playfair Cipher
An example: Whats the cipher text for
encrypting Playfair Cipher by Playfair Cipher?
Pair combination:
pl ay fa ir ci ph er
Information Security Chapter 2 Classical Encryption Methods21
no er etter nee e .
-
8/3/2019 Lecture 020
22/30
Hill Cipher: Another Multiletter Cipher
The plaintext is encrypted every m successiveletters at a time for m ciphertext letters.
The substitution is determined by m linearequations with each letter is assigned a numericalvalue (a=0, b=1, z=25).
Information Security Chapter 2 Classical Encryption Methods22
For m=3, the system is as follows:c1 = (k11p1 + k12p2 + k13p3) mod 26
c2 = (k21p1 + k22p2 + k23p3) mod 26
c3 = (k31p1 + k32p2 + k33p3) mod 26
-
8/3/2019 Lecture 020
23/30
Hill Cipher
this can be expressed in terms of column vector
and matrices:
c1 k11 k12 k13 p1
c2 = k21 k22 k23 p2 mod 26
Information Security Chapter 2 Classical Encryption Methods23
c3 31 32 33 p3
or C=KP mod 26
-
8/3/2019 Lecture 020
24/30
Polyalphabetic Substitution Cipher
Monoalphabetic substitution ciphers hide the
distribution via the use of homomorphisms.
Cryptanalysis: frequency distribution.
Polyalphabetic substitution ciphers hide it by
Information Security Chapter 2 Classical Encryption Methods
,
alphabets. It has a flatter frequency distribution.
A set of substitution rules
A key determines which rule to choose
24
-
8/3/2019 Lecture 020
25/30
Polyalphabetic Cipher - Vigenre Cipher
Select a key from 26 letters
Create a substitution table
Example
Encryption:
Information Security Chapter 2 Classical Encryption Methods25
deceptivedeceptivedeceptive
wearediscoveredsaveyourself
zicvtwqngrzgvtwavzhcqyglmgj
Key:Plaintext:
Ciphertext:
d+w=z mod26, e+e=i mod26, ...
Decryption:
w=z-d mod26, e=i-e mod26, ...
-
8/3/2019 Lecture 020
26/30
Transposition Techniques
Transposition
plaintext permutation cipertextThe simplest one: plaintext is written as a sequence of
diagonals and then read off as a sequence of rows
Information Security Chapter 2 Classical Encryption Methods 26
e.g: meet me after the toga party is written as:
m e m a t r h t g p r y
e t e f e t e o a a t
the encrypted message is:mematrhtgpryetefeteoaat
-
8/3/2019 Lecture 020
27/30
Transposition Techniques
More complex one: write the message in a rectangle, row by
row, read off column by column but permute the order of
the columns
2 4 1 3
Example:2 4 1 3
keyencryption
Information Security Chapter 2 Classical Encryption Methods 27
U T E RS E C U
R I T Y
plaintext:
decryption
E U R TC S U E
T R Y I
ciphertext
COMPUTERSECURITY MECTCUSRPRUYOTEI
Note: If the message length is not a multiple of a row, the last
column is not full. Some infrequent letter(s) should be filled.
-
8/3/2019 Lecture 020
28/30
One-Time Pad
An encryption scheme (by Joseph Mauborgne,AT&T).
What is one-time pad?
A large non-repeating set of truly random key letters as
long as the message, written on sheets of paper, and
glued together in a pad.
Information Security Chapter 2 Classical Encryption Methods
Encryption:
Decryption:
28
Ciphertext_letter = (Plaintext_letter + Key_letter) mod 26
Ciphertext_bit = Plaintext_bit Key_bit
Plaintext_letter = ( Ciphertext_letter - Key_letter) mod 26
Plaintext_bit = Ciphertext_bit Key_bit
-
8/3/2019 Lecture 020
29/30
-
8/3/2019 Lecture 020
30/30