Recently, I've been wondering what happens when I combine two stream ciphers $f_1$ and $f_2$ by xoring the keystream, so the final cipher would be:
$C = P \oplus f_1(K_1) \oplus f_2(K_2)$
$P = C \oplus f_1(K_1) \oplus f_2(K_2)$
Obviously, the keystreams shouldn't be the same because they would negotiate each other, so a few scenarios shouldn't apply:
- $f_1 = f_2$ and $K_1 = K_2$ because they obviosly would create the same keystream.
- $f_1 = f_2$ and $K_1 \neq K_2$ but there $f$ is insecure and $K_1$ and $K_2$ are part of a related-key attack so $f$ produces the same keystream.
- Really bad luck?
Another thought was that the combination could be used to double the key length, as long as there are not related keys. Also given that $f_1 \neq f_2$ and an attacker is able to compute the keystream of only one of both, he would be left with $C \oplus f_\mathit{other}(K)$ making the combination as secure as the most secure cipher used.
Finally, one last thought I had is that such patterns are already used in stream ciphers (e.g. A5/1) when LFSRs are combined so they might be secure?