Modern Ciphers Flashcards
What is a keystream generator?
An algorithm that generates streams of random digits/characters which are combined with plaintext to produce the ciphertext
How do block ciphers encrypt?
Encrypt a block of bits at a time
How does cipher Block Chaining work?
Each plaintext block is XORed with previous block and then encrypted. The initialization vector is XORed with the first plaintext block
What are the design guidelines for encryption schemes?
Diffusion and Confusion
Define diffusion:
Changing one bit in the plaintext changes “many” bits in the ciphertext
Define confusion:
The relation between ciphertext, plaintext and key should be as complex as possible
What is a stream cipher?
A cipher in which the plaintext is XOR with some key/keystream into ciphertext
What does the security of the stream cipher rely on?
The security of the keystream generator. Keystream must be unpredictable
What is a feedback shift register?
A register which is blocks of bits. We use a feedback function which takes the whole register as an input and outputs a new block which is inserted into the head of the register, therefore discarding the last block.
What is a linear-feedback shift register?
A linear-feedback shift register is a shift register whose input bit is a linear function of its previous state
What are the vulnerability of Linear Feedback Shift Registers?
- Very predictable as everything shifts using a predefined feedback function
- Given 1 consecutive bits of the key stream, the attack can compute all future bits
How can we further secure LSFR?
Separate the key stream from the inner state of the PRNG by using multiple LFSR and combining them with a combiner
What should a LSFR function be?
- Non-linear
- Correlation immune
How does a correlation attack work?
- Try all possible initial values for the first LFSR
- Use the correlation to check if a guessed initial value is correct
- In the worst case the attacker can brute force all LFSRs separately instead of having to brute force them all together
When can a correlation attack be performed?
When the function f combiner is correlated to one of its inputs