0% found this document useful (0 votes)
28 views25 pages

Lecture 6 IS (TH)

Uploaded by

tarahashem1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views25 pages

Lecture 6 IS (TH)

Uploaded by

tarahashem1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

INFORMATION SECURITY

LECTURE 6

Symmetric Block Cipher

Awf Abdulrahman Ramadhan


MSc of Software Engineering
OUTLINE

➢ Symmetric Block Cipher


➢ Advanced Encryption Standard AES
➢ Playfair Cipher

2
Symmetric Block Cipher

• Block cipher is an encryption and decryption method which operates on the


blocks of plain text, instead of operating on each bit of plain text separately.

• Each block is of equal size and has fixed no of bits.

• The generated ciphertext has blocks equal to the number of blocks in


plaintext and also has the same number of bits in each block as of plain text.

• 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

• Data Encryption Standard (DES) is the best example of 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.

• During decryption also only one block of ciphertext is operated at a time to


produce its corresponding block plain text. In DES the decryption algorithm
is the same as the encryption one.

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

3. Key Schedule Algorithm

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.

• The non-linearity standard should be used, it will be difficult to break.

3. Key Schedule Algorithm

• The Key schedule should emphasize the criterion of bit independence.

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.

• The non-linearity standard should be used, it will be difficult to break.

3. Key Schedule Algorithm

• The Key schedule should emphasize the criterion of bit independence.

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

• Byte Substitution (Sub Bytes)

• Shift rows

• Mix Columns

• Add round key

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

Byte Substitution (Sub Bytes)

The 16 input bytes are substituted by looking up a fixed table (S-box)


given in design. The result is in a matrix of four rows and four columns.

• To substitution Byte, we interpret the byte as two hexadecimal digits.

• 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 first row is not shifted.

• The second row is shifted one (byte) position to the left.

• The third row is shifted two positions to the left.

• The fourth row is shifted three positions to the left.

• 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

Each column of four bytes is now transformed using a special


mathematical function. This function takes as input the four bytes of one
column and outputs four completely new bytes, which replace the original
column. The result is another new matrix consisting of 16 new bytes. It
should be noted that this step is not performed in the last round.

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

You might also like