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.

learn more… | top users | synonyms

2
votes
1answer
35 views

Using the Unix epoch as nonce

Since a nonce must be unique and that time only goes forward, is it safe to use the Unix epoch as nonce ? My use case is be AES w/ GCM which recommends a nonce length of 12B. Current Unix time can be ...
1
vote
0answers
25 views

Mitigating weaknesses in RC4 [duplicate]

I've been researching RC4 and implementing it, and I was wondering, from the perspective of a cryptographer (a real one, not a fake one like me), what could be added to the RC4 algorithm to improve on ...
1
vote
1answer
57 views

Is a stream cipher similar to One-Time Pad using hash secure?

I've read some Q&A about combining OTP with hash on this site, but I still wonder why some answers said that using hash for OTP key is not strong enough to resist brute force attack? Assuming ...
3
votes
2answers
217 views

Can stream ciphers (usually) be “run backwards”?

Is it possible to reconstruct the previous output bits of a stream cipher, e.g. RC4, when only the current state is known, or is that computationally hard, or even impossible (due to ambiguous ...
8
votes
3answers
1k views

What is the PRG period of stream ciphers such as RC4 or Salsa20?

I am confused about how long a stream cipher can be used before you should change the key. To be concrete, let me use the stream cipher based on RC4 as an example. Let's say I want to encrypt a very ...
-1
votes
0answers
47 views

How do you do a linear feedback shift register?

I saw a video on YouTube by Daniel Rees. The video was about stream ciphers and showed how to do a linear feedback shift register. The example that was used to demonstrate how to do it is was like ...
1
vote
1answer
29 views

MICKEY 2.0: Mutual irregular clocking, register states

I'm trying to understand how MICKEY 2.0 works in detail. In [1], page 6, it says: ... the state of the generator does not repeat within the generation of a single keystream sequence ... What ...
0
votes
4answers
45 views

Is XORing a random stream of bytes a secure way to obscure a file?

Long ago I created a very simple program that used the C library's rand method to generate bytes to XOR with the bytes of a file. This was a reversible (just run it through again) method to make a ...
0
votes
1answer
59 views

Is “6 bit packed ASCII” an effective encoding to obscure text data?

I wrote a routine for a former employer that took the low six bits of ASCII text and "compressed" by cramming the bits together, so that 4 bytes reduced to 3. This had the advantage of automatically ...
1
vote
4answers
111 views

Is this an effective obfuscation technique?

Long ago I created a simple program which obfuscated a file by taking the first byte, then XORing it with the second, taking the (original) 2nd byte and X-ORing with the 3rd, etc, down the line. The ...
0
votes
1answer
39 views

Why is symmetric lightweight crypto only about block ciphers and not about stream ciphers?

Why is symmetric lightweight cryptography only about block ciphers and not about stream ciphers? AFAIK stream cipher implementations cost at least three times less than block cipher ones?
3
votes
2answers
61 views

Output of a Linear Shift Register given Plaintext and intial state

Given an initial state $S_0 = (0101)$ and plaintext $P = 1010101011$ I need to find the ciphertext. The method to solve this was not taught in my coursework, and the information I have found online ...
15
votes
6answers
4k views

What is the difference between a stream cipher and a one-time-pad?

A (synchronous) stream cipher is an algorithm which maps some fixed-length key to an arbitrary-length key-stream (i.e. a sequence of bits): $C : \{0,1\}^k \to \{0,1\}^{\infty}$. This key-stream is ...
1
vote
1answer
25 views

Audio Encryption in Voip SIP [closed]

I have some project encrypion real-time. I want use Voip SIP to implement the stream cipher. What I have done so far : Simple app android Voip SIP https://github.com/android/platform_development/...
1
vote
0answers
36 views

Simple Code Salsa20 in java [closed]

i am doing some simple research in cryptography. i need simple salsa20 in java without libr (in 1 class). can some one give me simple code to encryp and decryp plaintext from byte[] in java?
3
votes
2answers
163 views

Is it practical to use a stream cipher in a block cipher mode?

My idea is to use a stream cipher encrypting 16 bytes at a time as a primative block cipher in a mode of operation such as CBC mode. Is this practical or useful in any way?
3
votes
1answer
27 views

Encrypt-then-MAC when encrypting data in multiple blocks

Given a stream cipher such as ChaCha20 and a MAC such as Poly1305, how do we handle data that comes in chunks in the encrypt-then-MAC scheme ? For example, the plaintext is 530 bytes long. We read ...
20
votes
3answers
41k views

Difference between stream cipher and block cipher

A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time. A block cipher ...
-1
votes
1answer
36 views

Documents about ZUC

ZUC is a function that converts a string to another string. However, unlike a Hash function, ZUC converts a certain-length string to a any-length string. Can someone point me to its documentation or ...
3
votes
2answers
755 views

Calculating cycles per byte

Cycles per byte seems to be a critical concern in designing and choosing stream ciphers. For example, from Wikipedia, RC4 has 7 cycles/byte on original Pentium chips. How is this calculated? Do they ...
-1
votes
1answer
31 views

Why would a 3DES key decrypt one block, but not the next?

I'm trying to crack an encrypted data stream. It appears to be using a 64-bit 3DES key (as written in the application logs), and in fact using that key does correctly decrypt the first 64-bit packet ...
7
votes
4answers
1k views

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 ...
6
votes
1answer
70 views

How distinct are the meanings of the terms “CSPRNG,” “DRBG” and “stream cipher”?

Are there universal, consensus definitions for the following terms? Cryptographically secure pseudo-random number generator ("CSPRNG") Deterministic random bit generator ("DRBG") Stream cipher ...
0
votes
1answer
66 views

Hardware optimized stream ciphers?

As I understand it, ChaCha20 is slower than AES-CTR in hardware. Are there any hardware-optimized stream ciphers?
1
vote
2answers
92 views

Does a stream cipher provide perfect secrecy?

From WAR10CK here: If I actually do create a machine using RC4 or AES-CTR and have a TRNG continually feed it a constant steady stream of random bits. Provided that the stream of bits is purged ...
0
votes
1answer
39 views

Synchronous Stream Cipher Problem

Hello I am facing a problem trying to solve this question in the picture. Does anyone know how to produce the mentioned 32-bits of the key stream? The plaintext in this case is ...
1
vote
1answer
36 views

Would A5/1 with a much larger state be a good choice of stream cipher for hardware?

Would A5/1 with a much larger state be a good choice of stream cipher for hardware? Assume that a reasonable choice of MAC is made such as GMAC, with the first 128 bits of the stream cipher output ...
6
votes
2answers
95 views

Possible problems in using a hash algorithm to construct a stream cipher

I'll define an example hash-based stream cipher as such: $H: \{0,1\}^* \rightarrow \{0,1\}^{256}$ is the hash function. $K=\{0,1\}^{256}$ is the secret key. $N=\{0,1\}^{128}$ is the nonce. $C=\{0,1\}...
0
votes
1answer
63 views

Is AES-CTR or ChaCha20 vulnerable to a time-memory trade off?

Is AES-CTR or ChaCha20 vulnerable to a time-memory trade-off attack? According to this paper it seems to be, which would put AES-CTR at a clearly breakable $2^{64}$ security level (for AES-128-CTR). ...
1
vote
1answer
29 views

Multiplexed stream cipher

Consider the stream cipher that consists of 3 LFSRs, with the output of one coming being used to determine which of the other 2 is used that clock cycle. Both the IV and the polynomials are secret. ...
2
votes
1answer
62 views

Does XChaCha20 exist with similar properties to XSalsa20?

Does XChaCha20 (built from ChaCha20 just like XSalsa20 is built from Salsa20) exist and have XSalsa20's desirable properties?
3
votes
0answers
110 views

How secure is $\operatorname{AES256}_{\operatorname{ECB}}(\operatorname{ChaCha20}(\text{plaintext}))$?

Suppose I encrypt a bytestream using ChaCha20, and then encrypt the resulting ciphertext using AES in ECB mode. How secure is the combination?
0
votes
1answer
56 views

File using same key on XOR cipher. Using CBC [closed]

I have some files that are encrypted using an unknown key and it's using the CBC method to encrypt the files. When I XOR two files together the first two bytes are always the same, but different for ...
4
votes
1answer
51 views

Is there any IND-CPA secure stream cipher with a “standard” hardness assumption?

I've read our recent question: "One-time pad using RSA and Diffie-Hellman functions" which asks about the security of a particular way to convert RSA and discrete exponentiation into a stream cipher. ...
1
vote
0answers
37 views

How to provide mathematical proof of the security of a stream cipher against known attacks?

Suppose a person has invented a stream cipher and he/she wants to get it published. I have a few questions: In addition to providing detailed description of the algorithm, how would he/she give ...
4
votes
0answers
46 views

Can an analog of ChaCha with 64-bit words be defined, and would it be secure?

Blake2b has a lightning fast compression function with more-than-overkill security even against quantum attacks. It seems to be based on ChaCha, but with 64-bit words and different rotation constants....
1
vote
1answer
40 views

How many bits of plaintext are required to verify a stream cipher key?

If a stream cipher has an $n$-bit internal state, how many bits of known plaintext are required to confirm that particular key is the key? I believe that the answer is at least $n$-bit's of plaintext....
6
votes
1answer
132 views

Streaming mode of operation that is more resistant against nonce reuse

Is it possible to create a streaming mode of operation where the reuse of a nonce does not destroy confidentiality? In this question it would be allowed for the streaming mode to leak if ciphertexts ...
1
vote
0answers
33 views

Reykeyed AES in CTR mode as a stream cipher

Suppose one uses AES in CTR mode to generate a keystream, but every $l$ bytes the $n$ bits that would follow are used as a new AES key. Assuming that AES is a secure PRP: Is this a secure stream ...
0
votes
1answer
39 views

How would the opponent defraud this secure communication?

I am new in the cryptography and the information security problems, I try to understand things as much as I can and I know it's really complicated in the beginning. Considering the communication ...
0
votes
0answers
17 views

How does the speed of fast stream ciphers compare to non-cryptographic PRNGs?

Modern stream ciphers are so fast that I am wondering if they are good choices for non-cryptographic applications. Specifically, I am wondering how much slower optimized ChaCha8 or hardware-...
3
votes
2answers
80 views

Misuse-resistant authenticated encryption based on SHA-3/Blake2b and AES-CTR/ChaCha20

I am wondering if the following is a useful misuse-resistant authenticated encryption scheme: Parameters (shared by many users): Choose a hash function $H$, such as Blake2 or Keccak. SHA2 could ...
1
vote
1answer
28 views

Generally accepted algorithm for two-pass, misuse-resistant AEAD that is efficient in software

I would like to know what the standard is for two-pass, nonce-misuse-resistant AEAD that is efficient in software. Thus, AES-SIV is excluded; modes based on a stream cipher like ChaCha20 are ...
1
vote
1answer
46 views

Attacks on MICKEY 2.0 Stream Cipher

I would like to know if there are any known attacks, besides from side-channel attacks (differential fault attack, correlation power analysis, template attack), against MICKEY 2.0 or MICKEY-128 2.0. ...
3
votes
2answers
113 views

Classification of a stream cipher

How would one classify a stream cipher that is neither synchronous, nor self synchronizing? I would have thought asynchronous, but from all the sources I can find, asynchronous is synonymous with ...
6
votes
2answers
171 views

Advantages of making streamcipher stream depend on plaintext?

Most descriptions that explain how streamciphers work (like the one on Wikipedia), tend to describe a model that boils down to a simple “$ciphertext = plaintext \oplus stream$”, where the stream is ...
4
votes
1answer
35 views

Can the backdoor in Dual_EC_DRBG be used to create a public key stream cipher?

Dual_EC_DRBG has the property that if $Q = e\cdot P$, someone who knows $e$ can break the PRNG. This seems to lead to a public-key stream cipher: Alice chooses a random $P, e$, where $P$ is a ...
3
votes
1answer
181 views

How to clock a linear feedback shift register?

I have some trouble understanding what happens when a LFSR is clocked. I have tried many examples but I do not get the correct result. Can anyone point out my errors? I have the following polynomial: ...
3
votes
1answer
225 views

Any stream cipher with avalanche effect?

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 ...
1
vote
0answers
18 views

Are there known practical attacks on RC4-dropN? [duplicate]

RC4 is known to leak information about the first few bytes of the ciphertext due to keystream biases. However, are there known attacks on RC4-drop[N] where N is large enough, that leak information ...