Block ciphers, DES and AES Flashcards

1
Q

What are 2 widely deployed block ciphers?

A

AES and DES

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

Wha are block ciphers?

A

Symmetric key

Each block of plaintext is encrypted with the same key

Each block has a fixed size, often between 64 and 256 bits.

Used in certain configurations called modes of operation.

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

What is the encryption technique Confusion?

A

Use substitution to make the relationship between the key and the ciphertext as complex as possible.

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

What is the encryption technique diffusion?

A

Involves transformations that dissipate the statistical properties of the plaintext across ciphertext.

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

What is a product cipher?

A

Cryptosystem

Encryption function is formed by applying several sub-encryption functions.

Most block ciphers are compositions of function f_i, where each f_i has a different key K_i

C = E(P, K) = f_i(…,( f2 ( f1 (P,K1), K2)…) Ki)

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

What are iterated ciphers?

A

A class of product ciphers

Encryption process divided into r similar rounds

sub-encryptions are all the same round function g

Each round-key Ki is derived from an overall master key K..

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

What is a round function?

A

The sub-encryption function used in iterate ciphers

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

What is a key schedule in iterate ciphers?

A

The process that derives sub-keys from a master key

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

Give an example of how a ciphertext is derived through r rounds of an iterate cipher

A

W0 = P
W1 = g(w0, k1)
W2 = g(w1, k2)

Wr = g(w_(r-1), k_r)
C = Wr

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

Give an example of how a ciphertext is decrypted through r rounds of an iterate cipher

A

Wr = C
W_(r-1) = g^-1 ( Wr, Kr)
W_(r-2) = g^-1 ( Wr-1, Kr-1)

W0 = g^-1 ( W1, K1)
P = W0

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

What does an iterate cipher need to have to be able to decrypt?

A

A round function g that have an inverse g^-1
with g^-1(g(W,ki), ki) = W for all Ki and blocks W

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

What type of block cipher is DES (Data Encryption Standard)

A

Feistel ciphers

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

What type of block cipher is AES (Advanced Encryption Standard)

A

Substitution-Permutation Networks (SPNs)

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

What is a Feistel cipher?

A

Iteration cipher

The round function swaps the two halves of the block and forms a new right hand half.

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

Why is the Feistel cipher process often called a Feistel network?

A

The process can be seen as a network which the two halves of the plaintext block travel through

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

Describe feistel encryption

A

Plaintext: P = Wo
Split plaintext into two halves: W0 = (L0, R0)

For each round r, perform:
Li = Ri-1
Ri = Li-1 XOR f(Rw-1, K1)

C = Wr
C = (Lr, Rr)

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

Describe feistel decryption

A

C = (Lr, Rr)

For each round r, perform:
Li-1 = Ri XOR f(Li, Ki)
Ri-1 = Li

P = (L0, R0)

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

Does every round function allow decryption when using Feistel cipher?

A

Yes, Feistel don’t use an inverse, so any function f allows decryption.

Because of this, the choice of f is critical for security

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

What is substitution-permutation network (SPNs)?

A

Iterated cipher

Block length n must allow for each block to be split into m sub-blocks of length l.

n = lm

2 permutations are defined

Permutation P_S operates on sub-blocks of size r bits
P_s: {0, 1}^r -> {0, 1}^r

The permutation P_s is normally called an S-box (substitution box)

Permutation P_p swaps the inputs from {1, …, n}. This is similar to the transposition cipher

Pp: {1, 2, …, n} -> {1, 2, …, n}

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

How is the SPNs round function defined?

A

Ki is XORed with the current state block Wi

Each sub-block gets the same substitution applied using Ps

The whole block is permuted using Pp, at bit level (transposition)

21
Q

What properties does good block ciphers have?

A

Avalanche effects with respect to both key and plaintext

22
Q

What is Plaintext avalance?

A

Small change in P should result in a large change in C.

Ideally, 1 bit change in P should change each bit in C with the probability 1/2.

Relates to diffusion

23
Q

What is key avalanche?

A

Small change in key should result in a large change in the resulting C, when applied to the same plaintext.

Relates to confusion

24
Q

What is differential cryptoanalysis?

A

Chosen plaintext attack

Idea: Difference between two input plaintexts, can be correlated to the difference between two output ciphertexts

25
Q

What is linear cryptoanalysis?

A

Known plaintext attack

Can theoretically be used to break DES

26
Q

What defines the security of DES?

A

It resides in the difficulty of decryption without knowledge of the key.

This is because enc and dec definitions are public property.

27
Q

What is DES

A

16-round
Feistel cipher
Key length: 56 bits
block length: 64 bits

28
Q

Define DES encryption

A
  1. 64 bits of P (input block) are permuted according to an initial fixed permutation IP
  2. 16 rounds of Feistel operation are applied, denoted by function f.
    A different 48-bit subkey is used for each round of f.
  3. A fixed inverse permutation, IP^-1, is applied

Output from 1-3 is ciphertext C

29
Q

What is DES’s Feistel operation (function f)

A
  1. 32 bits expanded to 48
  2. Bitwise modulo two, add 48 bits to 48 bit subkey
  3. break 48 bits into 8 blocks of 6 bits
  4. put block i into substitution table i, resulting in a block length of 4 (now 8 blocks of 4 instead of 6)

5- Apply permutation to resulting 32 bits

30
Q

What is the key schedule of DES?

A

Each of the 16 rounds involves 48 bits of the 56 bit key.

The key is defined by a series of permutations and shifts on the full 56 bit key

31
Q

How can you do a brute force attack on a block cipher?

A

Testing all 2^k possible keys

Right key can be identified by using a small number of cipher blocks. Looking for low entropy in the decrypted P

32
Q

What is double encryption?

A

K1 and K2 are two keys of the block cipher

C = E( E(P1,K1), K2)

Key length of original block is k

Brute force qould require 2^(2k-1) trials on avarage

33
Q

What is a meet in the middle attack on double encryption?

A

We have a P and C pair which satisfy:

  1. For each key, store C’ = E(P, K) in memory
  2. Check whether D(C,K’) = C’ for any K’
  3. K from step 1 is K1, and K’ from step 2 is K2
  4. Check whether key values in step 3 work for other (P, C) pairs

This requires storage for one P for every possible key

34
Q

What is required to be able to do the meet in the middle attack on DES?

A

Storage of one P for every key

Single enc for every key

Single dec for every key

Store:
- 2^56 64-bit blocks
- 2^56 enc operations
- 2^56 dec operations

35
Q

What is triple encryption?

A

C = E( D( E(P, K1), K2 ), K3 )

Secure from the meet-in-the-middle attack

36
Q

What are the three options for triple decryption?

A

Three independent keys

K1 = K3

K1 = K2 = K3, vulnerable to brute force

37
Q

What is AES?

A

Symmetric block cipher

128-bit block

128, 192, 256 bit master key

Number of rounds (NR) is 10, 12, 14 (128, 192, 256 bit)

byte-based design

Substitution-permutation network
- initial round key addition
- NR-1 rounds
final round

38
Q

How is state defined in AES?

A

Using a matrix of bytes.

Example: A block size of 16 bytes gives a 4x4 matrix

39
Q

What 4 basic operations does AES consist of?

A
  1. ByteSyb (non-linear substitution)
  2. ShiftRow (permutation)
  3. MixColumn (diffusion)
  4. AddRoundKey

This creates a substitution-permutation network wit n=128 and l=8

S-box is a lookup table and mathematically defined in GF(2^8)

40
Q

What is GF(2^8) in AES?

A

Galois Fields
These are finite fields

GF(2^8) provides a mathematical basis for byte substitution and diffusion

41
Q

What is the key schedule of AES?

A

Master key: 128 bits (or 192, 256)

Rounds use 128-bit subkey.
Each round uses one subkey. An additional initial subkey is also required.
Meaning, for 128-bit key, 10 rounds are done, and 11 keys are required.

The schedule derives the 128-bit subkeys from the 128-bit master key

42
Q

What are related key attacks?

A

Attacker is able to obtain C encrypted with a key related to the actual key, in a specified way.

43
Q

What are some attacks that have appeared for AES?

A

Attacks on reduced-round versions

Related key attacks

Attacks that are able to reduce effective key size by around 2 bits

44
Q

Compare DES and AES

A

Block size: DES-64, AES-128

Key size: DES-56, AES-128, 192, 256

Design structure:
- both are iterate
- DES has feistel structure, AES is SPN
- DES is bit-based, AES is byte-based
- AES is faster in HW and SW

45
Q

Which of AES and DES is in use today?

A

AES, but DES is still in use in older applications

46
Q

what is a key schedule?

A

The process of derive sub-keys for use in a round function, from a master key

47
Q

What are 2 widely used general block cipher designs?

A

Feistel ciphers: DES

Substitution-Permutation Networks (SPNs): AES

48
Q

What should modern block ciphers be designed to be immune to?

A

Differential and linear cryptanalysis