0% found this document useful (0 votes)
104 views

Cloud Security Lecture 2

Here are the steps to decrypt the ciphertext "BMODZ BXDNA BEKUD MUIXM MOUVI F" using the Playfair cipher with the keyword "playfair": 1. The keyword is "playfair" which is used to construct the 5x5 Playfair square. 2. Break the ciphertext into digraphs (pairs of letters): BM, OD, ZB, XD, NA, BE, KU, DG, UI, XM, MO, UV, IF 3. Decrypt each digraph by applying the Playfair cipher rules in reverse: BM -> TH OD -> EG ZB -> OL XD -> DI NA ->

Uploaded by

Hossam Eissa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Cloud Security Lecture 2

Here are the steps to decrypt the ciphertext "BMODZ BXDNA BEKUD MUIXM MOUVI F" using the Playfair cipher with the keyword "playfair": 1. The keyword is "playfair" which is used to construct the 5x5 Playfair square. 2. Break the ciphertext into digraphs (pairs of letters): BM, OD, ZB, XD, NA, BE, KU, DG, UI, XM, MO, UV, IF 3. Decrypt each digraph by applying the Playfair cipher rules in reverse: BM -> TH OD -> EG ZB -> OL XD -> DI NA ->

Uploaded by

Hossam Eissa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Some of lectures materials belongs to Dr.

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.

 Secret Key is a value independent of the plaintext and of the algorithm an

 Ciphertext This is the scrambled message produced as output.


 Encryption Algorithm is a mathematical procedure for performing encryption on data.

 Decryption Algorithm is a mathematical procedure for performing decryption on data.


Symmetric Encryption

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

Shift the top


2 scroll over by
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 three characters
(key of 3), an A
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 A B C becomes D, B
becomes E, and
so on.
3
IODQN HDVW The clear text message would
DWWDFN DW GDZQ be encrypted as follows using a
key of 3.
Cipherered text
 Caesar Cipher
 Monoalphabetic Ciphers
 Playfair Cipher
 Hill Cipher
 Polyalphabetic Ciphers
 Vigenère Cipher
 Autokey Cipher
 Vernam Cipher
Symmetric Encryption

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

2) P=3 => from the table

3) C=P+K mod 26; 3+3 mod 26 ; 6 mod 26 =6

4) From the table => C=6 => c=g


 PlainText = dcodex

 K=3

1) Letter x

2) P=23 => from the table

3) C= P+K mod 26 ; 23+3 mod 26; 26 mod 26= 0

4) C=a
 P= dcodex

 C= gfrgha

 K=3
 CipherText = gfrgha

 K=3

1) Letter g

2) C=6 => from the table

3) P=C-K mod 26 ; 6-3 mod 26 = 3 mod 26=3

4) From the table p=3 => p=d


 CipherText = gfrgha

 K=3

1) C=a

2) C=0

3) P=C-K mod 26; 0-3 mod 26; -3 mod 26 =23

4) P=x
 C= gfrgha

 P= dcodex

 K=3
 Three important characteristics of this problem enabled us to use a bruteforce cryptanalysis:

 The encryption and decryption algorithms are known.

 There are only 25 keys to try.

 The language of the plaintext is known and easily recognizable.


How to implement Caesar Cipher
technique on Arabic letters?
Symmetric Encryption

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.

 Used by many countries during wartime

 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

You might also like