Escolar Documentos
Profissional Documentos
Cultura Documentos
decryption process.
To encrypt: C = E(P, K)
To decrypt: P = D (E(P,K), K)
Key Original
Plaintext Ciphertext Plaintext
Encryption Decryption
Encryption Algorithms
Asymmetric Encryption: uses different key for
encryption and decryption process.
To encrypt: C = E (P, KE)
To decrypt: P = D (E (P, KE), KD)
Encryption Key Decryption Key
(KE) (KD)
Original
Plaintext Ciphertext Plaintext
Encryption Decryption
Substitutions
Polyalphabetic Substitution
Monoalphabetic Substitutions
Monoalphabetic Cipher – always uses the same letter of
the alphabet for the ciphertext letter.
A–0 H–7 O – 14 V – 21
B–1 I–8 P – 15 W – 22
C–2 J–9 Q – 16 X – 23
D–3 K – 10 R – 17 Y – 24
E–4 L – 11 S – 18 Z – 25
F–5 M – 12 T – 19
G–6 N – 13 U – 20
Example: (x = 19)
ABCDEFGHIJKLMNOPQRSTUVWXYZ
TUVWXYZABCDEFGHIJKLMNOPQRS
Plaintext = “SECURITY”
Ciphertext = “LXVNKBMR”
Advantages: easy to remember
Disadvantages: easy to predict pattern of encryption
Monoalphabetic Substitutions
Substitution using key phrase:
• Example:
If the key phrase is BOM, the shifted key are as follows:
Plaintext: A B C D E F G H I J K L M N O P...
Ciphertext: B O M A C D E F G H I J K L N P..
C I N A B D
E F G H J K
L M O P Q R
S T U V W X
Y Z
Example:
If wrr is TOO. wr would be TO (more sense compare to
SE)
ABCDEFGHIJKLMNOPQRSTUVWXYZ
a d g j mps vybe h k n q t wz c f i l o r u x
Table for Even Position
1
Plaintext
K
e
2
y 3
Ciphertext
Polyalphabetic Substitution Ciphers
Cryptanalysis of Polyalphabetic Substitutions
There are two ways:
Kasiski Method
Index of Coincidence
Kasiski Method for repeated pattens
Named for its developer, a Prussian military officer.
Is a way of finding the number of alphabets that were
used for encryption.
-th, -ion, -ed, -tion, and, to, are, appear with high
frequency (regularity of English).
Polyalphabetic Substitution Ciphers
Kasiski Method
For Kasiski Method, the steps are:
1. Identify repeated patterns of three or more characters.
2. For each patterns write down the position at which each
instances of the pattern begins.
3. Compute the difference between the starting points of
successive instances.
4. Determine all factors of each difference.
5. If a polyalphabetic substitution cipher was used, the key
length will be one of the factors that appears often in step 4.
Polyalphabetic Substitution Ciphers
- Form set of letters according to the position of key
assumed.
- Use previous monoalphabetic cryptanalysis.
Index of Coincidence
Index of coincidence is a measure of the variation
between frequencies in a distribution.
The “Perfect” Substitution Cipher
What makes a perfect substitution cipher?
An ideal substitution would use many alphabets for an
unrecognizable distribution and no apparent pattern for
the choice of an alphabet at a particular point.
Let’s look at Vernam Cipher or One-Time Pad
algorithms.
The “Perfect” Substitution Cipher
Vernam Cipher (One Time Pad)
Introduced by Gilbert Vernam (AT&T Engineer)
in 1918.
Immune to cryptanalytic attack because the
available ciphertext does not display the pattern
of the key.
Involves an arbitrarily long non-repeating
sequence of numbers that are combined with
the plaintext.
The “Perfect” Substitution Cipher
Vernam Cipher (One Time Pad)
Compared with most cryptosystems it is very simple.
To use a one time pad, you need two copies of the
“pad” (also known as the key) which is a block of truly
random data at least as long as the message you wish
to encode.
If the data on the pad is not truly random the security of
the pad is compromised.
The “Perfect” Substitution Cipher
Example:
Assume that the alphabetic letters are combined by sum
mod 26 with a stream of random two-digit numbers.
Plaintext : V E R N A M C I P H E R
Numerical Value : 21 4 17 13 0 12 2 8 15 7 4 17
+random number : 76 48 16 82 44 3 58 11 60 5 48 88
= sum : 97 52 33 95 44 15 60 19 75 12 52 105
mod 26 : 19 0 7 17 18 15 8 19 23 12 0 1
ciphertext : T A H R S P I T X M A B
The “Perfect” Substitution Cipher
Note:
random number 48 happen to fall at the places of repeated
letters, accounting for repeated ciphertext A but however highly
unlikely.
repeated letter t comes from different plaintext letter
The “Perfect” Substitution Cipher
Binary Vernam Cipher
Works just as well as
Input Bits
“alphabets”. Output
Message Pad Bits
Example :
This operation is perform 0 0 0
on each letter in
0 1 1
sequence.
1 0 1
1 1 0
Plaintext: 101101100101011100101101
The “Perfect” Substitution Cipher
Vernam Cipher (One Time Pad)
Systems using perfect random, non-repeating keys
which is endless and senseless
Random key used once, and only once.
It is the only unbreakable cryptography system
Unbreakable in theory:
the key neither repeats, nor recurs, nor makes sense,
nor erects internal frameworks
perfect randomness nullifies any horizontal, or
lengthwise cohesion
The “Perfect” Substitution Cipher
Vernam Cipher (One Time Pad)
write-in take-off
Transpositions (Permutations)
Transposition Cipher: Columnar
Encryption: Plaintext is written horizontally onto the matrix of
of fixed width and the ciphertext is read off vertically.
Decryption: Ciphertext is written vertically onto the same
matrix of identical width and then reading the plaintext off
horizontally.
Example : Plaintext is RENAISSANCE is written into a 3 x 4
matrix as follows
R E N A
I S S A
N C E
the resulting cipher text is RINESCNSEAA
Transpositions (Permutations)
Double Transposition Algorithm
Involves 2 columnar transposition, with different
numbers of columns, applied one after the other.
Example:
Single Columnar
T H (I S) I
Produces :
S A (M E) S
S A (G E) T
TSSOH OANIW HAASO LRSTO
O S (H O) W (I(M(G(H(W (U(T(P(I(R S)E)E)O)A) M)R)O)O)K)
H O (W A) C ISTWC NASNS
O L (U M) N
A R (T R) A
N S (P O) S
I T (I O) N
W O (R K) S
Transpositions (Permutations)
Second transposition written in an 8 by 7 matrix: