Lecture 7: Block Ciphers (product ciphers, iterated ciphers, substitution-permutation networks, Feistel ciphers, standard security properties, DES, AES) Flashcards

1
Q

What type of cipher is a block cipher?

A

Symmetric key ciphers where each block of plaintext is encrypted with SAME key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the block in the block cipher?

A

set of plaintext symbols of fixed size

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the typical block size in modern block ciphers?

A

between 64 and 256 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give the notation of a plaintext block in a block cipher

A

P (length = n bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Give the notation of a ciphertext block in a block cipher

A

C (length = n bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give the notation of a key in a block cipher

A

K (length = k bits)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How is encryption denoted as in block ciphers?

A

C = E(P,K)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How is decryption denoted as in block ciphers?

A

P = D(C,K)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are Claude Shannon’s two important encryption techniques called?

A
  1. confusion

2. diffusion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the encryption technique of confusion?

A

involving substitution to make the relationship between K and C as complex as possible
→ mitigate possibilities of statistical analysis succeeding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the encryption technique of diffusion?

A

involving transformations to dissipate the statistical properties of P across C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Explain the product cipher

A

Cryptosystem where encryption is formed by applying (also composing) several sub-encryption functions

Most block ciphers are composition of simple functions fi, for 1 <= i <= r s.t. Each fi has its own key Ki → onion

C = E(P,K) = fr(…(f2(f1(P,K1),K2)…),Kr)

last output as 1st input for next round

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are modern block ciphers which are special product ciphers called?

A

Iterated ciphers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Briefly outline encryption for the iterated cipher

A

Encryption divided into r similar rounds

Given plaintext block P, round function g and round keys K1, K2, … Kr, ciphertext block C is derived through r rounds

Repeating with diff keys and same function

W0 = P
W1 = g(W0, K1) = g(P,K1)
W2 = g(W1,K2)
...
Wr = g(Wr-1,K1) = C
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Briefly outline how the sub-encryption functions of the iterated cipher

A

all the same function g, called round function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Briefly outline how the key Ki is derived i.t.o iterated cipher

A

Derived from overall master key K using key schedule process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is Ki call in terms of the iterated cipher

A

round key/subkey

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Explain decryption process for iterated cipher

A

Reverse of encryption process

Inverse function g-1 must exist s.t. g-1(g(W,Ki),Ki) = W for all keys Ki and blocks W

See slide 11 of set 7 for eqns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does SPN stand for?

A

Substitution-permutation network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What must block length n allow for in SPN?

A

each block to be split into m sub-blocks of length l → n = l x m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is AES an example of?

A

SPN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is SPN a type of?

A

iterated cipher

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the two operations of SPN?

A

Substitution πs

Permutation πp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is substitution πs in terms of SPN?

A

Substitution πs (substitution box/s-box) operates on sub-blocks of length l bits: πs : {0,1}’ → {0,1}’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is permutation πp in terms of SPN?
Permutation πp (permutation box/p-box) swaps inputs from {1,...,n} similarly to transposition ciphers: πp : {1,...,n} → {1,...,n}
26
What are the steps in the SPN round function?
1. Round key Ki is XORed with current state block Wi: Ki ⊕ Wi 2. Each sub-block is substituted by applying πs 3. The whole block is permuted using πp
27
Briefly explain the illustration of the round function on slide 15 of set 7
TODO
28
What type of cipher is the feistel cipher?
iterated cipher
29
What is DES an example of
feistel cipher
30
Briefly outline the round function of the feistel cipher
Swaps 2 halves of block and forms new right hand half
31
What is the feistel cipher sometimes called?
Feistel network
32
Explain the encryption process for the feistel cipher
1. Split plaintext block P = W_0 into 2 halves (L_0, R_0) 2. For each round, perform: Li = R_i-1 Ri = L_i-1 ⊕ f(R_i-1, K_i) 3. Output ciphertext block C = W_r = (L_r, R_r) See slide 17 of set 7 for diagram
33
Explain the decryption process for the feistel cipher
1. Split ciphertex block C into 2 halves (Lr, Rr) 2. For each round, perform: Li-1 = Ri ⊕ f(Li, Ki) Ri-1 = Li 3. Output plaintext block P = (L0,R0)
34
Do we need to invert f when decrypting for the feister cipher?
no decrypt for any function f
35
What aspect of the feister cipher makes is secure?
f since it's the only non-linear part of encryption
36
Briefly outline differential cryptanalysis
Chosen plaintext attack Based on idea that difference between 2 input plaintexts can be correlated to the difference between 2 output ciphertexts → since SPN has linearity in its design
37
Briefly outline linear cryptanalysis - what type of attack?
Known plaintext attack
38
Can linear cryptanalysis theoretically break DES?
yes
39
Are modern block ciphers immune to both differential and linear cryptanalysis?
yes
40
Explain what a key avalanche is. What notion is it related to?
Small change in key (with same plaintext) should result in large change in ciphertext Related to Shannon’s notion confusion
41
Explain what a plaintext avalanche is. What notion is it related to?
Small change in plaintext should result in large change in ciphertext Changing 1 bit of plaintext should change each of the bits in the ciphertext with probability of ½ Related to Shannon’s notion of diffusion
42
Give the encryption steps for DES
1. ALL bits of P permuted using initial fixed permutation IP 2. 16 rounds of Feistel operation applied, denoted by func f 3. Final fixed inverse permutation IP^(-1) applied
43
What is the input for DES' encryption?
P is input plaintext block of 64 bits
44
What is the output of DES' encryption?
Output ciphertext block C of 64 bits
45
Comment on the key used in the second step of the encryption process of DES
Different 48-bit subkey for each round
46
Explain the Feistel operation
For each round: 1. Expand 32 bits to 48 bits 2. XOR 48 bits to 48-bit subkey 3. Break 48 bits into 8 blocks of 6 bits → Wi 4. Put each block Wi into its substitution table Si, resulting into blocks of length 4 5. Apply permutation to result into 32 (= 4 x 8) bits See slide 24 of set 7 for diagram
47
Explain the s-box example of slide 25 of set 7
TODO Not sure!
48
Outline the key schedule for DES
Each of 16 rounds involves 48 bits of 56-bit key Each 48-bit subkey is defined by series of permutations and shifts on full 56-bit key Generates subkeys For a 56-bit key, get 16 48-bit subkeys Generation details depend on implementation
49
How many keys do you need to test in a brute fore attack on DES?
Testing all possible 2^k keys to find key K → k = |K| 2^56 DES keys to test On average, take (2^56)/2 = 255 trial samples to find key → trying all keys with last bit = 0
50
How is the key identified in brute force attack on DES?
using small number of ciphertext blocks or by looking for low entropy in decrypted plaintext
51
Is the key size good enough for DES?
No, short 56-bit key sized critisized
52
Explain double encryption for DES
Let K1 and K2 be 2 block cipher keys Encryption: C = E(E(P,K1)(,K2) If both keys have length k, then exhaustive attack requires 2^(2k-1) trials on average → Fix 1 bit so have half left to try Time-memory trade off which reduces it suing MITM attack
53
Does brute force become difficult in double encryption for DES?
yes
54
Explain the steps of the MITM attack
Let (P,C) be single plaintext-ciphertext pair 1. For each key K, store C’ = E(P,K) in memory 2. Check if D(C,K’)=C’ for any K’ IDEA: given final ciphertext block, try every key to decrypt and see if matches ciphertext block previously stored K from 1. Is K1 and K’ from 2. Is K2 3. Check if key values in 2. Work other (P,C) pairs
55
What does MITM stand for?
Man in the middle
56
What is the general idea of the MITM attack?
try all keys for encryption, try all keys for decryption, find match
57
When MITM is applied to double DES, outline how many plaintext blocks required for each key
Storage of 1 plaintext block for every key → storage of 2^56 64-bit blocks
58
When MITM is applied to double DES, outline number of encryption operations
Single encryption for every key → 2^56 encryption operations
59
When MITM is applied to double DES, outline number of decryption operations
Single decryption for every key → 2^56 decryption operations
60
Compare the easiness of MITM to brute for in terms of DES
MITM expensive but much easier than brute for search through 2^(2*56-1) = 2^111 keys
61
Comment on the security of triple encryption for DES
Much better security → 3-key triple DES remains approved | 3 keys: K1, K2, K3
62
Give the encryption function for triple encryption for DES
Encryption: C = E(D(E,(P,K1),K2)K3) → encrypt plaintext with K1, decrypt result with K2, encrypt result with K3
63
Is triple encryption secure against MITM attacks?
Yes → too expense/too much energy to do ops
64
What is the size of the data block in AES?
128-bits
65
What is the size of the master key in AES?
128-, 192- or 256-bit
66
How many rounds are there in AES's encryption/decryption?
10, 12 or 14 rounds (for 128-, 192-, 256-bit master key respectively)
67
What sort of design is AES?
Byte-based
68
Explain SPN for AES
1. Initial round key addition 2. 10, 12, or 14 (encryption/decryption) rounds w.r.t to length of master key 3. Final round
69
Give the state matrix for a 16-byte data block size.
See slide 39 of set 7
70
What operations are used for state matricies?
Mixture of finite field operations in GF(2^8) and bit string operations
71
In terms of AES, what are the 4 basic operations of round transformation?
ByteSub → non-linear substitution ShiftRow → (permutation) MixColumn → diffusion AddRoundKey
72
What is block length and sub-block length for SPN in terms of round transformation
Substitution-permutation network with block length n=128 and sub-block length l=8
73
In terms of AES and round transformation, what is s-box and what is it defined in?
S-box is look-up table, mathematically defined in GF(2^8)
74
Explain the key schedule for AES (number of keys, sizes at each step)
Master key is 128 bits (resp. 192 and 256) Each of 10 (resp. 12 and 14) rounds uses 128-bit subkey 1 subkey per round + 1 initial subkey 11 subkeys in total (resp. 13 and 15) Deriving 128-bit subkeys from master key
75
What is a related key attack?
requiring attacker to obtain ciphertext encrypted with a key related to the actual key in a specific way
76
Comment on AES' security
Some cracks have appeared but no significant breaks Most serious attacks reduce effective key size by around 2 bits → ½ chance to determine bit as either 0 or 1. Difficult to know if first bit is 0
77
Compare AES' and DES' data block size
DES: 64 bits AES: 128 bits
78
Compare AES' and DES' key size
DES: 56 bits AES: 128, 192 or 256 bits (variation)
79
Compare AES' and DES' cipher type
Both iterated ciphers
80
Compare AES' and DES' operation structure
DES has Feistel structure while AES has SPN
81
Compare AES' and DES' units
DES is bit-based and AES is byte-based
82
Compare AES' and DES' speed
AES is substantially faster in both hardware and software → AES popular
83
What are block ciphers the building blocks of?
confidentiality and authentication