5
$\begingroup$

As far as I know, all stream ciphers work by generating a stream of pseudo random bytes, and XOR it with the plain text to get the cipher text. It has the property that one bit change in the cipher text results only the corresponding bit change in the decrypted message.

Is there any stream cipher that has the avalanche effect, where one bit change in the cipher text will result about half of the bits changed in the decrypted message after the corresponding bit?

$\endgroup$
5
$\begingroup$

A stream cipher, by definition, acts on individual bits at a time. This effectively means that bits later in the plaintext cannot affect bits around the beginning of the ciphertext. It can, however, feed the ciphertext back into the state of the PRNG to affect all future bits. This can be seen in the CFB (Cipher Feedback) block cipher mode. It acts similarly to a stream cipher, in that each ciphertext bit can be drawn one at a time, but they feed back into the system to affect all future bits.

| improve this answer | |
$\endgroup$
1
$\begingroup$

It sounds like you're looking for a cipher where, if a man-in-the-middle adversary modifies a single bit in the ciphertext, that single change flips about half the bits in the decrypted message after the corresponding point.

Most early ciphers were specifically designed to prevent such small errors from propagating beyond the affected digit.

Some people define a stream cipher as a cipher where each digit of the decrypted message is recovered by combining the corresponding digit of the ciphertext with a pseudo-random digit generated independently of the plaintext or ciphertext messages. To those people, any cipher with the "avalanche affect" you are looking for is, by definition, not a steam cipher.

Other people consider ciphertext autokey to be a kind of stream ciphers ("self-synchronizing stream ciphers"), which were designed to prevent a different kind of small error ("losing synchronization") from propagating to the rest of the message. A single-bit error in a message flips about half the digits for some (generally small) N digits after the affected bit. Perhaps you could tweak such a cipher to make N larger than your entire message.

The Propagating Cipher Block Chaining (PCBC) mode was specifically "designed to cause small changes in the ciphertext to propagate indefinitely when decrypting" -- is that what you wanted?

Sometimes "decoding the rest of the message as gibberish" is desired to defend against Something Bad from happening. Usually that desire is better satified with a some form of message authentication or an all-or-nothing transform, as otus pointed out.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.