Cloud Security Lecture 2
Cloud Security Lecture 2
Mohamed Loey
Symmetric Encryption
Substitution Techniques
Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
Symmetric-key algorithms are algorithms for cryptography that use the same cryptographic keys for both
encryption of plaintext and decryption of ciphertext.
Plaintext is the original message or data.
Substitution Cipher
Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
1
FLANK EAST The clear text message would be
ATTACK AT DAWN
encoded using a key of 3.
Clear text
Substitution Techniques
Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
Caesar Cipher is one of the simplest and most widely known encryption
techniques.
PlainText = dcodex
K=3
1) Letter d
K=3
1) Letter x
4) C=a
P= dcodex
C= gfrgha
K=3
CipherText = gfrgha
K=3
1) Letter g
K=3
1) C=a
2) C=0
4) P=x
C= gfrgha
P= dcodex
K=3
Three important characteristics of this problem enabled us to use a bruteforce cryptanalysis:
Substitution Techniques
Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
A monoalphabetic cipher uses fixed substitution over the entire message
Random Key
Example:
Plaintext alphabets: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Ciphertext alphabet: ZEBRASCDFGHIJKLMNOPQTUVWXY
P= ITEMS
Encoding
C= FQAIP
Decoding
P= ITEMS
Relative Frequency of Letters in
English Text
C=
cipher letters P and Z are the equivalents of plain letters e and t
Finally, The complete plaintext
How to implement Monoalphabetic
Cipher technique on Arabic letters?
Symmetric Encryption
Substitution Techniques
Caesar Cipher
Monoalphabetic Cipher
Playfair Cipher
The Playfair system was invented by Charles Wheatstone, who first described it in 1854.
The Playfair algorithm is based on the use of a 5 x 5 matrix of letters constructed using a keyword.
In this case, the keyword is monarchy.
4 Rules:
1) If both letters are the same (or only one letter is left), add an "X" after the first letter.
2) If the letters appear on the same row of your table, replace them with the letters to their immediate right
respectively
4 Rules:
3) If the letters appear on the same column of your table, replace them with the letters immediately
below respectively.
4) If the letters are not on the same row or column, replace them with the letters on the same row
respectively but at the other pair of corners of the rectangle defined by the original pair.
P=Hide the gold in the tree stump (note the null "X" used to separate the repeated "E"s)
P= HI DE TH EG OL DI NT HE TR EX ES TU MP
K= playfair example
How to build 5x5 Matrix (assuming that I and J are interchangeable), the table becomes (omitted letters in
red):
P= HI DE TH EG OL DI NT HE TR EX ES TU MP
P= HI DE TH EG OL DI NT HE TR EX ES TU MP
P= HI DE TH EG OL DI NT HE TR EX ES TU MP
P= HI DE TH EG OL DI NT HE TR EX ES TU MP
P= HI DE TH EG OL DI NT HE TR EX ES TU MP
C= BM OD ZB XD NA BE KU DM UI XM MO UV IF
the message "Hide the gold in the tree stump" becomes "BMODZ BXDNA BEKUD
MUIXM MOUVI F"
Using Playfair Cipher how to decrepit the following cipher
text:
C= “BMODZ BXDNA BEKUD MUIXM MOUVI F”
K= playfair example