Lecture#03-BLock Cipher and Data Encryption Standard
Lecture#03-BLock Cipher and Data Encryption Standard
Lecture#03
Block Ciphers and DES
(Modern Symmetric Ciphers)
Course: Cryptography & Network Security (CE-408)
Course Teacher: Dr. Rukaiya
Contact Info:
Email: [email protected]
1
Stream Cipher
For practical reasons the
In the ideal case, a one-time
bit-stream generator must
pad version of the Vernam
be implemented as an
cipher would be used, in
algorithmic procedure so
which the keystream is as
that the cryptographic bit
long as the plaintext bit
stream can be produced by
stream
Encrypts a digital both users
data stream one bit
If the cryptographic It must be
or one byte at a time keystream is random, then computationally
this cipher is unbreakable impractical to predict
by any means other than future portions of the
Examples: acquiring the keystream bit stream based on
• Autokeyed •Keystream must be previous portions of
Vigenère cipher provided to both users in the bit stream
• Vernam cipher advance via some
independent and secure
channel
•This introduces The two users need
insurmountable logistical only share the
problems if the intended generating key and
data traffic is very large each can produce the
keystream
2
Block Cipher
A block of
plaintext is
Typically, a
treated as a
block size of 64
whole and used
or 128 bits is
to produce a
used
ciphertext block
of equal length
The majority of
As with a
network-based
stream cipher,
symmetric
the two users
cryptographic
share a
applications
symmetric
make use of
encryption key
block ciphers
3
Key Bit stream Key Bit stream
(K) generation (K) generation
algorithm algorithm
ki ki
b bits b bits
Plaintext Ciphertext
Ciphertext Plaintext
b bits b bits
6
Feistel/Block Cipher Structure
• Reversible Transformation
• A block cipher operates on a PT block of n bits to produce a CT
blocks
• For encryption to be reversible or non-singular, each must
produce a unique CT block
Reversible Mapping
00 11
01 10
10 00
11 01
• Irreversible Transformation
• For the encryption to be irreversible or singular (decryption is
impossible) not all the PT block would have unique CT block
Reversible Mapping
00 11
01 10
10 01
11 01 7
Feistel Cipher
• Symmetric block encryption algorithms are referred to as
Feistel block cipher
9
Confusion
This will frustrate the adversary who uses CT to find the key. In
other words, if a single bit in the key is changed, most or all bit in
the CT will also be changed.
Even if the attacker can get some statistics of the CT, the way in
which the key was used to produce that ciphertext is so complex
as to make it difficult to deduce the key
10
Diffusion
• It is achieved through numerous permutations followed
by applying a function to that permutation
Example
12
Feistel Cipher Design Features/Parameters
• Block size
Larger block sizes mean greater security but reduced
encryption/decryption speed for a given algorithm
• Key size
Larger key size means greater security but may decrease
encryption/decryption speeds (greater confusion & resistance
to brute-force attack- now 128 bits key is common)
• Number of rounds
The essence of the Feistel cipher is that a single round offers
inadequate security but that multiple rounds offer increasing
security
• Subkey generation algorithm
Greater complexity in this algorithm should lead to greater
difficulty of cryptanalysis
13
Feistel Cipher Design Features
• Round function F
Greater complexity generally means greater resistance to
cryptanalysis (e.g., include S-boxes, permutation etc.)
• Fast software encryption/decryption
In many cases, encrypting is embedded in applications or
utility functions in such a way as to preclude a hardware
implementation; accordingly, the speed of execution of the
algorithm becomes a concern
• Ease of analysis
If the algorithm can be concisely and clearly explained, it is
easier to analyze that algorithm for cryptanalytic
vulnerabilities and therefore develop a higher level of
assurance as to its strength
14
Feistel Ciphers Mechanism (Example)
15
Data Encryption Standard (DES)
19
Details of Single Round of DES
20
DES Example
• Key = 0f1571c947d9e859
21
DES Example
• Plaintext = 02468aceeca86420
• Key = 0f1571c947d9e859
22
Permutation Choice
23
Details of Single Round of DES
24
DES Example
• Plaintext = 02468aceeca86420
1. Apply initial Permutation
25
26
27
DES Example
28
Table 4.3 Avalanche Effect in DES: Change in Plaintext 29
Table 4.4 Avalanche Effect in DES: Change in Plaintext 30
Table 4.5 : Average Time Required for Exhaustive Key Search
31
Strength of DES
Brute force attack is impractical with key length
of 56 bits as there are 256 possible keys or 7.2 ×
1016 keys
32
Security provided by DES
It depends on several factors
Mathematical Soundness
Length of Key
Key Management
Input data Formatting
Mode of Operation
Implementation
33
Block Cipher Principles: Number of Rounds
In general, the
criterion should be
that the number of If DES had 15 or
The greater the rounds is chosen so fewer rounds,
number of rounds, that known differential
the more difficult cryptanalytic cryptanalysis
it is to perform efforts require would require less
cryptanalysis greater effort than effort than a brute-
a simple brute- force key search
force key search
attack
34
Block Cipher Design Principles: Key
Scheduling Algorithm
35
Summary
36