Lecture 6 IS (TH)
Lecture 6 IS (TH)
LECTURE 6
2
Symmetric Block Cipher
• Block cipher uses the same key for encryption and decryption.
• Block cipher algorithms are often able to combine data from different
blocks in order to provide additional security (e.g. AES in DES).
3
Symmetric Block Cipher
• DES divides the plain text into the number of blocks, each of 64-bit. DES
operates on one block of plain text at a time. Key of 56-bit is applied to
each block of plain text to produce its corresponding ciphertext of 64-bit.
4
Block Cipher Principles
A block cipher is designed by considering its three critical aspects which are
listed as below:
1. Number of Rounds
2. Design of Function F
5
Block Cipher Principles
1. Number of Rounds
• The higher the number of rounds, the more powerful the algorithm. It is
difficult to break the algorithm.
2. Design of Function F
• The function F of the block cipher must be designed such that it must be
impossible for any cryptanalysis to analyze the substitution.
6
Block Cipher Principles
1. Number of Rounds
• The higher the number of rounds, the more powerful the algorithm. It is
difficult to break the algorithm.
2. Design of Function F
• The function F of the block cipher must be designed such that it must be
impossible for any cryptanalysis to analyze the substitution.
7
Advanced Encryption Standard AES
History
• In 1997, NIST started looking for replacement for DES, which would
be called the Advanced Encryption Standard or AES.
• The NIST(National Institute of Standards and Technology)
specifications required a block size of 128 bits and three different key
sizes of 128, 192, and 256 bit.
• In February 2001, NIST announced that draft of the Federal
Information Processing Standard (FIPS) was available for public
review and comment.
• Finally, AES was published as FIPS in the Federal Register in
December 2001.
8
Advanced Encryption Standard AES
KEY POINTS
• AES is a block cipher intended to replace DES for commercial
applications.
• It uses a 128-bit block size and a key size of 128, 192, or 256 bits.
• AES does not use a Feistel structure. Instead, each full round consists of
four separate functions: byte substitution, permutation, arithmetic
operations over a finite field, and XOR with a key.
ROUNDS
• AES use 10,12, or 14 round.
• The key size which can be 128, 192, or 256 bits depends on the number
of rounds.
• AES has defined three versions, with 10, 12, and, 14 rounds.
• Each version uses a different cipher key size (128, 192, or 256)but the
round keys are always 128 bits.
9
Advanced Encryption Standard AES
10
Advanced Encryption Standard AES
Encryption Process
• State
• Shift rows
• Mix Columns
11
Advanced Encryption Standard AES
State: the plaintext fed to AES, and that is then manipulated until it
becomes the ciphertext, is internally represented as a square of 4 rows and
4 columns. This AES internal square representation is called a state.
12
Advanced Encryption Standard AES
• The left digit defines the row and the right digit defines the column of
the substituted table.
• The two hexadecimal digits at the junction of the row and the column are
the new byte.
13
Advanced Encryption Standard AES
14
Advanced Encryption Standard AES
15
Advanced Encryption Standard AES
Shiftrows
• Each of the four rows of the matrix is shifted to the left. The shift is
carried out as follows :-
• The result is a new matrix consisting of the same 16 bytes but shifted
with respect to each other.
16
Advanced Encryption Standard AES
Shiftrows
17
Advanced Encryption Standard AES
MixColumns
18
Advanced Encryption Standard AES
Addroundkey
• The 16 bytes of the matrix are now considered as 128 bits and are
XORed to the 128 bits of the round key. If this is the last round then the
output is the ciphertext. Otherwise, the resulting 128 bits are interpreted
as 16 bytes and we begin another similar round.
19
Playfair Cipher
HISTORY
invented by Wheatstone on 26 March 1854,but it was promoted by Lord
Playfair.
Lord Playfair
20
Playfair Cipher
• The best-known multiple-letter encryption cipher is the playfair, which
treats diagrams in the plaintext as single units and translates these units
into ciphertext diagrams.
• The Playfair algorithm is based on the use of a 5 x 5 matrix of letters
constructed using a keyword.
ENCRYPTION RULES
1.Fill the Matrix with the keyword, drop duplicates.
2. Filling in the remainder of the matrix with the remaining letters in
alphabetic order.
3.Plaintext is encrypted two letters at a time.
4.The letters I and J count as one letter.
5.Use the Playfair Rules to map the message to the matrix.
21
Playfair Cipher
Rules
❑First,
a plaintext message is split into pairs of two letters (digraphs). If there is
an odd number of letters, a Z is added to the last letter. Let us say we want to
encrypt the message “Shekhan". It will be written as - Sh ek ha nZ
❑Separate all duplicated letters by inserting letter “X”
❑Ignore all spaces
The rules of encryption are -
❑Ifboth the letters are in the same column, take the letter below each one
(going back to the top for decryption)
❑Ifboth letters are in the same row, take the letter to the right of each one
(going back to the left for decryption)
❑If neither of the preceding two rules is true, form a rectangle with the two
letters and take the letters on the horizontal opposite corner of the rectangle.
22
Playfair Cipher
• Example
• Plaintext : I will see you there
d r e a m
• encryption key : dream
b c f g h
Iw il ls ee yo ut he re i k l n o
double letters which occur in p q s t u
a pair must be divided by an X. v w x y z
➢Plaintext : IW IL LS EX EY OU TH ER EZ
➢ Ciphertext : KV KN SX FE AX UZ UG AE MX
23
Playfair Cipher
24
• Stream cipher
• Vigenère cipher
25