Block Ciphers Flashcards

1
Q

Briefly explain how block ciphers work.

A

They permutate a plain text by repeating a simple round function. The number of rounds is either fixed or not. More rounds means more secure.

Each round uses a round key, derived from private key k.

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

Why should the round function be invertible?

A

Because the decryption round keys are used in opposite order.

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

Explain Shannons confusion diffusion paradigm.

A

Confusion: Split the block into smaller blocks and aplly a substitution on each block

Diffusion: Mix permutations so that local change can effect the whole block.

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

What is SPN?

A

Substitution-Permutation Networks, based on shannon confusion diffusion paradigm.
It uses Key mixing, substitution and permutation.

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

Explain the Avalanche effect

A

A small change in the input must affect every bit of the output

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

When a bit is changed at the input of the S-Box, how many bits are effect at the output of the Sbox?

A

At least 2

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

What is the core principle (question) in the security game of block ciphers?

A

Can an adversary distinguish between the block cipher or an PRP (psuedo random permutation)

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

What is the minimal rounds that are needed in block cipher for them to become “safe”

A

7

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

Does Feistel Ciphers require invertible round function?

A

No, decryption can be obtained because the round function input is perserved per round. (hence the XOR function can be reversed)

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

Are Feistel ciphers hard or easy for hardware?

A

Easy, encr/decr uses the same logic, only keys are in reverse order.

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

What does the security of Feistel Ciphers depend on?

A
  • Round keys
  • number of rounds (r)
  • round function (F)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is DES, and what are its parameters?

A

Data Encryption Standard: type of Feistel Cipher
* 16 rounds
* 64 bit block size
* 56 bit key length
* 48 bit round key length

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

Explain the steps of DES

A
  1. Devide plaintexts into 64 bits blocks
  2. Perform initial permutation (IP)
  3. split left and right
  4. perform 16 rounds
  5. join left and right back together
  6. perform final reverse permutation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Explain the steps of Function F of DES

A
  1. Expension permutation
  2. Xor with round key
  3. S-Box
  4. P-Box
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why does the function F of DES perform Expension permutation?

A

It needs to expend the 32 input bits to 48, in order to XOR with round key.

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

Why does DES perform initial (and reverse) permutation?

A

This was a hardware optimization, where the blocks are read sequentially as 8 octets. So the order of IP and Reverse IP are naturally occuring in HW.

17
Q

How does the S-Box operate (DES) ?

A

There are 8 S-Boxes in DES, all have different mappings. They take a 6 bit input and return the corresponding 4 bit value.

18
Q

How does the P-box work in DES?

A

It simply permutes the result of the SBOX (32 bits) with a standard permutation.

19
Q

Explain the key length for DES

A

It is 56 bits, plus an additional 8 parity bits for error detection.

20
Q

Explain how round keys are derived from key k in DES.

A

First, the 56 bit key is permutated. Then it is split into 2 28 bit parts. Every round each part is shifted left by 2, and in some rounds only by 1. The round key is composed by combining the two parts, and applying another permutation to the result in order to get the 48 bit round key.

21
Q

Is DES secure?

A

In general DES is secure. because it can only be broken using brute force. (adversary has no advantage). Howeverm it uses a 56 bit key, which means there are 2^56 possibilities. In the current day this is computationally thesible to accomplish. (So it is no longer computationally safe)

22
Q

Explain if DES becomes more secure when we double encrypt using two different keys?

A

It might be rational to think that the complexity has become 2^112, due to the two keys. However the meet-in-the-middle attack will make the complexity stay the same at 2^56.

23
Q

Explain meet in the middle attack. What ciphers are potentially vulnerable for this attack.

A

Meet in the middle attack can be applied when a plaintext is encrypted multiple times sequentially. When a plaintext-cipher text pair is known, the attacker can coimpute all the possible intermediate values for the sequential steps, from both directions. The keys that resulted in matches can be compared to other p-c pairs in order to reduce false positives.

24
Q

Explain how 3DES works.

A

3 blocks of DES are sequentially performed on a plaintext. The order is Enc-Decr-Enc for encryption, and vise versa. You can either choose two or three keys to perform this operation.

25
Q

Why does 3DES not encrypt three times?

A

Compatibility! If a 3DES system wants to securely communicate with a system that only supports 1DES, the 3DES system can just use 1 key for its 3DES operation, such that the first two steps cancel out and you’re left with DES.

26
Q

On what structure is AES based?

A

SPN

27
Q

Is the substitution phase for confusion or diffusion? and permutation?

A

substitution phase= (non-linear phase, confusion)
*permutation phase = (for diffusion, avalanche effect)

28
Q

What are the steps of AES?

A

First you XOR initial round key with plaintext
then you iterate: (Nr-1)
1. subBytes
2. ShiftRows
3. MixColumns
4. AddRoundKey

And you apply the steps (except mixing columns) one last time to get the cipher text.

29
Q

How does substitution work in AES?

A

There are 16 S-Boxes, one for each byte of the 128 bit block. The S-Box maps a byte input to a byte output value.

30
Q

How many iterations are there in AES?

A

It differs per block size. For AES-128 there are 10 iterations.

31
Q

How does AES’s S-Box meet the criterea?

A

The S-Box is resitant against linear and differential crypto analysis.
Furthermore the S-Box maps a byte to a byte, hence it is invertible.

32
Q

Explain how rows are shifted in AES

A

The first row is not shifted, second row is shifted left by one, etc

33
Q

Explain how columns are mixed in AES

A

Using a complex matrix multiplication. Idk

34
Q

How many keys are required for AES128?

A

1 (initial) + 9 (iter) + 1 (final) = 11

35
Q

Explain round key generation in AES.

A

It uses the 4 words of the original key to create the first word of the second key (with a ‘special’ function). Then the second word is generated by XORing Word-1 and Word-4 (start count from 0), etc.

36
Q
A