A stream cipher is an encryption algorithm which encrypts arbitrary length plain text, using a (fixed length) key. Some stream ciphers generate a key stream from only the key, which is then XOR-combined with the plain text, others feed back plain text or cryptotext into the algorithm to create the ...
48
votes
10answers
3k views
Is modern encryption needlessly complicated?
RSA, DES, AES, etc. all use (relatively) complicated mathematics to encrypt some message with some key. For each of these methods, there have been several documented vulnerabilities found over the ...
12
votes
4answers
688 views
With sufficient randomness, is XOR an acceptable mechanism for encrypting?
I have heard criticism of various cryptosystems saying that "at their heart, they were just XOR."
Is this just ignorance, or is there something inherently wrong with XOR based ciphers?
9
votes
4answers
424 views
Can you make a hash out of a stream cipher?
A comment on another question made me wonder about something:
Assume you're on a rather constrained platform — say, a low-end embedded device — with no built-in crypto capabilities, ...
7
votes
2answers
177 views
Streaming API to authenticated encryption
In regards to NaCl, I asked DJB he had any intent to add a streaming API to an authenticated cipher. His response was obvious in retrospect, that one should never release a decrypted plaintext before ...
6
votes
4answers
918 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 ...
6
votes
2answers
316 views
Are Stream Ciphers Less Secure?
This is by no means a scientific observation, but it seems to me that stream ciphers receive a lot less attention than block ciphers. Is there any reason for this? (Is it because block ciphers are ...
6
votes
2answers
298 views
What are the methods to construct a primitive binary nonlinear feedback shift register (NLFSR)?
Given a binary shift register of $n$ bits, a primitive binary nonlinear feedback shift register will generate a sequence with a period of $2^n - 1$.
While I am unable to find a paper which directly ...
5
votes
3answers
185 views
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. ...
5
votes
3answers
434 views
Converting a stream cipher into a block cipher
The well-known Counter-Mode (CTR) mode of operation for a block cipher essentially converts any block cipher into a stream cipher. Is there a way to do the reverse? In other words, given a "good" ...
5
votes
0answers
380 views
How can I find two strings $m_1$ and $m_2$, knowing that I know $m_1 \oplus m_2$? [duplicate]
Possible Duplicate:
How does one attack a two-time pad (i.e. one time pad with key reuse)?
I recently started to follow the cryptography class of Dan Boneh on coursera.org and the first ...
4
votes
3answers
542 views
Is it feasible to build a stream cipher from a cryptographic hash function?
A few years ago I devised a symmetric-key system that worked like so:
...
4
votes
3answers
392 views
CBC - a canonical mode, even though there are streaming modes
Why is CBC considered the canonical mode when there are streaming modes available such as CFB and OFB? One thing that I can think of is that in CBC you can easliy do range-based decryption. All you ...
4
votes
1answer
267 views
How secure is my OTP program?
I'm writing an One-Time Pad encryption program, because I got really interested in the idea of " encryption which has been proven to be impossible to crack if used correctly".
I'm writing the program ...
3
votes
4answers
372 views
Why isn't the alternating step generator used more often?
According to the Wikipedia entry for the Alternating Step pseudorandom number generator, there is no public cryptanalysis for this device since it was invented back in 1987 by C.G. Gunther. I have ...
3
votes
3answers
362 views
Stream cipher add instead of xor
In a stream cipher, the bytes of the plaintext are usually XORed with the keystream to produce the ciphertext. Would there be anything wrong with adding the bytes instead (with overflow), if adding ...
3
votes
3answers
350 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 ...
3
votes
1answer
133 views
When is an asymmetric scheme considered broken?
Does the following quote imply that valid encrypted data can be created and decrypted by someone other than the owner of a private key:
An asymmetric encryption scheme is considered to be broken ...
3
votes
1answer
180 views
Are there secure stream ciphers that cannot be parallelized?
Are there any stream ciphers (or a deterministic random number generators, that should work as well I guess?) that cannot be parallelized?
So for example if I seed it with a specific value, and then ...
3
votes
2answers
271 views
are CFB and OFB really meant for streaming?
CFB, OFB and other modes are meant for streaming and don't require padding. Are there still limitations such as the text needs to be greater than key length?
3
votes
4answers
495 views
Stretching a random seed to maximize entropy
I'm using a random number generator that requires me to pass it a big (several kilobytes) pool of random data for initialization.
I've gathered entropy from various system metrics (free memory, ...
3
votes
1answer
207 views
LFSR dynamic mutation
In normal LFSR, the state is a function of the initial seed, taps positions and time, nothing else. I've seen a modification of LFSR that works like this:
...
3
votes
1answer
122 views
Proof that Alternating Step Generator and modifed ASG' have equivalent security?
The Alternating Step Generator (ASG) is a PRNG combining 3 LFSRs. Output of the ASG is the XOR of the output of two clock-gated LFSRs. At each step, a single one of these LFSRs is clocked, according ...
3
votes
3answers
171 views
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 ...
3
votes
2answers
281 views
Finding the LFSR and connection polynomial for binary sequence.
I have written a C implementation of the Berlekamp-Massey algorithm to work on finite fields of size any prime. It works on most input, except for the following binary GF(2) sequence:
$0110010101101$ ...
2
votes
2answers
131 views
Number of states in a LFSR
Do all $2^{\ell}$ (where $\ell$ is the bit length of the shift register) states always occur in a LFSR or can I choose my taps badly so some states are skipped and the period is shortened?
If so is ...
2
votes
2answers
84 views
encrypt message with one digest 0-9 instead of 01-26
How much will the security of one-time pad decrease if I use one digit from 0-9 instead of 1-26?
for example plaintext = "blue" and ...
2
votes
2answers
253 views
Simple xor cipher extension
Probably the simplest cipher is the xor cipher with a single integer. One can extend this to use more than one integer by several means. I'm wondering if there is any benefit to doing more than this:
...
2
votes
2answers
183 views
Is any decent RNG acceptable as a stream cipher?
I have a function f(x,n) that takes a 128-bit key x, and generates n bytes of pseudo-random data. I've tested the output bytes this function for various keys with the NIST RNG testing suite (NIST ...
2
votes
1answer
111 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 ...
2
votes
1answer
85 views
Is the following scheme secure for different cipher
Let's say I have
two keys K1 and K2.
two messages M1 and M2 of the same length.
Cipher (E,D)
3 ciphertexts: C11, C12,C22 where Cij = E(Ki, Mj)
In situation ...
2
votes
1answer
75 views
Is it safe to assume Salsa20 to be a PRP?
Often in security proofs a certain block cipher is assumed to be a pseudorandom permutation or PRP. I wonder if this goes for stream ciphers as well, and specifically for Salsa20.
If limit ourselves ...
2
votes
1answer
59 views
Using UMAC with stream cypher
I understand that most stream ciphers, due to being applied with a simple XOR, are specially fragile against data tampering, and must be used with some MAC mechanism. So I am investigating the use of ...
2
votes
1answer
1k 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 ...
2
votes
1answer
144 views
Stream ciphers based on discrete logs
Blum Blum Shub is a stream cipher that is provably reducible to the difficulty of factoring integers.
I'm wondering whether there is a similar construction for discrete logs?
For example, I could ...
1
vote
2answers
93 views
Combining LFSRs for Stream Ciphers: Why do we need high non-linearity?
Linear Feedback Shift Registers (LFSRs) can be excellent (efficient, fast, and with good statistial properties) pseudo-random generators. Many stream ciphers are based on LFSRs and one of the possible ...
1
vote
2answers
188 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
vote
1answer
126 views
Randomized stream cipher using multivariant quadratic equations
This is an idea I had for cipher that I thought might reduce to a known hard problem. It is efficient (compared to something like BBS) in terms of time but not in terms of space.
Here's the ...
1
vote
1answer
73 views
Non-cryptographic hash function as MAC for stream ciphers
I understand that for a stream cipher to be useful, there must be a way to verify that the message was not tampered with (bits were flipped by an attacker).
So, instead of using some cryptographic ...
1
vote
2answers
84 views
How can I protect against the failure of a block or symmetric cipher?
Can I protect against the failure of a block or symmetric cipher by chaining different techniques together? If so what implementation details should I be aware of?
Are some combination of ciphers ...
1
vote
4answers
146 views
Using the output of a stream cipher, how to guarantee the integrity of 4 bytes of data?
I am designing a simple and secure stream communication protocol. My idea was to build each message sent to the wire as:
(message size || clear text || UHASH(message size || clear text)) $\oplus$ ...
1
vote
1answer
88 views
Stream cipher malleability
Considering a stream cipher that produces a ciphertext "c" from a message "m" and a key "k" is it possible to apply operations (multiplication and/or addition) directly to "c" without knowing the key ...
0
votes
3answers
260 views
Can PBKDF2 be used to create an OTP to encrypt random plaintext?
I want to encrypt a truly random plaintext (a key file) based on a user password. I'll use PBKDF2-HMAC-SHA256 to generate an encryption key from the password, but I'm wondering if I even need to both ...
0
votes
2answers
201 views
Is the Blum Blum Shub PRNG suitable to create initialization vectors?
Is it a good idea to use a Blum Blum Shub Generator to create my initialization Vector (IV) in AES-OFB (Output Feedback Mode)?
0
votes
2answers
66 views
Voice Call Safety [closed]
When i was dealing with an assistant of my bank through mobile call, she asked me to insert my bank login code after a beep.
I was wondering if this procedure is secure against a Man In the Middle ...
0
votes
1answer
72 views
Question about use of IV in this cipher
Main cipher objective : Generate a keyed CSPRN stream, that does not expose useful information about the state of the CSPRNG, and xor this with the plaintext. To prevent an attacked who could somehow ...
0
votes
1answer
121 views
How to plot the distribution of a ciphertext?
Is there any plot or visualizing program that can plot the distribution of a plaintext and then the distribution of the ciphertext after applying a ciphering encryption algorithm? I am interested ...
0
votes
1answer
61 views
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 ...
0
votes
0answers
63 views
Stream Cipher : Never use stream cipher key more than once [duplicate]
Possible Duplicate:
Taking advantage of one-time pad key reuse?
How does one attack a two-time pad (i.e. one time pad with key reuse)?
Denote C is cipher text, m is message, and PRG(k) is ...
0
votes
0answers
98 views
Secure Pseudorandom Number Generators [closed]
Can anyone list the pseudo-random number generators used in todays stream ciphers that are considered secure or highly resistant to cryptanalysis?
-1
votes
3answers
113 views
fixing WEP by treating all messages as one long stream
in the course of introduction to cryptography on coursera
professor suggested treating all messages as a long stream XORing them with the key
this way we will not need to change the key and will not ...