1 of 42

MODULE 2

SYMMETRIC CIPHERS: Traditional Block Cipher structure, Data encryption standard (DES), The AES Cipher.

(Text 1: Chapter 2: Section1, 2, Chapter 4: Section 2, 3, 4)

Text Books:

  1. William Stallings , “Cryptography and Network Security Principles and Practice”, Pearson

Education Inc., 6th Edition, 2014, ISBN: 978-93-325-1877-3

2. Bruce Schneier, “Applied Cryptography Protocols, Algorithms, and Source code in C”, Wiley

Publications, 2nd Edition, ISBN: 9971-51-348-X.

Reference Books:

1. Cryptography and Network Security, Behrouz A. Forouzan, TMH, 2007.

2. Cryptography and Network Security, Atul Kahate, TMH, 2003.

2 of 42

Feistel Cipher Structure

  • Horst Feistel devised the feistel cipher
    • based on concept of invertible product cipher
  • partitions input block into two halves
    • process through multiple rounds which
    • perform a substitution on left data half
    • based on round function of right half & subkey
    • then have permutation swapping halves

2

3 of 42

Feistel Cipher Structure

  • Block size: larger block sizes mean greater security
  • Key Size: larger key size means greater security
  • Number of rounds: multiple rounds offer increasing security
  • Subkey generation algorithm: greater complexity will lead to greater difficulty of cryptanalysis.
  • Fast software encryption/decryption: the speed of execution of the algorithm becomes a concern

3

4 of 42

Henric Johnson

4

5 of 42

Feistel Cipher Decryption

5

6 of 42

6

Wednesday, September 22, 2021

Simplified Data Encryption Standard

The encryption algorithm involves five functions:

  1. An initial permutation (IP);

  • A complex function labeled fK , which involves both permutation and substitution operations and depends on a key input;

  • A simple permutation function that switches (SW) the two halves of the data;

  • The function fK again; And finally

  • A permutation function that is the inverse of the initial permutation (IP –1).

7 of 42

7

Wednesday, September 22, 2021

Algorithm

Key Generation

8 of 42

9 of 42

9

Wednesday, September 22, 2021

circular left shift (LS-1), or rotation, separately on the first five bits and the second five bits.

K1 = (10100100)

(00001 11000)

(00001 11000)

perform a circular left shift of 2 bit positions on each pair of 5-bit strings

(00100 00011)

10 of 42

10

Wednesday, September 22, 2021

K2 = (01000011)

(00100 00011)

S-DES Encryption

1 & 5) Initial and Final Permutations:

11 of 42

11

Wednesday, September 22, 2021

The Function fK

output of the IP stage = (10111101) and F(1101, SK) = (1110)

(01011101)

12 of 42

12

Wednesday, September 22, 2021

13 of 42

Conventional Encryption Algorithms

  • Data Encryption Standard (DES)
    • The most widely used encryption scheme
    • The algorithm is reffered to the Data Encryption Algorithm (DEA)
    • DES is a block cipher
    • The plaintext is processed in 64-bit blocks
    • The key is 56-bits in length

13

14 of 42

14

Wednesday, September 22, 2021

Data Encryption Standard

15 of 42

15

Wednesday, September 22, 2021

Initial 64 Bit Data

16 of 42

16

Wednesday, September 22, 2021

Initial Permutation (IP)

17 of 42

17

Wednesday, September 22, 2021

Inverse Initial Permutation (IP-1)

18 of 42

18

Wednesday, September 22, 2021

Single Round of DES Algorithm

19 of 42

19

Wednesday, September 22, 2021

Expansion Permutation (E)

20 of 42

20

Wednesday, September 22, 2021

21 of 42

21

Wednesday, September 22, 2021

Permutation Function (P)

22 of 42

22

Wednesday, September 22, 2021

Key Generation

23 of 42

23

Wednesday, September 22, 2021

24 of 42

24

Wednesday, September 22, 2021

25 of 42

25

The Avalanche Effect

26 of 42

26

Wednesday, September 22, 2021

The AES Cipher (Rijndael)

Dr. Joan Daemen and Dr. Vincent Rijmen

27 of 42

27

Wednesday, September 22, 2021

28 of 42

28

Wednesday, September 22, 2021

  1. Feistel Structure is not used.
  2. Key Expansion provides Four distinct keywords(128 bits) which serve as round key for each round.
  3. Four Different stages in first 9 rounds: One Permutation and Three Substitution.
  4. The Structure is Quite simple.
  5. Only the AddRoundKey stage makes use of the key. For this reason, the cipher begins and ends with an AddRoundKey stage.
  6. Each stage is easily reversible.

29 of 42

29

Wednesday, September 22, 2021

30 of 42

30

Wednesday, September 22, 2021

31 of 42

31

Wednesday, September 22, 2021

32 of 42

32

Wednesday, September 22, 2021

33 of 42

33

Wednesday, September 22, 2021

34 of 42

34

Wednesday, September 22, 2021

35 of 42

35

Wednesday, September 22, 2021

36 of 42

36

Wednesday, September 22, 2021

37 of 42

37

Wednesday, September 22, 2021

38 of 42

38

Wednesday, September 22, 2021

AddRoundKey Transformation

39 of 42

39

Wednesday, September 22, 2021

40 of 42

40

Wednesday, September 22, 2021

AES Key Expansion

KeyExpansion([Key0 to Key15], [w0 to w43])

{

for(i= 0 to 3)

wi🡨Key4i +Key4i+1 + Key4i+2 + Key4i+3

for(i=4 to 43)

{

if(i mod 4 ≠ 0)

wi 🡨wi-1+ wi-4

else

{

t🡨Subword(Rotword(wi-1)) + Rcon[i/4]

wi🡨t + wi-4

}}

}

41 of 42

41

Wednesday, September 22, 2021

42 of 42