A simple symmetric encryption algorithm can be written as follows:
- Input message M and 64 bit key $K$
- Divide M into 64 bit size blocks $B_1...B_n$
- Get first block $B_1$ and perform bit-wise $\oplus$ with K to produce encrypted block $E_1$
- Repeat
Get next block $B_i$ and perform bit-wise $\oplus$ with $E_{i-1}$ to produce encrypted block $E_i$ - Until End of message
Q) What is the weakness in the above Algorithm if $K = B_1$(first 64 bits in message)
This may seem like an assignment question because it is. I think I know what is happening here. From the algorithm,
$E_1= Key \oplus B_1$ and $E_i=E_{i-1} \oplus B_i$ for all $i>1$
If encrypted text is known, it is possible to get plaintext using $B_i = E_{i-1} \oplus E_i$. With the help of this formula, we can derive the entire plain text without having any knowledge of the key.
The algorithm is weak even if $K \neq B_1$ because even then we are able to get the plaintext from ciphertext without any knowledge of the key. However, can we use the fact that Key is equal B1 in this scenario and get any meaningful outcome?
I know that if $K = B_1$, $E_1$ will become 0, then $E_2=B_2$. I am stuck here. So can I draw any other conclusion from it?or is my approach completely wrong?