Week 2 - Symmetric Encryption Flashcards
What is 0 XOR 0?
0
What is 1 XOR 0?
1
What is 1 XOR 1?
0
What are the main 2 problems with one time pads?
The key must be the same length as the plaintext
Must not reuse the key
What are the 2 key aspects that make AES secure?
Shuffling of rows and columns ensures a small change to input means a large change to the output
Requires a least one non-linear operation
When a block cipher is used in electronic cookbook mode, what happens?
Each block is encrypted individually
Encrypted blocks are assembled in the same order as the plain text blocks
When a block cipher is used in cipher block chaining mode, what happens?
each block is XOR’d with the previous block
The first block is XOR’d with a random initialisation vector
What is probabilistic encryption?
The encryption uses a random element to make every encryption different
What is the advantage of probabilistic encryption?
You can encrypt the same message with the same key and get a different ciphertext
When a block cipher is used in counter mode, what happens?
The counter (which number block it is, starts at 0) of the current block is added to the iv.
That number is then run through the cipher.
The output of the cipher is then XOR’d with the plaintext.
Why do we need padding?
Block ciphers can only work on blocks of a fixed sized. Therefore if a block would be smaller than that size, padding needs to be added to the end of it.
How do we add padding to a block and why do we do it this way?
if 1 byte of padding needed write 01, if 2 write 0202, if 3 write 030303 etc. This is so the receiver can tell the difference between the message and the padding.