You are on page 1of 9

Lecture 04 – Cryptography:

Part II
Week 04 – Security in Computing
Revision
• Analyzed the underlying concepts of cryptography such as symmetric and asymmetric encryption and their
components.
• Understood the three independent dimensions of cryptographic systems.
• Understood the concepts of unconditional and computational security.
• Analyzed the working principle of the Caesar substitution cipher.

Cryptography: Part II October 10, 2020 | 2


Analyzing the playfair cipher
• Playfair cipher is the best-known multiple letter encryption cipher. Key: MONARCHY
• The Playfair algorithm is based on the use of a 5 x 5 matrix of letters, which
is constructed using a key. M O N A R
• The plain text is encrypted using the following rules: C H Y B D
Rule 01. Repeating letters of the plaintext which are in the same pair E F G I/J K
are separated with a filler letter such as “X”.
L P Q S T
So that, BALLOON would be treated as BA LX LO ON.
U V W X Z
Rule 02. Plain text letters in the same row are replaced by letters to
the right (ar -> rm). 5 X 5 matrix

Rule 03. Plain text letters in the same column are replaced by the
letters below (mu -> cm).
Rule 04. Else, each plaintext letter in a pair is replaced by the letter
that lies in its own row and column occupied by other plain text
letter (hs -> bp).

Cryptography: Part II October 10, 2020 | 3


Analyzing the playfair cipher
Example: I/J N F O S
E C A B D
Plaintext: CRYPTO G H K L M
Keyword: INFOSEC P Q R T U
V W X Y Z
Solution: 5 X 5 matrix
CR = AQ
YP = VT
TO = YB

Hence, CRYPTO = AQVTYB

Cryptography: Part II October 10, 2020 | 4


Understanding transposition ciphers
• Here, a very different kind of mapping is achieved by performing permutation on plain text letters.
• If S = {a, b, c}, there are 3! Permutations and they are, abc, acb, bac, cab, cba.
• This technique is applied in the Transposition ciphers (Permutation ciphers).
• These hide messages by re-arranging the letter order without altering the actual letters used.
• However, a weakness can be assumed as the cipher text has the same frequency of the original letters.
• A pure Transposition cipher is easily recognized because it has the same letter frequency as the original plaintext.

Cryptography: Part II October 10, 2020 | 5


Analyzing the rail fence cipher
• Rail Fence cipher is a transposition cipher where plaintext is written down as a series of diagonals and then read
off as a sequence of rows.
• Example: To encipher (encrypt) the message “MEET ME AFTER THE TOGA PARTY” with a rail fence of depth (rail) 2,
we have:

M E M A T R H T G P R Y
E T E F E T E O A A T
Matrix: 2 x 23

• Hence, the encrypted message is: MEMATRHTGPRYETEFETEOAAT

Cryptography: Part II October 10, 2020 | 6


Understanding row transposition cipher
• This cipher uses a more complex scheme by writing the Plaintext in a rectangle, row by row and read off the
message column by column.
• The order of columns are permuted, which that becomes the key to the algorithm.
• Plain Text: ATTACK POSTPONED UNTIL TWO AM Key: FDABMSY (4312567)

• Hence, cipher text: TTNA APTM TSUO AODW COIX KNLY PETZ

Cryptography: Part II October 10, 2020 | 7


Understanding the product ciphers
• A product cipher is a block cipher, that performs several operations such as Substitution and Transposition.
• Examples of modern product ciphers (algorithm) includes SDES and DES.
• A product cipher acts as a mixer function which combines the plaintext, key and ciphertext in a complete non-linear
manner.
• For example, two substitutions makes a more complex substitution, and two transpositions makes a more complex
transposition.
• But substitution followed by a transposition makes for a much-complicated cipher (algorithm).

Cryptography: Part II October 10, 2020 | 8


Summary
• Understood the working concepts of the playfair cipher.
• Understood the rail fence and the row transposition ciphers.
• Analyzed the concept behind the product ciphers.

Cryptography: Part II October 10, 2020 | 9

You might also like