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
2
votes
1answer
45 views

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

xChaCha20 Block Keys for Poly1305

So xChaCha20 has a nonce size large enough to safely use a random nonce with the same key. Poly1305 generally uses the first block of the cipher's output to generate its nonce. For xChaCha20 it would ...
0
votes
1answer
93 views

Why are stream ciphers computationally secure?

In case multiple stream ciphers exist, I'm refering to this specific instance in which you generate a key that is just as long as the msg, M, as a function of a nonce and a smaller key K. My textbook ...
1
vote
1answer
62 views

Does Wikipedia's WEP - RC4 example really demonstrate a related key attack or just an IV reuse attack?

On Wikipedia's Related Key attacks page, there is a section about WEP as an example to related key attacks. Encryption uses the RC4 algorithm, a stream cipher. It is essential that the same key never ...
0
votes
0answers
34 views

Why LFSR stream code is not suitable for encryption? [duplicate]

Why LFSR stream code is not suitable for encryption? Is there a special attack for LFSR?
3
votes
3answers
1k views

How to interpret my professor's statement about "seed" and "symmetric-key encryption"?

In the cryptography course, the professor said that: these days for symmetric key encryption, instead of sending out the key, Alice sends the seed to Bob, and then based on that Bob can get the key. ...
3
votes
0answers
74 views

Encrypt/Cipher and Decrypt/Decipher a string with a secret

In developing an app I have a simple use case in where I want to encrypt/cipher a string (it could also be a couple of bytes because it's essentially just an IP-Address). On the output I think it ...
-1
votes
1answer
84 views

What would be the benefits of using a faster cryptographic system with the same level of security as AES

Essentially I'm asking, what if I have designed a quantum-proof stream cipher that is faster than AES-256? Will using less computational power for encryption/decryption be valuable to companies or ...
0
votes
1answer
145 views

How to choose between AES256-GCM, XSalsa20Poly1305 and XChaCha20Poly1305?

In libsodium, there're 3 symmetric encryption(stream cipher) which are AES256-GCM(Hardware-accelerated), XSalsa20Poly1305 and XChaCha20Poly1305(uncertain which version of libsodium add support to ...
1
vote
0answers
36 views

What is the best way to save ChaCha20 Nonce in Cipher-Image BMP file?

I have a question about ChaCha20. As far as I know ChaCha20 is a cipher algorithm that uses 4 inputs: Key (secret) Constant (not secret) Block Number/Counter (keystream block number) Nonce (random ...
2
votes
0answers
43 views

Constants of 128-bit key version of the stream cipher Chacha [duplicate]

I am trying to find constants of 128-bit key version of the stream cipher Chacha. I know for 256-bit key version, constants are 0x61707865, 0x3320646e, 0x79622d32, 0x6b206574. Are these same for both ...
1
vote
1answer
62 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
21 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
112 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
37 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
40 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
103 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
43 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 ...
2
votes
2answers
99 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
67 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
455 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
177 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
41 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
47 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
38 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
80 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. ...
5
votes
1answer
348 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?
6
votes
1answer
115 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
273 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
164 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
67 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
76 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
187 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
176 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
77 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
536 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
743 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
77 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
91 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
83 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
94 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
61 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
294 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
95 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
106 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
28 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
98 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
237 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
74 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
2 3 4 5
10