Week 4: Symmetric Key Encryption Flashcards
What is Symmetric Key Encryption?
One key is used to encrypt and decrypt message.
How do Block Ciphers work?
Message is split into fixed length block each block is encrypted separately.
Name the requirements of an Ideal Block Cipher.
- A plaintext block to a ciphertext block should be a one to one mapping.
- Encryption/decryption should be easy with key, hard otherwise.
- Computing the mapping should be efficient.
What is ideally used for the mapping between one block and another block?
A Pseudo Random Permutation (PRP).
Why is it not possible to use a Pseudo Random Permutation as a mapping?
Too many entries to write.
How many possible mapping exist for a message of 128 bits?
2^128 mappings.
What is a Pseudo Random Function (PRF)?
A function to map input to output space (usually one-to-one).
How to you turn a strong PRF (Pseudo Random Function) into a PRP (Pseudo Random Permutation)?
Use Feistel network (at least 4 rounds needed)
How does a Feistel round work?
Consists of 4 steps
- Divide message into two parts: a & b
- PRF takes input b and key k.
- PRF output is xored with a to get a’.
- a’ and b are switched places.
How do you decrypt a message encrypted with a Feistel structure?
Do process backwards.
- Switch a’ and b.
- Feed b through PRF.
- xor output of PRF with a’ to get a.
- You have a and b.
What are some Block Cipher modes?
- Electronic Code Book (ECB)
- Cipher Block Chaining (CBC)
- Counter (CTR)
How does Electronic Code Book (ECB) work?
Every block is encoded in same way. Major security risk as identical blocks will be encoded same way.
How does Cipher Block Chaining (CBC) work?
First message block is xored with IV and encrypted. The ciphertext is used to xor next message.
Addresses issue of ECB.
How does Counter Block Cipher work?
First plaintext block has IV, second block has IV+1, etc.
Each IV is encrypted and then xored with plaintext to get ciphertext.
What are the advantages of a Counter Block Cipher?
- Can be computed in parallel.
2. Allows for random access.