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
Q

What is permutation πp in terms of SPN?

A

Permutation πp (permutation box/p-box) swaps inputs from {1,…,n} similarly to transposition ciphers: πp : {1,…,n} → {1,…,n}

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

What are the steps in the SPN round function?

A
  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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Briefly explain the illustration of the round function on slide 15 of set 7

A

TODO

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

What type of cipher is the feistel cipher?

A

iterated cipher

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

What is DES an example of

A

feistel cipher

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

Briefly outline the round function of the feistel cipher

A

Swaps 2 halves of block and forms new right hand half

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

What is the feistel cipher sometimes called?

A

Feistel network

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

Explain the encryption process for the feistel cipher

A
  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

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

Explain the decryption process for the feistel cipher

A
  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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Do we need to invert f when decrypting for the feister cipher?

A

no

decrypt for any function f

35
Q

What aspect of the feister cipher makes is secure?

A

f since it’s the only non-linear part of encryption

36
Q

Briefly outline differential cryptanalysis

A

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
Q

Briefly outline linear cryptanalysis - what type of attack?

A

Known plaintext attack

38
Q

Can linear cryptanalysis theoretically break DES?

A

yes

39
Q

Are modern block ciphers immune to both differential and linear cryptanalysis?

A

yes

40
Q

Explain what a key avalanche is. What notion is it related to?

A

Small change in key (with same plaintext) should result in large change in ciphertext

Related to Shannon’s notion confusion

41
Q

Explain what a plaintext avalanche is. What notion is it related to?

A

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
Q

Give the encryption steps for DES

A
  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
Q

What is the input for DES’ encryption?

A

P is input plaintext block of 64 bits

44
Q

What is the output of DES’ encryption?

A

Output ciphertext block C of 64 bits

45
Q

Comment on the key used in the second step of the encryption process of DES

A

Different 48-bit subkey for each round

46
Q

Explain the Feistel operation

A

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
Q

Explain the s-box example of slide 25 of set 7

A

TODO

Not sure!

48
Q

Outline the key schedule for DES

A

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
Q

How many keys do you need to test in a brute fore attack on DES?

A

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
Q

How is the key identified in brute force attack on DES?

A

using small number of ciphertext blocks or by looking for low entropy in decrypted plaintext

51
Q

Is the key size good enough for DES?

A

No, short 56-bit key sized critisized

52
Q

Explain double encryption for DES

A

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
Q

Does brute force become difficult in double encryption for DES?

A

yes

54
Q

Explain the steps of the MITM attack

A

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

  1. Check if key values in 2. Work other (P,C) pairs
55
Q

What does MITM stand for?

A

Man in the middle

56
Q

What is the general idea of the MITM attack?

A

try all keys for encryption, try all keys for decryption, find match

57
Q

When MITM is applied to double DES, outline how many plaintext blocks required for each key

A

Storage of 1 plaintext block for every key → storage of 2^56 64-bit blocks

58
Q

When MITM is applied to double DES, outline number of encryption operations

A

Single encryption for every key → 2^56 encryption operations

59
Q

When MITM is applied to double DES, outline number of decryption operations

A

Single decryption for every key → 2^56 decryption operations

60
Q

Compare the easiness of MITM to brute for in terms of DES

A

MITM expensive but much easier than brute for search through 2^(2*56-1) = 2^111 keys

61
Q

Comment on the security of triple encryption for DES

A

Much better security → 3-key triple DES remains approved

3 keys: K1, K2, K3

62
Q

Give the encryption function for triple encryption for DES

A

Encryption: C = E(D(E,(P,K1),K2)K3) → encrypt plaintext with K1, decrypt result with K2, encrypt result with K3

63
Q

Is triple encryption secure against MITM attacks?

A

Yes → too expense/too much energy to do ops

64
Q

What is the size of the data block in AES?

A

128-bits

65
Q

What is the size of the master key in AES?

A

128-, 192- or 256-bit

66
Q

How many rounds are there in AES’s encryption/decryption?

A

10, 12 or 14 rounds (for 128-, 192-, 256-bit master key respectively)

67
Q

What sort of design is AES?

A

Byte-based

68
Q

Explain SPN for AES

A
  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
Q

Give the state matrix for a 16-byte data block size.

A

See slide 39 of set 7

70
Q

What operations are used for state matricies?

A

Mixture of finite field operations in GF(2^8) and bit string operations

71
Q

In terms of AES, what are the 4 basic operations of round transformation?

A

ByteSub → non-linear substitution
ShiftRow → (permutation)
MixColumn → diffusion
AddRoundKey

72
Q

What is block length and sub-block length for SPN in terms of round transformation

A

Substitution-permutation network with block length n=128 and sub-block length l=8

73
Q

In terms of AES and round transformation, what is s-box and what is it defined in?

A

S-box is look-up table, mathematically defined in GF(2^8)

74
Q

Explain the key schedule for AES (number of keys, sizes at each step)

A

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
Q

What is a related key attack?

A

requiring attacker to obtain ciphertext encrypted with a key related to the actual key in a specific way

76
Q

Comment on AES’ security

A

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
Q

Compare AES’ and DES’ data block size

A

DES: 64 bits
AES: 128 bits

78
Q

Compare AES’ and DES’ key size

A

DES: 56 bits
AES: 128, 192 or 256 bits (variation)

79
Q

Compare AES’ and DES’ cipher type

A

Both iterated ciphers

80
Q

Compare AES’ and DES’ operation structure

A

DES has Feistel structure while AES has SPN

81
Q

Compare AES’ and DES’ units

A

DES is bit-based and AES is byte-based

82
Q

Compare AES’ and DES’ speed

A

AES is substantially faster in both hardware and software → AES popular

83
Q

What are block ciphers the building blocks of?

A

confidentiality and authentication