How can a stream cipher encrypt one bit at a time and still be secure? I was reading the differences between stream ciphers and block ciphers, noticing that block ciphers, encrypted blocks of 64 bits or so at a time. But, stream ciphers encrypt 1 bit at a time, and to me it seems it would be easily reverse-able? If the stream cipher's algorithm isn't changing then what stops the adversary from easily decrypting the ciphertext generated by the stream cipher?
TL;DR that bit relies on a large state and a lot of calculations that cannot be easily reversed, as you seem to believe.



A stream cipher creates a key stream that depends on the input key material (key seed). Although the stream cipher outputs one bit at a time (usually one byte at a time in implementations for obvious reasons) that doesn't mean that the internal state is of that size. The internal state will generally be larger than the security strength of the cipher.

Before even a single bit is output the state must be updated so that the output is indistinguishable from random to an adversary. Sometimes this is not entirely the case if the stream cipher is (partially) broken: the initial output stream of RC4 is distinguishable from random; it is required to first remove the head of the key stream to create a - relatively - secure cipher.

It should not be possible to calculate any significant part of the state or any part of the key by an adversary.



To use a stream cipher it is of high importance that the key / nonce combination for each encryption remains unique. If this isn't the case then a lot of information can be retrieved from the messages encrypted with the same combination.