Lecture 03
Lecture 03
and Network
Security
Sixth Edition
by William Stallings
Chapter 3
A block of plaintext
is treated as a
Typically a block
whole and used to
size of 64 or 128
produce a
bits is used
ciphertext block of
equal length
The majority of
As with a stream
network-based
cipher, the two
symmetric
users share a
cryptographic
symmetric
applications make
encryption key
use of block ciphers
Stream Cipher and Block Cipher
Modern Block Ciphers
Diffusion
• The statistical structure of the plaintext is dissipated into long-range statistics of the
ciphertext
• This is achieved by having each plaintext digit affect the value of many ciphertext digits
Confusion
• Seeks to make the relationship between the statistics of the ciphertext and the value of
the encryption key as complex as possible
• Even if the attacker can get some handle on the statistics of the ciphertext, the way in
which the key was used to produce that ciphertext is so complex as to make it difficult to
deduce the key
Feistel Cipher Structure
Feistel Cipher Design Features
• Block size • Round function F
• Larger block sizes mean greater • Greater complexity generally
security but reduced means greater resistance to
encryption/decryption speed for cryptanalysis
a given algorithm
• Key size • Fast software
encryption/decryption
• Larger key size means greater
security but may decrease • In many cases, encrypting is
encryption/decryption speeds embedded in applications or
utility functions in such a way as
• Number of rounds to preclude a hardware
• The essence of the Feistel cipher implementation; accordingly,
is that a single round offers the speed of execution of the
inadequate security but that algorithm becomes a concern
multiple rounds offer increasing • Ease of analysis
security
• If the algorithm can be concisely
• Subkey generation algorithm and clearly explained, it is easier
• Greater complexity in this to analyze that algorithm for
algorithm should lead to greater cryptanalytic vulnerabilities and
difficulty of cryptanalysis therefore develop a higher level
of assurance as to its strength
Feistel Example
Data Encryption Standard (DES)
• Issued in 1977 by the National Bureau of Standards (now NIST) as
Federal Information Processing Standard 46
• Was the most widely used encryption scheme until the
introduction of the Advanced Encryption Standard (AES) in 2001
• Algorithm itself is referred to as the Data Encryption Algorithm
(DEA)
• Data are encrypted in 64-bit blocks using a 56-bit key
• The algorithm transforms 64-bit input in a series of steps into a 64-bit
output
• The same steps, with the same key, are used to reverse the encryption
DES
Encryption
Algorithm
Bit Permutation (1-to-1)
1 2 3 4 32
Input: 0 0 1 0 ……. 1
1 bit
Output 1 0 1 1 …….. 1
22 6 13 32 3
Bits Expansion (1-to-m)
1 2 3 4 5 32
Input: 0 0 1 0 …….
1 1
Output
1 0 0 1 0 1 0 1 …….. 1 0
1 2 3 4 5 6 7 8 4
Initial and Final Permutations
2 bits I1
row I2
I3 Si O1
O2
I4 O3
I5 O4
4 bits I6
column i = 1,…8.
Substitution Boxes S
DES
Example
Note: DES subkeys are shown as eight 6-bit values in hex format
Table 3.3 Avalanche Effect in DES: Change in Plaintext
Table 3.4 Avalanche Effect in DES: Change in Key
Avalanche in DES
Avalanche Effect
• Timing attacks
• One in which information about the key or the
plaintext is obtained by observing how long it takes a
given implementation to perform decryptions on
various ciphertexts
• Exploits the fact that an encryption or decryption
algorithm often takes slightly different amounts of time
on different inputs
• So far it appears unlikely that this technique will ever
be successful against DES or more powerful symmetric
ciphers such as triple DES and AES
Block Cipher Design Principles:
Number of Rounds
In general, the
criterion should be
If DES had 15 or
that the number of
The greater the fewer rounds,
rounds is chosen so
number of rounds, differential
that known
the more difficult it cryptanalysis would
cryptanalytic efforts
is to perform require less effort
require greater
cryptanalysis than a brute-force
effort than a simple
key search
brute-force key
search attack
Block Cipher Design Principles:
Design of Function F
• The heart of a Feistel The algorithm should have good
block cipher is the avalanche properties
function F
• The more nonlinear F, Bit
the more difficult any Strict avalanche
independence
type of cryptanalysis criterion (SAC)
criterion (BIC)
will be
•The SAC and BIC States that any output bit States that output bits j
criteria appear to j of an S-box should
change with probability
and k should change
strengthen the 1/2 when any single
independently when
any single input bit i is
effectiveness of the input bit i is inverted for
all i , j
inverted for all i , j , and
k
confusion function
Block Cipher Design Principles:
Key Schedule Algorithm
• With any Feistel block cipher, the key is used to generate one
subkey for each round
• In general, we would like to select subkeys to maximize the
difficulty of deducing individual subkeys and the difficulty of
working back to the main key
• It is suggested that, at a minimum, the key schedule should
guarantee key/ciphertext Strict Avalanche Criterion and Bit
Independence Criterion
Data Encryption Standard (DES)