Week 4
Week 4
•Block Cipher
•Fiestel Structure
Confusion vs. Diffusion
•Claude Shannon in his classic 1949 paper,
Communication theory of secrecy systems,
introduced the concepts of confusion and diffusion.
Key = K = GYBNQKURP
Ciphertext = POH
Block Cipher: Hill Cipher
To decrypt the message, we turn the ciphertext back into
a plain text, then simply multiply by the inverse matrix of
the key matrix.
Block Cipher: Hill Cipher
To decrypt the message, we turn the ciphertext back into
a plain text, then simply multiply by the inverse matrix of
the key matrix.
Hill Cipher
• The Hill Cipher was invented by Lester S. Hill in 1929,
and like the other Digraphic Ciphers it acts on groups
of letters.
Ciphertext = APADJTFTWLFJ
TFTWLFJ
Hill Cipher: Decryption
Hill Cipher: Decryption
In general, to find the inverse of the key matrix, we perform
the calculation below, where K is the key matrix, d is the
determinant of the key matrix and adj(K) is the adjugate
matrix of K.
Hill Cipher: Decryption
Step 1 - Find the Multiplicative Inverse of the Determinant
L1 = 0001
R1 = 0101
Feistel Structure: Decryption
Decryption in a Feistel cipher is performed in a similar
manner to encryption but with a key schedule in reverse
order.
Feistel Structure: Decryption Example
• Cipher text = 0100 0101 (=69 = E)
• Keys: 2, 7, 5
• Encryption Function = AND operation
Feistel Structure: Exercise
• Using Feistel Block Cipher Encryption technique with
two rounds, encrypt the following plaintext.
• Plaintext: 1001 0011
• K1 : 1110
• K2 : 1011
• F is defined as follows: AND operation
Feistel Structure: Exercise
• Step 1: Split the Plaintext
• Split the plaintext into two halves
Feistel Structure: Exercise
• Round 1:
Feistel Structure: Exercise
• Round 2:
Feistel Structure: Exercise
• Combine the halves
Key Schedule
•A key schedule is an algorithm that calculates all the
round keys from the master key in cryptography
algorithms.
•Generating round keys from the master key in a
Feistel cipher typically involves using a key schedule
algorithm.
•The key schedule algorithm takes the master key as
input and generates a set of round keys, one for each
round of the Feistel cipher.
Key Schedule
•The round keys are derived from the master key
through a series of operations, including
permutations, substitutions, and bit shifts, to ensure
that each round key is unique and contributes to the
security of the encryption.
Key Schedule Methods
•Simple Key Expansion: This basic method involves
duplicating the master key to create multiple round
keys. Each round key is simply a copy of a portion of
the master key, ensuring that each round uses a
different part of the key. However, this method is not
very secure and is susceptible to various attacks.
•Round Key Derivation: In this method, each round
key is derived from the master key using a specific
function or operation. This function can involve bit
permutations, bitwise operations (e.g., XOR, AND,
OR), and mathematical operations. Examples include
the key schedule in DES (Data Encryption Standard)
and its variants.
Key Schedule Methods
•Subkey Generation: Subkey generation methods
involve creating round keys from the master key by
dividing the key into smaller subkeys and applying
various transformations to each subkey. These
transformations can include substitution,
permutation, and rotation operations. Subkey
generation methods are often used in modern block
ciphers like AES (Advanced Encryption Standard).
Key Schedule Methods
•Cryptographic Hash Functions: Some ciphers use
cryptographic hash functions to generate round keys.
The master key is used as the input to a hash
function, and the resulting hash value is split into
round keys. This method enhances security and
unpredictability, as hash functions are designed to
produce unique outputs for different inputs.
Key Schedule Methods
•Key Whitening: Key whitening is a method where
the master key is combined with additional random
or derived key material before being used as a round
key. This additional key material is often referred to
as a "whitening key." Whitening helps protect against
certain types of attacks and adds an extra layer of
security.
•Feistel Key Mixing: In some Feistel ciphers, a mixing
function is applied to the master key to create round
keys. The mixing function can involve a combination
of bitwise operations and mathematical operations.
The result is used as a round key.
Summary
• Block Cipher
• Feistel Network