Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Cryptography & Network Security

Subject Code: KCS074

Pankaj Kumar
Assistant Professor

Department of Computer Science & Engineering


Pranveer Singh Institute of Technology, Kanpur, India

October 30, 2023


Block vs Stream Ciphers

• Block ciphers process messages in blocks, each of which is then en-


crypted/decrypted like a substitution on very big characters, e.g., 64-
bits or more.
• stream ciphers process messages a bit or byte at a time when encrypt-
ing/decrypting
• Many current ciphers are block ciphers
• Better analysed
• Broader range of applications

Pankaj Kumar October 30, 2023 2/19


Symmetric ciphers (Stream Cipher)

• Call the plaintext stream P, the ciphertext stream C, and the key stream
K.
• Stream ciphers process messages a bit or byte at a time when encrypt-
ing/decrypting
• Many current ciphers are block ciphers

Pankaj Kumar October 30, 2023 3/19


Symmetric ciphers (Block Cipher)

• In a block cipher, a group of plaintext symbols of size m (m > 1) are


encrypted together creating a group of ciphertext of the same size.
• A single key is used to encrypt the whole block even if the key is made
of multiple values. The below figure shows the concept of a block
cipher.

Pankaj Kumar October 30, 2023 4/19


Symmetric ciphers (Block Cipher)

• A symmetric key modern block cipher encrypts an n bit block of plain-


text or decrypts an n bit block of ciphertext.
• The encryption or decryption algorithm uses a k-bit key.

Pankaj Kumar October 30, 2023 5/19


Block Cipher Principles

• Most of the symmetric block ciphers are based on a Feistel Cipher


Structure.
• Block ciphers look like an extremely large substitution.
• Would need table of 264 entries for a 64-bit block.
• Instead create from smaller building blocks.
• Using idea of a product cipher.

Pankaj Kumar October 30, 2023 6/19


Ideal Block Cipher

Pankaj Kumar October 30, 2023 7/19


Claude Shannon and Substitution-Permutation
Ciphers

• Claude Shannon introduced the idea of substitution-permutation (S-P)


networks in 1949 paper
• Form basis of modern block ciphers
• S-P nets are based on the two primitive cryptographic operations seen
before:
• Substitution (S-box)
• Permutation (P-box)
• Provide confusion and diffusion of message and key

Pankaj Kumar October 30, 2023 8/19


Shannon’s Theory of Confusion and Diffusion

• Shannon introduced the concept of a product cipher. A product cipher


is a complex cipher combining substitution, permutation, and other
components.
• Diffusion: The idea of diffusion is to hide the relationship between the
ciphertext and the plaintext.

Pankaj Kumar October 30, 2023 9/19


Shannon’s Theory of Confusion and Diffusion

• Confusion: The idea of confusion is to hide the relationship between


the cipher-text and the key.
• Round: Diffusion and confusion can be achieved using iterated product
ciphers where each iteration is a combination of S − boxes, P − boxes,
and other components.

Pankaj Kumar October 30, 2023 10/19


A product cipher made of two rounds

Pankaj Kumar October 30, 2023 11/19


Classes of Product Cipher

Modern block ciphers are all product ciphers, but they are divided into two
classes.
1 Feistel ciphers
2 Non-Feistel ciphers
• Feistel Ciphers: Feistel designed a very intelligent and interesting
cipher that has been used for decades. A Feistel cipher can have three
types of components: self-invertible, invertible, and noninvertible.

Pankaj Kumar October 30, 2023 12/19


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 & sub-key.
• Then have permutation swapping halves
• Implements Shannon’s S − P net concept

Pankaj Kumar October 30, 2023 13/19


Feistel Cipher Structure

Pankaj Kumar October 30, 2023 14/19


Feistel Cipher Elements

• Block size
• Key size
• Number of rounds
• Subkey generation algorithm
• Round function
• Fast software encryption/decryption
• Ease of analysis

Pankaj Kumar October 30, 2023 15/19


Feistel Cipher Elements

• Block size: Larger block sizes mean greater security. But, reduced
encryption/decryption speed. Greater security is achieved by greater
diffusion. Block size of 64 bits has been considered a reasonable. How-
ever, the new AES uses a 128-bit block size.
• Key size: Larger key size means greater security but may decrease
encryption/decryption speed. Greater confusion. Key sizes of 64 bits
or less are now widely considered to be inadequate, and 128 bits has
become a common size.
• Number of rounds: The essence of the Feistel cipher is that a single
round offers inadequate security but that multiple rounds offer increas-
ing security. A typical size is 16 rounds.

Pankaj Kumar October 30, 2023 16/19


Feistel Cipher Elements

• Subkey generation algorithm: Greater complexity should lead to


greater difficulty of cryptanalysis.
• Round function: Greater complexity means greater resistance to crypt-
analysis.
• Fast software encryption/decryption: Speed of execution of the
algorithm becomes a concern.
• Ease of analysis: If the algorithm can be concisely and clearly ex-
plained, it is easier to analyze that algorithm for cryptanalytic vul-
nerabilities and therefore develop a higher level of assurance as to its
strength.

Pankaj Kumar October 30, 2023 17/19


Feistel cipher with two rounds

Pankaj Kumar October 30, 2023 18/19


Thank You!

Pankaj Kumar October 30, 2023 19/19

You might also like