What is Stream Cipher (with Example)

A stream cipher is a method of encrypting text where a cryptographic key and an algorithm are applied to each binary digit in a data stream, one bit at a time.

The stream cipher is also known as state cipher.

Encryption is 1 bit or byte of plaintext at a time.

Stream cipher uses an infinite stream of pseudorandom bits as the key.

To remain secure, a stream cipher pseudorandom generator should be unpredictable and the key should never be reused.

The pseudorandom cipher digits are generated through a number of random seed values that use digital shift registers.

The encryption of each digit is dependent on the current state of the cipher, thus the name state cipher.

This cipher is designed to work in the same way as the one-time pad.

Are you interested in finding out more about ciphers and codes?

The Codebreakers – The Story of Secret Writing book by David Kahn is what I would start with.

What is the difference between a stream cipher and block cipher

While the stream cipher encrypts 1 bit of the plaintext at a time, block cipher encrypts blocks of data at a time.

Stream ciphers are preferred in cases where speed and simplicity are both required.

One advantage of stream ciphers over block ciphers is that they are operating on the smallest possible unit thus eliminating the need for padding.

Read: Difference between a block cipher and a stream cipher.

Popular Stream Ciphers

Rivest Cipher 4 (RC4 or ARCFOUR or ARC4) – it is used in security protocols for wireless networks like WEP, WPA, and TLS. It’s not secure today as vulnerabilities have been discovered.

Stream cipher list

  • Salsa20
  • ChaCha (a variant of Salsa20)
  • Rabbit
  • HC-256
  • SOSEMANUK
  • PANAMA
  • A5/1
  • A5/2
  • Chameleon
  • FISH
  • Helix
  • ISSAC
  • MUGI
  • WAKE
  • Pike
  • SEAL
  • SOBER
  • SOBER-128
  • Phelix

Are you interested in learning how to break codes?

The Elementary Cryptanalysis – A Mathematical Approach book by Abraham Sinkov is what I would recommend.

Now I want to hear from you.

What do you think of stream ciphers?

Or maybe I missed an important aspect.

Either way, let me know by leaving a comment below.

LEAVE A REPLY

Please enter your comment!
Please enter your name here