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
0 votes
1 answer
199 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 ...
hollyjolly's user avatar
2 votes
3 answers
555 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 ...
4d4143's user avatar
  • 23
2 votes
1 answer
213 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 ...
David J.'s user avatar
  • 133
0 votes
0 answers
170 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. ...
Richard's user avatar
1 vote
0 answers
82 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 ...
Anthony Monday's user avatar
4 votes
3 answers
2k 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.
Nirian_Qasqai's user avatar
1 vote
1 answer
130 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.
Mimi's user avatar
  • 61
1 vote
1 answer
195 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) ...
user93353's user avatar
  • 2,191
0 votes
0 answers
36 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 ...
user93353's user avatar
  • 2,191
4 votes
1 answer
198 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 ...
A. B.'s user avatar
  • 141
0 votes
1 answer
976 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 "...
Evan Su's user avatar
  • 449
1 vote
0 answers
85 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, ...
user185887's user avatar
1 vote
2 answers
198 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 ...
DatsunBing's user avatar
1 vote
0 answers
391 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 ...
Modal Nest's user avatar
  • 1,443
3 votes
1 answer
883 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 ...
caveman's user avatar
  • 573
1 vote
0 answers
80 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? ...
Dror123's user avatar
  • 21
1 vote
2 answers
890 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 (...
Dror123's user avatar
  • 21
0 votes
1 answer
84 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$?
Edmilson Almeida's user avatar
4 votes
1 answer
345 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: ...
Basj's user avatar
  • 553
1 vote
1 answer
507 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 ...
user93353's user avatar
  • 2,191
3 votes
0 answers
195 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 ...
Modal Nest's user avatar
  • 1,443
5 votes
1 answer
305 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 ...
Contaso's user avatar
  • 53
0 votes
1 answer
35 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-...
Antonio Santoro's user avatar
2 votes
1 answer
547 views

How to increase Poly1305 performance?

I was analysing the Chacha20 algorithm and the Poly1305 MAC generation from RFC 7539. It seems that the Chacha20 is quite faster compared to AES on CPUs without hardware support like AES-NI. But ...
Emmanuel Scaria's user avatar
3 votes
2 answers
1k views

Text cipher option that can decrypt the same ciphertext to two DIFFERENT and DESIRED outputs given DIFFERENT keys (and/or alphabet)

I have a pen pal that I discuss with. In our latest discussion it was proposed to write a short message that is ciphered and have the other one find what it is, given some clues. I would like to ask ...
Lucian Viorel's user avatar
1 vote
1 answer
427 views

Is it possible to acquire the next keystream of Salsa20? (If you know part of the keystream)

When you know the Salsa20's keystream, how do you know the next keystream? In other words, can I infer the next keystream when I don't know the Key and IV of Salsa20, but the keystream is ...
YGK's user avatar
  • 13
6 votes
1 answer
612 views

Pseudorandom Generator

In a cryptographic application, two types of (pseudo)random bit streams are needed: a stream $A= a_{1}a_{2}a_{3}\ldots$ in which $\Pr[a_{i}=0]=\Pr[a_{i}=1]= 1/2\ \forall i$ and a stream $B= b_{1}b_{2}...
Krishna Mallick's user avatar
1 vote
1 answer
215 views

Can repeatedly encrypting a message with a secure cipher ever produce the original input like what happens in ROT13?

Lets say we have a message 'm'. We encrypt 'm' using a stream cipher or any other type of cipher with cryptographic security that produces an output equal in length to the length of 'm'. Then if we ...
user81520's user avatar
1 vote
0 answers
113 views

Should you pad messages encrypted with stream ciphers?

Should you pad messages encrypted with stream ciphers? The obvious answer seems to be yes, right? It obviously leaks the exact length of the plaintext. Consider a situation where an adversary knows a ...
Kyb3r's user avatar
  • 33
2 votes
1 answer
168 views

Is precomputing AES-CTR key stream secure?

Q0 : Is the precomputed key stream vulnerable to side-channel attacks like a lookup table for exemple ? I don't think it is because a lookup table is accesed very often, that's what makes it non ...
moutonlapin28's user avatar
2 votes
1 answer
187 views

ChaCha matrix - tests for original implementation not passing due to bad counter encoding?

Hello everyone and already thanks for taking your time to read this! I am currently implementing ChaCha20 (256-bit key) for my bachelor thesis. I know that there are two version of ChaCha out there; ...
ekzyis's user avatar
  • 43
53 votes
1 answer
11k views

Why do 5G, 4G, etc., use non-conventional algorithms?

Looking up information about 5G and the previous 3GPP standards, why have they been incorporating non-conventional algorithms into the standards? For example, AES has been considered secure for ages ...
MCCCS's user avatar
  • 731
3 votes
1 answer
93 views

Number of keystreams generated in Kreyvium for a single key/IV pair

Kreyvium employs 128-bit key and 128-bit IV. By a single initialization procedure using a key/IV pair, how many keystreams can be generated?
Abu Fathima's user avatar
1 vote
1 answer
446 views

ECRYPT Salsa20 Test Vectors Interpretation

I am currently implementing Salsa20 for my bachelor thesis. After having verified all the functions needed for the final encryption function with the given test data in the specification from DJB, I ...
ekzyis's user avatar
  • 43
0 votes
1 answer
110 views

Encrypting a string of arbitrary size with a big integer

I am currently writing Python script that initiates a secure handshake. I am kind of reinventing the wheel here, so that I can properly learn it. Now, I have Diffie-Hellman mostly working from ...
Jarmund's user avatar
  • 101
0 votes
2 answers
91 views

Logarithmic brute-force for stream-ciphers

First of all, I want to make sure I understand stream ciphers correctly: I put a plainchar (e.g. byte?) through the stream cipher and receive a cipherchar. Correct? When I now have a pair of ...
darkdragon's user avatar
1 vote
1 answer
369 views

Hash based stream cipher where the input is a constant, key, nonce and counter

This is a question out of curiosity ! A hash function produces an output that is considered computationally infeasible to reverse. Let's consider, for the sake of illustration purposes a tried and ...
Aravind A's user avatar
  • 1,020
0 votes
0 answers
50 views

Approach used with XOR cipher in black box scenery

What's the approach used in cryptanalysis to make an decrypter for a simple xor stream cipher in a Black Box scenery with only the output?
Growlnx's user avatar
0 votes
1 answer
210 views

Question about ChaCha20's security

I wonder the Stream Cipher ChaCha20 only changes 96 bits each block, why it can produce 512 bits keystream block, I mean in the concept of a random number generator, the ...
MrQ.'s user avatar
  • 1
0 votes
1 answer
63 views

Can we use a hash-based stream cipher against DPA attacks?

There have been lots of DPA researches against block ciphers. I was wondering if we use a cryptographically secure hash of an incremental counter as a stream cipher, will it withstand DPA attacks? ...
adieux's user avatar
  • 21
2 votes
0 answers
47 views

Linear approximattion of $(x+y) \bmod 2^n$ in FSM of SNOW 2.0 where $x,y$ in $F_{2}^n$

I would like to understand the linear approximation of $(x+y) \bmod 2^n$ by linear masking method in the paper refereed ""Improved Linear Distinguis'hers for SNOW 2.0" by Kaisa Nyberg and Johan Wall´...
Subrata Nandi's user avatar
0 votes
0 answers
842 views

Most used stream ciphers?

I am writing my Bachelor thesis on topic "Current state of stream ciphers". So my questions is: Which stream ciphers are used the most. So far I have A5 family, RC4, E0 (Bluetooth), Snow 3G and ZUC (...
František Štrba's user avatar
1 vote
0 answers
59 views

Can Trivium ciphertext be decrypted by an adversary if the key is known, but the IV is not?

Suppose that the adversary is able to recover the key of Trivium cipher. But the associated IV is unknown to him. Will he be able to decrypt the ciphertexts without any complexity?
Ans's user avatar
  • 73
9 votes
1 answer
2k views

Which cipher is used in the new 5G network?

I think that the stream ciphers SNOW 3G and AES are used in 4G (LTE). But I can't find which cipher is used in 5G networks and how encryption is done. Is there any official documentation?
František Štrba's user avatar
0 votes
0 answers
48 views

Best method for storing cryptographic secret key and generation of IV in Trivium?

How the secret key for Trivium cipher is stored and managed in an embedded system (IoT sensor node)? How the IV is generated in a Trivium? How to justify the fact that storing a fixed value (for ...
Ans's user avatar
  • 73
6 votes
1 answer
1k views

What is the significance of IV in stream ciphers like Trivium?

In Trivium cipher, an 80-bit key and 80-bit IV (initialization vector) are used initially to set up the initial state. I would like to know, Role of IV in stream cipher? Can we make IV a secret ...
Ans's user avatar
  • 73
2 votes
2 answers
1k views

Attack on LFSR key stream generator

Alright this is a question I found on one of my books: Given is a stream cipher which uses a single LFSR as key stream generator. The LFSR has a degree of 256. How many plaintext/ciphertext bit ...
Trey's user avatar
  • 189
2 votes
1 answer
4k views

Is XChacha20 - Poly1305 Quantum resistant?

This is a question just out of curiosity, as I am a newbie to Post Quantum Cryptography. I have read several articles where they emphasize that current standardised symmetric encryption algorithms (...
Aravind A's user avatar
  • 1,020
3 votes
1 answer
863 views

Which is the best algorithm for large scale file encryption other than AES?

I've been looking for a fast, powerful and robust algorithm for encrypting large files with authentication . I would like to implement the algorithm on my own without using third party software. I've ...
Aravind A's user avatar
  • 1,020
1 vote
1 answer
99 views

Storing values under different keys (e.g. during key rotation)

If you are encrypting some secrets (database passwords, access tokens, etc). When it comes to key rotation, you'll need to store those encrypted values twice, for a short period of time (under the ...
Craig Francis's user avatar

1 2
3
4 5
11