L6block Ciphers
L6block Ciphers
(CSE348)
1
Lecture # 6
2
Review
• have considered:
– classical cipher techniques and terminology
– monoalphabetic substitution ciphers
– cryptanalysis using letter frequencies
– Playfair cipher
– polyalphabetic ciphers
– transposition ciphers
– product ciphers and rotor machines
– stenography
3
Chapter 3
4
Block Ciphers and the Data Encryption
Standard
5
Modern Block Ciphers
now look at modern block ciphers
one of the most widely used types of cryptographic
algorithms
provide secrecy /authentication services
focus on DES (Data Encryption Standard)
We will see block cipher design principles
6
Block vs Stream Ciphers
• block ciphers process messages in blocks, each of
which is then en/decrypted
• like a substitution on very big characters
– 64-bits or more
• stream ciphers process messages a bit or byte at a
time when en/decrypting
• many current ciphers are block ciphers
– better analysed
– broader range of applications
7
Block vs Stream Ciphers
8
Block vs Stream Ciphers
9
Block vs Stream Ciphers
10
Block Cipher Principles
Most symmetric block ciphers are based on a Feistel
Cipher Structure
needed since must be able to decrypt ciphertext to
recover messages efficiently
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
11
Block Cipher Principles
A block cipher operates on a plaintext block of n bits
to produce a ciphertext block of n bits
13
Ideal Block Cipher
14
Ideal Block Cipher
Feistel refers to an n-bit general substitution as
an ideal block cipher
16
Claude Shannon and Substitution-
Permutation Ciphers
Feistel proposed that we can approximate the ideal
block cipher by utilizing the concept of a product
cipher
17
Claude Shannon and Substitution-
Permutation Ciphers
In particular, Feistel proposed the use of a cipher
that alternates substitutions and permutations
18
Claude Shannon and Substitution-
Permutation Ciphers
Claude Shannon’s 1949 paper has the key ideas that
led to the development of modern block ciphers
19
Claude Shannon and Substitution-
Permutation Ciphers
Claude Shannon introduced 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 & diffusion of message & key
20
Confusion and Diffusion
• The terms diffusion and confusion were introduced
by Claude Shannon
• To capture the two basic building blocks for any
cryptographic system
21
Confusion and Diffusion
• where the transformation depends on the key
22
Confusion and Diffusion
• Confusion seeks to make the relationship
between:
23
Confusion and Diffusion
• So successful are diffusion and confusion
24
Confusion and Diffusion
• cipher needs to completely obscure statistical
properties of original message
25
Confusion and Diffusion
• diffusion – dissipates statistical structure of
plaintext over bulk of ciphertext
26
Feistel Cipher Structure
• Horst Feistel, working at IBM Thomas J Watson
Research Labs
• devised a suitable invertible cipher structure in
early 70's.
• One of Feistel's main contributions was the
invention of a suitable structure
• which adapted Shannon's S-P network in an easily
inverted structure
27
Feistel Cipher Structure
28
Feistel Cipher Structure
• It partitions input block into two halves which
are processed through multiple rounds
29
Feistel Cipher Structure
• Essentially the same h/w or s/w is used for
both encryption and decryption
30
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
• implements Shannon’s S-P net concept
31
Feistel Cipher Structure
• Figure illustrates the classical feistel cipher
structure, with data split in 2 halves
32
Feistel Cipher Structure
• The LHS side of this figure shows the flow
during encryption, the RHS in decryption
33
Feistel Cipher Structure
• The plaintext block is divided into two
halves, L0 and R0
34
Feistel Cipher Structure
• Each round i has as inputs Li–1 and Ri–1,
derived from the previous round, as well as
a subkey Ki, derived from the overall K
36
Feistel Cipher Structure
• This is a nice feature because it means we
need not implement two different
algorithms
• one for encryption and one for decryption
37
Feistel Cipher Structure
• noting that at every round
38
Feistel Cipher Structure
39
Feistel Cipher Design Elements
block size
key size
number of rounds
subkey generation algorithm
round function
fast software en/decryption
ease of analysis
40
Feistel Cipher Design Elements
The exact realization of a Feistel network depends on
the choice of the following parameters and design
features:
41
Feistel Cipher Design Elements
number of rounds - increasing number improves
security, but slows cipher
42
Feistel Cipher Design Elements
fast software en/decryption - more recent concern
for practical use
43
Summary
• have considered:
– block vs stream ciphers
– Feistel cipher design & structure
44