Modes of Operation Flashcards
Why are block ciphers not secure witout modes of operation?
Because when you encrypt each block individually, structure of the plaintext will persist.
For instance, two blocks of all zeros will result in two blocks of the same cipher text. Hence the structure remains.
What is one of the biggest risks in modes of operations?
When a single bit error occurs (f.i. in transmission) all following blocks will no longer be interpetable.
What is ECB?
Electronic Code Book Mode
Explain how ECB works.
Each block is encrypted/decrypted individually.
What is the effect of bit error in ECB?
A one bit error will only effect that specific block.
What is the effect of block loss in ECB?
The loss of blocks cannot be detected, same goes for block insertion.
Explain how Adversary wins the OW CCA security game for any mode.
The cipher text is not allowed to be the same as the challengers.
So you append a block to the original cipher text containing the first block. This will allow you to succesfully decrypt the first block using the decryption oracle.
Argue the security level of ECB. (explain for each level how it is broken).
ECB is not IND-PASS: It can provide two messages to lr-oracle one being M1 and other M1||M1 and then it can easily determine if y was chosen randomly or using block cipher.
ECB is not OW CCA secure using the same logic: So you append a block to the original cipher text containing the first block. This will allow you to succesfully decrypt the first block using the decryption oracle.
ECB is OW CPA secure, because it is computationally inthesible to inverse operation.
xplain
What is CBC?
Cipher Block Chaining
How does CBC encryption work?
You XOR block 1 with IV and encrypt the result using your cipher method. Then the first cipher block is used to XOR the second plain text, etc.
How does CBC decryption work?
You decrypt cipher block 1 and then XOR the result with IV. Then the first cipher block is used to XOR the second plain text block (retrieved after deciphering second cipher block), continued…
What effect has bit error on CBC?
That block is not decrypted properly (whole block is lost) and it will cause a single bit error in the next plain text block.
m1 || r || bit error || m4
What effect has block loss on CBC?
It will cause one block to be decrypted incorrectly.
m1 || r || m4
Explain how adversary can win CBC mode for IND CPA.
For fixed, or nonce based IV it is possible to win:
CBC encrypts m1 XOR IV to get c1. Hence, if m1 and IV are the same, we essentially encrypt( 0 ) to get c1.
Nonce can only be provided once to the adversary, so if we get c’ for m1 = Iv = 0, then we can user LR-Oracle with m1 = 0, m2 = 1= IV. Then c* is able to be compared.
What does OFB mode stand for?
Output Feeback Mode
How does OFB encryption work?
Lets say intermediate value Y is the result of encrypting the previous value of Y, with Y0= enc(IV). Then ci = Yi XOR mi, for i>0