Questions tagged [stream-cipher]

A stream cipher is an encryption algorithm which encrypts arbitrary length plaintext, using a key. Some stream ciphers generate a keystream from only the key, which is then XOR-combined with the plain text, others feed back plaintext or ciphertext into the algorithm to create the keystream.

A stream cipher is an encryption algorithm which encrypts arbitrary length plaintext using a key. Some stream ciphers generate a keystream from only the key, which is then XOR-combined with the plain text. These are called synchronous stream ciphers. Others feed plaintext or ciphertext back into the algorithm to create the keystream. If they depend only on the key and a fixed window of ciphertext, they are called self-synchronizing stream ciphers.

Stream ciphers can be build from block ciphers using a mode of operation, or be independent algorithms. They are usually malleable (cf. ) unless an authentication algorithm is used.

Examples include:

  • The block cipher modes , and all turn a block cipher into a stream cipher.
  • is a common stream cipher that is largely considered broken and being phased out.
  • and are newer stream ciphers used in the NaCl library and in TLS.

See also: the Wikipedia article on stream ciphers.

543 questions
11
votes
4 answers

Theoretical pi-based stream cipher

Let's pretend that all digits of pi are known and arbitrarily long sequences of digits are trivial to get. Further, some mathematician proves that there are no patterns in pi. We could create a stream cipher by grabbing a piece of pi as long as our…
Joshua Galecki
  • 213
  • 2
  • 4
8
votes
3 answers

Word-based stream ciphers vs "regular" stream ciphers?

Could somebody explain what is the difference between "word-based" stream ciphers and the regular ones? Those last ones use pseudo-random sequences XOR'd bit by bit with the message, as far as I know. How does that change when it comes to…
geo909
  • 387
  • 3
  • 11
8
votes
2 answers

Is Trivium still secure?

What is the best known attack on the stream cipher Trivium? And is there is any good reason to not use it? By googling the good key words, I've found this paper, but I'm not enough expert to judge the relevancy of this paper.
Ievgeni
  • 2,585
  • 1
  • 10
  • 32
5
votes
1 answer

Combination of two stream ciphers

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…
VincBreaker
  • 1,484
  • 11
  • 25
5
votes
3 answers

Is a continuous stream of encrypted data embedded in garbage more or less secure than only encrypting the data?

Consider a communication channel that needs to be secure (Encryption can not use full "volume" encryption, since future messages are not known). Would it be better to only transmit encrypted messages and remain silent the rest of the time…
Tobias Kienzler
  • 313
  • 6
  • 20
5
votes
1 answer

Why develop new stream ciphers when block ciphers can be trivally made into streams?

I've just been reading about a new drop-in replacement for the RC4 stream cipher, but why develop new stream ciphers when AES can be made into a stream with a little XORing?
billpg
  • 711
  • 5
  • 14
4
votes
0 answers

A confusion about linear span of modified de Bruijn sequence

Recently i'm reading "Cryptographically Strong de Bruijn Sequences with Large Periods" . In the section 2 2.1 Basic Definitions and Properties , property 1 says that $$2n
daries_wu
  • 41
  • 1
3
votes
1 answer

Decryption of Alternating Step Generator

I have programmed an alternating step generator in the following way: I have three LFSR. LFSR_1 is being clocked in every step. Every LFSR has an initialization vector. And we have a text to encrypt. If the output of LFSR_1 is 1 : LFSR_2 is being…
Daniela
  • 31
  • 1
3
votes
1 answer

What is the difference between synchronous stream ciphers and asynchronous stream ciphers?

What are the benefits and drawbacks of each?
kirr
  • 39
  • 1
  • 2
3
votes
1 answer

Nonce role on stream ciphers

Modern stream ciphers usually predicts the usage of a nonce (also termed as IV) in the cryptosystem. The cost of initializing the cipher with the nonce varies from algorithm to algorithm (for instance, this cost seems very high on HC-256 and…
lvella
  • 277
  • 1
  • 8
3
votes
1 answer

What if message is longer than keystream ?

I have read that stream ciphers can be used to encrypt messages/streams of arbitrary length (cf. the description of the stream cipher tag). However, there are stream ciphers that create a keystream of fixed length and XORs message and keystream bit…
user120513
  • 175
  • 5
3
votes
1 answer

Do any stream ciphers with aperiodic keystreams exist?

Exactly what it says on the tin. I can imagine constructing such keystreams from: The binary expansions of irrational numbers Chaotic systems like the logistic map or the Lorenz attractor. The bitmap representations of images. Extracting the…
Melab
  • 3,655
  • 2
  • 22
  • 44
3
votes
2 answers

Skipping first outputs of the stream cipher

I remember reading somewhere that sometimes in some stream ciphers it is necessary to skip the first values they produce. I can't find any information on this right now. But it seems to make sense. Just as a hash function needs to do many rounds…
Tom
  • 1,221
  • 6
  • 16
2
votes
1 answer

Stream Cipher proof of maximal period length for $n = 2^m$

While reading A course of Mathematical Cryptography by Baumslag et al., I have trouble understanding parts of the proof of Theorem 2.3.3, namely the necessary condition : Let $n\in\mathbb{N}$ with $n=2^m,m\geq1$ and let $a,b\in\mathbb{Z}$ such that…
2
votes
1 answer

Using whitespace to break many-time-pad stream cipher

I have a question about the first programming assignment in Dan Boneh's cryptography course on Coursera. You're given 10 ciphertexts that were encrypted with the same key and you can presumably assume that the plaintext consists of letters and…
eager2learn
  • 123
  • 3
1
2 3