Lecture 4 Flashcards
What makes AES better than 3DES?
3DES is slower because you have to go through it 3 times and each time has 16 rounds. AES for 128 bit keys for example has 10 rounds
For each round of AES, what consists of the round function?
It consists of randomness from bytesub (s-box on each byte), shiftRows(cyclic shift of each row), mixcolumns (linear transformation of each column)
Why is AES faster?
It operates on bytes instead of bits
AES vs DES
AES uses a substitution-permutation network and DES uses Feistel Network. DES is bit oriented, AES is byte oriented
What is the point of modes of operation in block ciphers?
Because block ciphers only encrypt fixed-size blocks, you need modes of operation to encrypt more than one block
ECB Mode
Each block is encoded by the same key, independent of each other. Con: if two blocks are the same, they get the same encryption because we are using the same key
Recall: What is semantic security for one time key?
With one time key, adversary only sees one ciphertext, so if Eve can’t tell anything about which message was encrypted it is semantically secure
Is ECB semantically secure?
Not if ECB is being used to encrypt more than one block (because they’d encrypt the same..so it leaks info to Eve that at least two blocks have the same plaintext)
CTR mode
more secure: building a stream cipher out of the block cipher
XOR plaintext message with pseudorandom pad generated by AES or DES (fragments of message XOR f(k,0) or XOR f(k,1))
Is CTR mode semantically secure?
If the function used to generate pseudorandom pad is prf then yes (semantically secure means Eve can’t tell the difference between something encrypted using OTP and something encrypted using deterministic ctr mode)
What is semantic security for many time key?
Eve can’t do CPA attack (Eve sees multiple ciphertexts encrypted by same key but can’t decipher plaintext even after encrypting arbitrary messages of her choice)
What are two ways to ensure that encryption using a many-time key doesn’t result in the same encryption for two of the same messages?
Solution 1: Randomized Encryption: encrypting the same message twice gives you different ciphertexts (ciphertext must be longer than plaintext so that you can include randomized bits)
Solution 2: Nonce-Based Encryption
How secure is randomized encryption?
The encryption algorithm is semantically secure under CPA if every time you encrypt a message, its encrypted using a new uniform random OTP and the OTP is generated by secure PRF
Nonce based encryption
(k,n) pair never used more than once (noteL both nonce based and randomized encryption are examples of ways to generate IV)
CBC Mode
This is the best mode to use if you want to use same key more than once. Each previous cipher is chained with current plaintext block. Process starts with random IV