Week 4: Symmetric Key Encryption Flashcards

1
Q

What is Symmetric Key Encryption?

A

One key is used to encrypt and decrypt message.

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

How do Block Ciphers work?

A

Message is split into fixed length block each block is encrypted separately.

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

Name the requirements of an Ideal Block Cipher.

A
  1. A plaintext block to a ciphertext block should be a one to one mapping.
  2. Encryption/decryption should be easy with key, hard otherwise.
  3. Computing the mapping should be efficient.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is ideally used for the mapping between one block and another block?

A

A Pseudo Random Permutation (PRP).

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

Why is it not possible to use a Pseudo Random Permutation as a mapping?

A

Too many entries to write.

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

How many possible mapping exist for a message of 128 bits?

A

2^128 mappings.

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

What is a Pseudo Random Function (PRF)?

A

A function to map input to output space (usually one-to-one).

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

How to you turn a strong PRF (Pseudo Random Function) into a PRP (Pseudo Random Permutation)?

A

Use Feistel network (at least 4 rounds needed)

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

How does a Feistel round work?

A

Consists of 4 steps

  1. Divide message into two parts: a & b
  2. PRF takes input b and key k.
  3. PRF output is xored with a to get a’.
  4. a’ and b are switched places.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you decrypt a message encrypted with a Feistel structure?

A

Do process backwards.

  1. Switch a’ and b.
  2. Feed b through PRF.
  3. xor output of PRF with a’ to get a.
  4. You have a and b.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some Block Cipher modes?

A
  • Electronic Code Book (ECB)
  • Cipher Block Chaining (CBC)
  • Counter (CTR)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does Electronic Code Book (ECB) work?

A

Every block is encoded in same way. Major security risk as identical blocks will be encoded same way.

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

How does Cipher Block Chaining (CBC) work?

A

First message block is xored with IV and encrypted. The ciphertext is used to xor next message.

Addresses issue of ECB.

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

How does Counter Block Cipher work?

A

First plaintext block has IV, second block has IV+1, etc.

Each IV is encrypted and then xored with plaintext to get ciphertext.

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

What are the advantages of a Counter Block Cipher?

A
  1. Can be computed in parallel.

2. Allows for random access.

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

What type of key does AES have?

A

Supports 128, 192, and 256 bit keys.

17
Q

How big is each block in AES?

A

128 bits.

18
Q

How many rounds does AES need?

A

10 rounds for 128 bit key

14 rounds for 256 bit key

19
Q

What happens in each round of AES?

A
  1. SubBytes - substitution using lookup table (Galois Field used to generate table) [PRP].
  2. ShiftRows - last three rows cyclically shifted.
  3. MixColumns - linear mixing operation.
  4. AddRoundkey - xor with round key.
20
Q

How does AES work at high level?

A

For each round a new key from original key is generated.

Key and message is xored and then message goes through multiple AES rounds. Each round output is xored with key.