Compared to a block cipher which encrypts 16 bytes at a time, stream ciphers can encrypt a byte at a time. I am curious about which applications would immensely benefit from the ability to encrypt a byte at a time.

Realtime applications such as chatting or voip always have several bytes at a time to send -- which means only a little bit of padding would be needed every now and then if a block cipher is used. Leaves me curious where the ability to encrypt a byte at a time comes off as a big PLUS for stream ciphers.


2 Answers 2


Stream ciphers not necessarily encrypt one byte at a time; they encrypt/decrypt by generating keystream and xorring it with plaintext/ciphertext. Old stream ciphers like RC4 generate keystream byte by byte, modern stream ciphers like Salsa20 generate keystream by blocks (Salsa20 by 64-byte blocks). Block ciphers can be converted into stream ciphers using CTR mode of operation, and then they generate keystream by blocks too.

The ability to generate keystream one byte at a time is sure useful for some applications, but generally one need to implement it yourself. Modern ciphers (at least most of them) do not provide it "out of the box".


I'm not quite sure whether or not you are missing a noteworthy point: stream ciphers typically encrypt one bit at the time, rather than one byte at the time (although, as stated by @kludg, this can vary).

A fairly easy to understand example use case for this is encrypting the data on a single network link. The hardware module receives the traffic to go through the link bit-by-bit, XORs it with a bit from its keystream, then sends it down the line where it is decrypted by a similar module, and passed on to the system receiving it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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