















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















1
2
- Historical Ciphers - Substitution Cipher - Monoalphabetic - Polyalphabetic - Letter Frequency Analysis - One Time Pad
3
4
Levels of Security
5
Levels of Security
6
Data Encryption Standard
10
Life of DES
DES developed by IBM and NSA In common use for over 20 years
(^1970 1980 1990 2000) Time
Federal and banking standard
transision to a new standard
Over 300 validated implementations
De facto world-wide standard
11
1980 1990 2000 2010 2020 2030
DES^ Triple DES American AES - Rijndael standards
Other popular algorithms
IDEA
AES contest
1977 1999
2001
Blowfish
RC
CAST
Twofish RC Mars
Serpent
128, 192, and 256 bit keys
56 bit key
112, 168 bit keys
12
DES - external look
plaintext block
ciphertext block
key
13
Recall: S-P Networks
....
....
.... .............
14
Confusion / Diffusion
- Confusion - relationship between cleartext and ciphertext is obscured - e.g. substitution (Shift Cipher, Enigma) - Diffusion - spreading influence of one cleartext letter to many ciphertext letters - e.g. permutations
15
Recall: Avalanche effect
....
....
.... ............. m 1 m 2 m 3 m 4 m 5 m 6 m 7 m 8 m 9 m 10 m 11 m 12
m 61 m 62 m 63 m 64
m 1 → c 1 → c 1 c 2 → c 2 c 3 c 4 c 5 → c 5 c 6 c 7 → c 7 c 8 → c 8 c 9 c1 0 c1 1 → c 11 c1 2
c6 1 → c 61 c6 2 c6 3 c6 4 → c 64
19
Ln+1=Rn Rn+1=Ln⊕ f(Rn, Kn+1)
L 0 R 0 f K 1
L 1 f K 2
L 2 R 2
L 15 R 15 f K 16
R 16 L 16
IP-
IP
R 1
20
Ln Rn f
Ln+1 Rn+
Kn+
Ln Rn f
Ln+1 Rn+
Kn+
f Kn+
Feistel Structure
??
??
Ln+1, Rn+
Ln, Rn
21
L 0 R 0 f K 1
L 1 f K 2
L 2 R 2
L 15 R 15 f K 16
R 16 L 16
IP
IP-
R 1
R 16 L 16 f K 16
R 15 f K 15
R 14 L 14
R 1 L 1 f K 1
L 0 R 0
IP-
IP
L 15
22
Mangler Function of DES, F
23
24
i 1 i 2 i 3 i 4 i 5 i 6 i 7 i 8 i 9 i 10 … i 56 i 57 i 58 i 59 i 60 i 61 i 62 i 63 i 64
i 58 i 50 i 42 i 34 i 26 i 18 i 10 i 2 … i 5 i 63 i 55 i 47 i 39 i 31 i 23 i 15 i 7
Input
Output
28
29
**1. Randomness
30
Completeness property
Every output bit is a complex function of all input bits (and not just a subset of input bits)
Formal requirement:
For all values of i and j, i=1..64, j=1.. there exist inputs X 1 and X 2 , such that
X 1 x 1 x 2 x 3... xi-1 0 xi+1... x 63 x 64 X 2 x 1 x 2 x 3... xi-1 1 xi+1... x 63 x 64
Y 1 = DES(X 1 ) y 1 y 2 y 3... yj-1 yj yj+1... y 63 y 64 Y 2 = DES(X 2 ) y 1 ’ y 2 ’ y 3 ’... yj-1’ yj yj+1’... y 63 ’ y 64 ’
31
Linear Transformations
Transformations that fulfill the condition:
T(X[m x 1]) = Y[n x 1] = A[n x m] ⋅ X[m x 1]
or T(X 1 ⊕ X 2 ) = T(X 1 ) ⊕ T(X 2 )
Affine Transformations
Transformations that fulfill the condition:
T(X[m x 1]) = Y[n x 1] = A[n x m] ⋅ X[m x 1] ⊕ B[n x 1]
32
Linear Transformations of DES
IP, IP-1, E, PC1, PC2, SHIFT
e.g., IP(X 1 ⊕ X 2 ) = IP(X 1 ) ⊕ IP( X 2 )
Non-Linear and non-affine transformations of DES
S There are no such matrices A[4x6] and B[4x1] that
S(X[6x1]) = A[4x6] ⋅ X[6x1] ⊕ B[4x1]
33
Design of S-boxes
in out = S[in]
- 16! ≈ 2 ⋅ 1013 possibilities - precisely defined initially unpublished criteria - resistant against differential cryptanalysis (attack known to the designers and rediscovered in the open research in 1990 by E. Biham and A. Shamir)
37
38
Stream cipher
memory Block cipher
K K
M 1 , M 2 , …, MN m 1 , m 2 , …, mN
C 1 , C 2 , …, CN c 1 , c 2 , …, cN Ci=fK(Mi) ci = fK(mi, mi-1, …, m 2 , m 1 ) Every block of ciphertext is a function of only one corresponding block of plaintext
Every block of ciphertext is a function of the current and all preceding blocks of plaintext
IS 1 = IV
ci = O(ISi, mi) ISi+1 = NS(ISi, mi)
39
Sender Receiver
P seudorandom K ey G enerator
mi plaintext
ci ciphertext
ki keystream
key initialization vector
P seudorandom K ey G enerator
mi plaintext
ci ciphertext
ki keystream
key initialization vector
40
ECB mode Counter mode OFB mode CFB mode CBC mode
41
ECB (Electronic CodeBook) mode
42
K K K K^ K
46
IN
OUT
counter
IV
(^1) L ci
mi
IN
OUT
counter
IV
(^1) L ci
mi
(^1) L 1 L
IS 1 = IV
ci = EK(ISi) ⊕ mi ISi+1 = ISi+
47
m 1 m 2 m 3
mN-1 mN
c 1 c 2 c 3 cN-1 cN
k 1 k 2 k 3 kN-1 kN
K K K^ K^ K
j j j^ j^ j
j (^) j j j j
j j j j j
48
j bits L-j bits
IN
OUT
counter
IV
1 j (^) L ci
mi
j bits L-j bits
IN
OUT
counter
IV
1 j (^) L ci
mi
(^1) L 1 L
49
OFB (Output FeedBack) Mode
50
m 1 m 2 m 3
mN-1 mN
c 1 c 2 c 3 cN-1 cN
k 1 k 2 k 3 kN-1 kN
51
c 1 c 2 c 3
cN-1 cN
m 1 m 2 m 3 mN-1 mN
k 1 k 2 k 3 kN-1 kN
55
m 1 m 2 m 3
mN-1 mN
c 1 c 2 c 3 cN-1 cN
56
m 1 m 2 m 3
mN-1 mN
c 1 c 2 c 3 cN-1 cN
57
IN
OUT (^1) L
ci
mi
IN
OUT (^1) L
ci
mi
1 L (^1) L
IV^ IV
IS 1 = IV
ci = EK(ISi) ⊕ mi ISi+1 = ci
58
j bits L-j bits
IN
OUT 1 j (^) L
ci
mi
j bits L-j bits
IN
OUT 1 j (^) L
ci
mi
L-j bits j bits L-j bits j bits
shift shift
1 L-j L (^1) L-j L
IV^ IV
59
CBC (Cipher Block Chaining) Mode
60
m 1 m 2 m 3
mN-1 mN
...
c 1 c 2 c 3 cN-1 cN