Block Ciphers Flashcards
Briefly explain how block ciphers work.
They permutate a plain text by repeating a simple round function. The number of rounds is either fixed or not. More rounds means more secure.
Each round uses a round key, derived from private key k.
Why should the round function be invertible?
Because the decryption round keys are used in opposite order.
Explain Shannons confusion diffusion paradigm.
Confusion: Split the block into smaller blocks and aplly a substitution on each block
Diffusion: Mix permutations so that local change can effect the whole block.
What is SPN?
Substitution-Permutation Networks, based on shannon confusion diffusion paradigm.
It uses Key mixing, substitution and permutation.
Explain the Avalanche effect
A small change in the input must affect every bit of the output
When a bit is changed at the input of the S-Box, how many bits are effect at the output of the Sbox?
At least 2
What is the core principle (question) in the security game of block ciphers?
Can an adversary distinguish between the block cipher or an PRP (psuedo random permutation)
What is the minimal rounds that are needed in block cipher for them to become “safe”
7
Does Feistel Ciphers require invertible round function?
No, decryption can be obtained because the round function input is perserved per round. (hence the XOR function can be reversed)
Are Feistel ciphers hard or easy for hardware?
Easy, encr/decr uses the same logic, only keys are in reverse order.
What does the security of Feistel Ciphers depend on?
- Round keys
- number of rounds (r)
- round function (F)
What is DES, and what are its parameters?
Data Encryption Standard: type of Feistel Cipher
* 16 rounds
* 64 bit block size
* 56 bit key length
* 48 bit round key length
Explain the steps of DES
- Devide plaintexts into 64 bits blocks
- Perform initial permutation (IP)
- split left and right
- perform 16 rounds
- join left and right back together
- perform final reverse permutation
Explain the steps of Function F of DES
- Expension permutation
- Xor with round key
- S-Box
- P-Box
Why does the function F of DES perform Expension permutation?
It needs to expend the 32 input bits to 48, in order to XOR with round key.
Why does DES perform initial (and reverse) permutation?
This was a hardware optimization, where the blocks are read sequentially as 8 octets. So the order of IP and Reverse IP are naturally occuring in HW.
How does the S-Box operate (DES) ?
There are 8 S-Boxes in DES, all have different mappings. They take a 6 bit input and return the corresponding 4 bit value.
How does the P-box work in DES?
It simply permutes the result of the SBOX (32 bits) with a standard permutation.
Explain the key length for DES
It is 56 bits, plus an additional 8 parity bits for error detection.
Explain how round keys are derived from key k in DES.
First, the 56 bit key is permutated. Then it is split into 2 28 bit parts. Every round each part is shifted left by 2, and in some rounds only by 1. The round key is composed by combining the two parts, and applying another permutation to the result in order to get the 48 bit round key.
Is DES secure?
In general DES is secure. because it can only be broken using brute force. (adversary has no advantage). Howeverm it uses a 56 bit key, which means there are 2^56 possibilities. In the current day this is computationally thesible to accomplish. (So it is no longer computationally safe)
Explain if DES becomes more secure when we double encrypt using two different keys?
It might be rational to think that the complexity has become 2^112, due to the two keys. However the meet-in-the-middle attack will make the complexity stay the same at 2^56.
Explain meet in the middle attack. What ciphers are potentially vulnerable for this attack.
Meet in the middle attack can be applied when a plaintext is encrypted multiple times sequentially. When a plaintext-cipher text pair is known, the attacker can coimpute all the possible intermediate values for the sequential steps, from both directions. The keys that resulted in matches can be compared to other p-c pairs in order to reduce false positives.
Explain how 3DES works.
3 blocks of DES are sequentially performed on a plaintext. The order is Enc-Decr-Enc for encryption, and vise versa. You can either choose two or three keys to perform this operation.