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.

Filter by
Sorted by
Tagged with
1
vote
1answer
59 views

Getting the plaintext encrypting the ciphertext

Context: an encryption game from overthewire (the link to it: https://overthewire.org/wargames/krypton/krypton6.html, also good for more info) where given the ciphertext, one must obtain the plaintext....
0
votes
0answers
18 views

Can knowledge of algorithm be used to reduce anonymity?

This is a bit of a crazy hypothetical, but I think it best illustrates what I'm looking to ask. Scenario + Question There's a distributed & decentralized cloud storage network that's starting to ...
0
votes
1answer
57 views

Semantic Security Game

I need help understanding semantic security, in particular, the part on the 'game'. But first, from my understanding, is semantic security is a 'weaker' and more flexible way to determine that a ...
0
votes
1answer
27 views

Where can I find test vectors for ChaCha20 (trying to understand Wikipedia example)?

I was playing around with stream ciphers an found this Wikipedia ChaCha20 page (the ChaCha variant). What I'm lost with is how to test this code. There are no testvectors anywhere on that page and I ...
1
vote
1answer
38 views

Mifare Classic, authentification protocol question

Thanks to reverse engineering papers on Mifare Classic, one can study the authentication protocol. However, I have a problem understanding how it works. In the above document, after the reader ...
0
votes
0answers
98 views

Designing your own Algorithm

I have been told to design my own algorithm as a college assignment. What I could have come up with was a random cipher. For example: Suppose my plaintext is: AND ...
0
votes
0answers
34 views

Finding initial key of Fibonacci LFSR knowing only polynomial and output stream-cipher

I need to know whether it is possible to find the initial key of a Fibonacci LFSR knowing only length and taps and output stream-cipher bit sequence? Plaintext is not ASCII, nor some other sort of ...
1
vote
1answer
70 views

Discrepancy $δ$ in the Berlekamp-Massey Algorithm

I have a question regarding to the Berlekamp–Massey algorithm. Can someone guide me to understand the idea/intuition of this algorithm? According to the explanation in Wikepedia, in each iteration, ...
2
votes
1answer
44 views

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 ...
4
votes
1answer
375 views

Why are block ciphers mostly used as stream ciphers?

Using a block cipher with using either CTR or GCM mode gives us a stream cipher, the only difference being that CTR does not include a MAC tag or AAD but GCM does. I think these are the most commonly ...
2
votes
1answer
78 views

It possible to encrypt .bmp bitmap files using Stream Cipher Chacha20?

Maybe this sounds like a stupid question. I'm sorry for that. I just wanted to know is it possible to encrypt a bitmap image file like *.BMP, and generate the ciphertext which is an obscure bitmap ...
0
votes
0answers
36 views

Practical application of Stream cipher Trivium

We know stream cipher Chacha has practical application. Do you know any practical application of Stream cipher Trivium?
3
votes
1answer
46 views

Nonlinearity of a Boolean function with odd number of input bits

Highly nonlinear functions are used in combination generators and other stream ciphers. We know that maximum nonlinearity (hamming distance to all affine functions) of $f$ is achieved when $f$ is bent ...
0
votes
0answers
37 views

Equivalent keys in Hash Functions

Let's suppose I want to use a (keyed) hash function as a stream cipher, I provide a key and a message to be hashed as a counter (like a nonce), and so, XOR each hashed output block on the plaintext. ...
3
votes
1answer
73 views

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. ...
4
votes
1answer
305 views

What does that mean, that A5/1 is clocked?

What does that mean, that A5/1 is clocked? What happens if the clocking bit agrees with the majority bit?
5
votes
1answer
78 views

Is there a library that output LFSR images given parameters?

I'm looking for a library that given parameters; feedback polynomial, initial values then it will produce $\LaTeX$ / Tikz codes to include in Latex documents or LFSR images. Is there such a library? ...
2
votes
2answers
250 views

Benchmark for CSPRNG as stream ciphers?

My limitation in my security protocol is that I want my RNG as CSPRNG and I also want it to be super fast. If I use Salsa20 or ChaCha or AES counter mode, I don't get the desired speed. I want my PRNG ...
1
vote
1answer
150 views

Which test suit is better to say if PRNG is CSPRNG:TestU01 or NIST?

Actually my concern is that I am planning to apply xoshiro256+ for implementation of stream cipher https://prng.di.unimi.it/ for my cryptographic application. It passes the BigCrush tests. Will it ...
1
vote
1answer
63 views

how can identify which cryptanalysis is used ( Indistinguishability cryptanalysis against classical ciphers) [duplicate]

I have 10 ciphertexts and 10 plain texts I want to know which cipher is from which plain text how can I know this I know the name of substitution cipher, transposition cipher, Vigen`ere cipher and ...
0
votes
0answers
72 views

Is multiple encryption with stream ciphers vulnerable to meet-in-the-middle attacks?

Let's suppose I encrypt something with a stream cipher (CSPRNG) two times using two 256-bit keys and different IVs. Will I get 512-bit encryption strength?
0
votes
2answers
121 views

AES plaintext is smaller than 128 bits [duplicate]

I'm currently developing a AES implementation in a graduation project at university. As far as I know, AES uses a 128 bit block length as input . if the entered string to encrypt is not 128 bits such ...
1
vote
1answer
157 views

Are all stream ciphers algorithms based XOR with the key?

I'm new to cryptography and I try to understand more how the stream encryption works. When it comes to stream encryption I understand that the paradigm is to perform 1-to-1 bit encryption; the input ...
1
vote
1answer
69 views

Listing first 8 bits generated by LFSR

Consider the primitive polynomial P(x) = x^4 + x^3 + 1, initialized with the bit string (shifting occurs from left to right, were the right-most bit represents the LFSR output): 1101. List the first 8-...
1
vote
1answer
492 views

Can ChaCha20 provide integrity?

I have read that in general stream ciphers do not provide data integrity. Can ChaCha20 be implemented in such a way (perhaps like counter mode with message authentication in AES) to provide this?
1
vote
1answer
298 views

What is the difference between synchronous stream ciphers and asynchronous stream ciphers? [closed]

What are the benefits and drawbacks of each?
1
vote
1answer
65 views

Can Stream Cipher be Used to Encrypt & Decrypt a File (Eg: .txt .docx .exe .zip)?

I was new to cryptography. And I know that in the world of cryptography there are two types of Symmetric Algorithms: Stream Cipher (RC4, Salsa & Chacha) Block Cipher (DES, AES) And when doing ...
0
votes
1answer
72 views

Finding Multiplicative Inverse In Field

Consider the finite set Z_257 of non-negative integers less than 257. The number 257 is a prime, so Z_257 forms a field with addition and multiplication mod 257. How can I use the Extended Euclidean ...
1
vote
1answer
64 views

How long must be the key of a stream cipher?

I am watching Lecture 3 (Stream cipher, random numbers and one time pad) by Christof Paar and perhaps its something that will be explained in another lecture but: When he explains how XOR works, in ...
2
votes
1answer
76 views

basic question regarding two-time pad attack

Dan Boneh's Crypto 1 Course includes a lesson on stream ciphers with the following slide: He asks the question: And the answer he gives is $m \oplus p$, which is why this is insecure. But I don't ...
0
votes
0answers
48 views

Recreate RC4 Stream cipher

I'm trying to learn how to go about cracking RC4 ciphers (nothing illegal, its an old, i.e., not active challenge for a job application, so no cheating). I have nine md5 hashes with their own ciphers. ...
1
vote
0answers
63 views

Serious Cryptography by Jean-Philippe Aumasson - Chapter 5 Stream Ciphers - Attacking Salsa20/8 - Page 100 Last Paragraph

I'm currently reading "Serious Cryptography - A Practical Introduction to Modern Encryption" written by "Jean-Philippe Aumasson" published by NoStarch in 2018. In "Chapter 5 ...
2
votes
3answers
209 views

Can anyone explain to me the difference between the OTP (one-time pad) and Vernam Cipher?

I heard they are very similar, although there are subtle differences between the two.
1
vote
1answer
85 views

Is Paillier a stream or block encryption

Does Paillier follow a stream encryption or block encryption technique. If it’s a block encryption then what is the size of the block in bits or bytes.
1
vote
1answer
87 views

Salsa20 expands a 256-bit key and a 64-bit nonce into a 2^70 byte stream - where did the 2^70 come from?

From Section 3.1 in DJB's document on The Salsa20 family of stream ciphers- https://cr.yp.to/snuffle/salsafamily-20071225.pdf Salsa20 expands a 256-bit key and a 64-bit nonce (unique message number) ...
0
votes
0answers
26 views

Strange for loop in salsa20_word_specification function

This is wrt to implementation of the salsa20_word_specification function at https://cr.yp.to/salsa20.html The 2nd for loop goes like this ...
4
votes
1answer
93 views

Does a one-time pad of digits 0-9 have any weaknesses?

I'm working on one of those unsolved puzzles, and one theory I have is that one or more sections of it are using digits of pi, e, or some other irrational number as a one-time pad. (The obvious ...
0
votes
1answer
169 views

Security of ChaCha compared to AES and Serpent

I'm trying to understand how secure XChaCha20 is in comparison with other ciphers. From what I know, ChaCha is more secure than AES, but less secure than Serpent. My question is how much more "...
1
vote
0answers
73 views

How does a pseudorandom generator produce a similar distribution to $U_{n}$?

According to Wikipedia, a function ${\displaystyle G:\{0,1\}^{\ell }\to \{0,1\}^{n}}$ with ${\displaystyle \ell < n}$ is a pseudorandom generator against $\mathcal {A}$ with bias $\epsilon$ if, ...
1
vote
2answers
82 views

Stream cipher vs OTP, with /dev/urandom and secure key exchange

My application will work in an office setting where a user can directly and securely collect a long One Time Pad. For example, it may be 16Gb on a USB drive. This would fill me with joy except that ...
1
vote
0answers
92 views

Would a key recovery attack on ChaCha's keystream would be made more secure with an AONT?

To be clear I'm well aware that ChaCha doesn't need to be "improved". Also, I have no intentions or misguided ideas about trying to "improve" it. My question is hypothetical, and ...
3
votes
1answer
391 views

How to find out the block size of Xchacha20 in Libsodium?

I heard that Xchacha20 works like a block cipher so that even if it wants to encrypt one byte, it will do the work of at least one block. So technically it works similar to a block cipher in counter ...
1
vote
0answers
56 views

Usage of block and stream ciphers

I see that in many applications stream ciphers are common than block cipher - whether is Salsa20, AES-GCM, etc. In which cases would a stream cipher be preferred over a block cipher and vice versa? ...
1
vote
2answers
269 views

Stream cipher and block cipher usage in network data encryption

Stream ciphers are usually used for streaming data encryption, such as voice, and also for low layers data encryption. For example, MACSec uses AES-GCM encryption. In L3 ad L4 security protocols (...
0
votes
1answer
43 views

Having two messages and a result ciphertext, is it possible to know which one was encrypted using One Time Pad?

I have two messages $m_1$ and $m_2$ and a result ciphertext $c$, one-time pad was used to create the ciphertext $c$, is it possible to know which message was used to generate the ciphertext $c$?
1
vote
1answer
95 views

Is a stream cipher and a (cryptographically secure) PRNG nearly the same thing?

If I let the authentification tag aside (which is important), encrypting with AES-GCM and a fixed key and nonce: ...
1
vote
1answer
103 views

Breaking the 40 bit DVD CSS stream cipher

This is from the transcript of Dan Boneh's Coursera Crypto course https://www.coursera.org/learn/crypto/lecture/mQAkP/real-world-stream-ciphers So it turns out this is easy to break in time roughly ...
3
votes
0answers
85 views

Does varying ChaCha rounds add any security?

This paper introduces 'Freestyle' a randomized, and variable round version of the ChaCha cipher. It uses the concept of hash based halting condition, where a decryption attempt with an incorrect key ...
5
votes
1answer
230 views

Stream Cipher Key Stream from Successive Hashes

I'm currently studying crypto and wondered what would be wrong with the following process... I want to encrypt a long message $M$ with a short symmetric key $K$ and a public nonce $X$. The idea is to ...
0
votes
1answer
23 views

OFB output jth-block expression clarification

Stalling says: OFB encryption can be expressed as Cj = Pj⊕E(K, Oj-1) where Oj-1 = E(K, Oj-2) Some thought should convince you that we can rewrite the encryption expression as: Cj = Pj⊕E(K, [Cj-1 ⊕Pj-...

1
2 3 4 5
10