Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [pseudo-random-generator]

In cryptography, a pseudo-random generator (PRG) is a deterministic procedure that maps a random seed to a longer pseudo-random string such that no statistical test can distinguish between the output of the generator and the uniform distribution. Pseudo-random generators have numerous applications in cryptography. For instance, pseudo-random generators provide an efficient analog of one-time pads.

Filter by
Sorted by
Tagged with
2 votes
2 answers
354 views

Simple CSRNG design based on hash function

I was researching designs for cryptographically secure random number generators based on hash function. I know that there is Hash_DRGB but I can not understand why such a complicated design is ...
loewexy's user avatar
  • 21
0 votes
2 answers
62 views

Using random samples from indistinguishable ensembles to create new empirical ensembles

Suppose I have two computationally indistinguishable ensembles of random variables $\{X_i\}_i$ and $\{Y_i\}_i$ ($i$ is the usual security parameter). The random variables are both uniformly ...
JasperT's user avatar
0 votes
1 answer
97 views

Finding good shift operators for XorShift

I'm not certain this is the right place to ask but I'll ask anyway. I've been messing around with XorShift random number generators, I've only implemented a simple one copied almost verbatim from the ...
Nico Elbers's user avatar
0 votes
0 answers
38 views

Can I recover the seed used to generate the internal state of MT19937 using the state itself?

Is there any way to extract the seed that has been used to generate the state in python or any other language? I tried to find the implementation of the random.seed ...
Someone's user avatar
0 votes
2 answers
74 views

How can LCG based stream ciphers be broken?

I'm watching Christoph Paar's Introduction to Cryptography lecture series on youtube. In it he describes an example of an insecure stream cipher which uses XOR as the encryption and decryption ...
Nick's user avatar
  • 111
1 vote
1 answer
79 views

Is there a in-depth paper published about the Cloudflare's Lavarand and their CSPRNG?

I am diving into Cloudflare's Lavarand and its Cryptographically Secure Pseudo-Random Number Generator (CSPRNG) [1]. Does anyone know of any comprehensive papers or documentation that provide an in-...
Aidre Cabrera's user avatar
4 votes
2 answers
4k views

What is better source of random bytes: Yubikey or /dev/random (or both)? [closed]

Let's say I need to generate a key, I have these three options as to where to get random data: Yubikey (gpg-connect-agent 'SCD RANDOM 16384' /bye) ...
DimanNe's user avatar
  • 151
0 votes
0 answers
20 views

Generating arbitrary state/bit using Blum Blum Shub generaor. Simplification of Carmichael function term?

From wikipedia: An interesting characteristic of the Blum Blum Shub generator is the possibility to calculate any $x_i$ value directly (via Euler's theorem): $$x_i = \left( x_0^{2^i \bmod \lambda(M)} ...
Eugene Loy's user avatar
3 votes
0 answers
72 views

Deriving a cryptographic PRNG from a publicly random sequence

Consider a model of computation where we have a public oracle that provides access to a random sequence $R$. Given an index $i$ the oracle returns either 0 or 1, with the responses being deterministic,...
1110101001's user avatar
0 votes
0 answers
38 views

Proof for embedded composition of PRG's

I have two secure pseudorandom generators, $G_1 : S\rightarrow R, G_2 : R\rightarrow T$. Now I need to prove that the PRG $G_3(s) = G_2(G_1(s))$ is secure. I figured that I would construct two ...
Izzy Handkammer's user avatar
2 votes
0 answers
54 views

Inefficient double-lengthening PRG

I'm trying to prove that an inefficient double-lengthening PRG exists, i.e. construct a PRG $G: \{0,1\}^n \rightarrow \{0,1\}^{2n}$ My current approach is to bound the number of poly-time non-uniform ...
Stevie's user avatar
  • 123
0 votes
0 answers
69 views

Reversing a Floored Xorshift128+

We suppose that we have N consecutive numbers generated by JavaScript using: math.floor(math.random()*multiple), knowing that ...
El Delicio's user avatar
1 vote
0 answers
54 views

Let $l' > l > 0$. Construct a PRG that would transform any PRG of stretch $l$ into one of stretch $l'$

The way I understand this question is that we have a secure PRG G: $\{0,1\}^\lambda \rightarrow \{0,1\}^{\lambda + l}$, and we want to use it to make a secure PRG G' : $\{0,1\}^\lambda \rightarrow \{0,...
BB33's user avatar
  • 11
1 vote
2 answers
107 views

Relation between seed entropy of a CSPRNG and the output entropy

Since Linux 5.18, the internal state of the ChaCha-based CSPRNG is a 256 bits (32 bytes) BLAKE2s hash. There is also a fast key erasure mechanism which reseeds the CSPRNG every minute (source). I know ...
Rand0mMan's user avatar
  • 223
2 votes
1 answer
74 views

Interpretation of the Result of Dieharder Battrery of Tests: Very High p-value Result in rgb_lagged_sum Test in Dieharder Results in "WEAK" Assesment

I'm currently testing the randomness of using SHA-256 in Hash_DRBG mechanism based on this research. The parameters used in the testing are the default parameters, except for when the PRNG fails a ...
vnwrywn's user avatar
  • 35
2 votes
1 answer
158 views

How many encrypted messages can we know, so that scheme is secure?

Let $G$ be a secure PRG and let $s$ be a private key. We can define $\mathrm{Enc}(s,m) = G(s)\oplus m$. As long as we know only one encrypted message this scheme is secure, since $G(s)\oplus m \sim r\...
giochi's user avatar
  • 131
0 votes
1 answer
81 views

Custom linear random number generator

I've made an implementation of a linear RNG. It has two constants: b and p. Every time new value of ...
MrMgr547's user avatar
0 votes
0 answers
77 views

Possible MAC design

The problem Let the following be a family of PRF functions with key length $2\lambda$ $$\mathbb{F} = \{F_k:\{0,1\}^n\rightarrow\{0,1\}^n\}_{k\in\{0,1\}^{2\lambda}}$$ Assuming one way functions exists, ...
zBION1C's user avatar
0 votes
0 answers
173 views

Is the following hash function construction collision resistant?

The problem Let the following function be a collision reisistant hash function $$H=\{H_s:\{0,1\}^{2n} \rightarrow \{0,1\}^{n} \}$$ Let the following function be a PRG $$G:\{0,1\}^{n+1} \rightarrow \{0,...
zBION1C's user avatar
3 votes
3 answers
193 views

Where are TRNGs an absolute need?

Are there situations currently where a PRNG just will not do? Are there current situations where only a TRNG will be useful? What about if someone uses a cryptographically secure PRNG? What is the ...
Vardhan Mahajan's user avatar
1 vote
1 answer
131 views

My new PRNG (PaulssonSponge) with dieharder tests

I run an open source project implementing some RipeMD and SHA hashes, one day I got nerdy and threw together my own Sponge function. I have now tested it with the dieharder 3.31.1 test suite. Is it ...
Kristoffer Paulsson's user avatar
0 votes
1 answer
148 views

Discrete Fourier transform (Spectral) test

I am designing a pseudo random bit generator (PRBG) and I am using the NIST SP 800-22 suite to analyze the random characteristics of my PRBG. It turns out that my PRBG passes 14 out of 15 tests, and ...
Julian Osorio's user avatar
0 votes
1 answer
392 views

How do bad actors manipulate game results in real time within 'provably fair' gaming systems?

Ive been assigned research involving online gaming companies and their use of cryptographic algorithms to produce 'provably fair' results. The largest player in the industry uses a method involving a ...
Joey Jolly's user avatar
3 votes
1 answer
239 views

RSA/ ECC keygen HW vs SW

i have a pretty straightforward question but i can’t seem to find an answer : Regardless of the physical protection provided by an HSM or TPM or any hardware cryptographic key storage system, are keys ...
khaled's user avatar
  • 51
0 votes
0 answers
81 views

Article explaining Fortuna algorithm

Does anyone know an article that explains Fortuna algorithm for people without cryptographical background? If not, I would like to have an explanation because I don't manage to understand it.
Yoav Avidan's user avatar
1 vote
2 answers
85 views

Should I Test A PRNG Using A Fixed Entropy Source For Its Seed?

I want to test a C implementation of Hash_DRBG—which test_demo.c file I will modify to produce random binaries indefinitely to STDOUT as to be used by piping its output—using DIEHARDER for a research. ...
vnwrywn's user avatar
  • 35
2 votes
1 answer
92 views

Consecutive ones in a PRG

I'm trying to solve this problem. I tried this. Consider distinguisher $D$ such that $D(c) = \begin{cases} 1 & \text{If there is at least $2\log_2n$ consecutive 1's} \\ 0 & \text{o.w.} \end{...
Amir's user avatar
  • 23
1 vote
2 answers
180 views

Suppose $F_s$ is a PRF. Is $F'_s(x)=F_x(s)$ also a PRF?

Suppose $F_s$ be a family of keyed pseudorandom functions. Define $F'_s(x)=F_x(s)$. Is $F'_s$ a family of pseudorandom functions? It seems false but I am able to give a proof assuming $F$ is ...
Suraj's user avatar
  • 11
0 votes
0 answers
68 views

Security of the trivium stream cipher

So I've been trying to implement a Non-Deterministic RBG based on randomness polling from non-hardware sources (nothing novel, just a side-project). Since collecting entropy and further conditioning ...
vibhav950's user avatar
0 votes
0 answers
151 views

Proving that a PRG is insecure

I'm trying to show that the PRG $G$ defined as below is insecure for any binary matrix $A$. \begin{align} A&: m\times n& (n < m)\\ s&: n\times 1\\ G&: \{0, 1\}^n\rightarrow\{0, 1\}^{...
libre's user avatar
  • 11
1 vote
0 answers
162 views

If G is a PRG, is G' necessarily a PRG?

Given: A function $$G: \{0,1\}^{3n} \to \{0,1\}^{6n}$$ which is known to be a secure Pseudorandom Generator (PRG). A derived function $$G'(x_1 \| x_2) = G_b(x_1\|0^n\|x_2), \text{ where } x_1, x_2 \...
Steven's user avatar
  • 11
1 vote
0 answers
84 views

Pseudo random generator notation

So I'm reading this article where they talk shortly about pseudo random generators where I'm not quite familiar with some of the notation. They call $\lambda$ the security parameter. "...
StackExchangeMMH's user avatar
0 votes
1 answer
92 views

Does ISAAC really guarantee a cycle length of at least 2**40?

I just noticed that the FSE 1996 conference paper which defines ISAAC mentions a counter variable cc. This variable is said to be the reason why ISAAC has a ...
Guenther Brunthaler's user avatar
2 votes
0 answers
69 views

Is ISAAC+ actually an improvement over ISAAC?

I just tried to implement ISAAC from scratch, using the Jean-Philippe Aumasson paper from 2007 as a reference. This paper gives a definition of the original ISAAC algorithm as well as the improved ...
Guenther Brunthaler's user avatar
1 vote
0 answers
95 views

Trouble interpreting CTR_DRBG test vector results

I've implemented a CTR_DRBG random number generator according to NIST SP 800-90A Rev. 1 and I am now testing it with test vectors provided in NIST CAVS 14.3 (drbgvectors_no_reseed\CTR_DRBG.txt). ...
MDude's user avatar
  • 23
4 votes
1 answer
1k views

Why do Mersenne Twister use Mersenne prime but not regular prime numbers

I'm trying to figure out why Mersenne Twister use exactly Mersenne prime numbers but not regular primes. What makes Mersenne prime numbers more appropriate for this role than regular primes?
pacman's user avatar
  • 429
0 votes
1 answer
88 views

KangarooTwelve based Random-Access PRNG

Can the KangarooTwelve Keccak-p[1600,12] be used to create a CSPRNG in which there is random access to an element (or a small group of outputs) of the generated list (instead of sequential generation)?...
Ilan's user avatar
  • 1
0 votes
0 answers
73 views

Distinct sequences in a Fibonacci LFSR

How many distinct sequences can a $128$-bit Fibonacci LFSR (considering $4$ taps set for the maximum period) generate? Will all $2^{128} - 1$ distinct seeds produce distinct sequences? Also, let's say ...
vibhav950's user avatar
1 vote
1 answer
115 views

Can this algorithm be called a RNG?

So I developed this algorithm as RNG, although it looks random to me, I wanted to know the opinion of more experienced persons in the topic. ...
lucas's user avatar
  • 13
0 votes
2 answers
145 views

From Entropy's perspective how Encryption affects a Message?

How Ciphers, specifically, Substitution Ciphers and Transposition Ciphers manipulate the Entropy of Plaintext w/wo the aid of Entropy Source? Reversely, how Decryption manipulates the entropy of ...
Schezuk's user avatar
  • 153
5 votes
1 answer
136 views

Cryptanalysis of the GOC

The GOC (Générateur d'Octets Chiffrants, Ciphering Byte Generator) is a PseudoRandom Generator that was used during the late 20th century for content encryption in pre-internet Videotex terminals, ...
fgrieu's user avatar
  • 142k
2 votes
2 answers
2k views

How to generate n unique numbers from the output of a hash function?

What would be an easy way to use the hexadecimal output of a hash function (like md5) to generate n unique numbers from, say 0 to 15. Of course I could generate n ...
Starscream512's user avatar
2 votes
2 answers
557 views

What is the difference between a seeded RNG and an XOF hash?

Suppose I have some ZK proofs that were turned non-interactive using Fiat-Shamir heuristic. So I need to generate the challenge value deterministically using some data shared between the prover and ...
fjarri's user avatar
  • 289
2 votes
0 answers
49 views

Deterministically secure PRG from deterministically secure OWF

Consider the construction of "A Pseudorandom Generator from any One-way Function" [HILL99] in Hastad et al. One way to proof pseudorandomness of this construction is by contradiction. That ...
Nicholas Brandt's user avatar
0 votes
0 answers
72 views

Can I skip ahead with a quadratic congruential generator?

I have a congruential generator where $$ r_{n+1} = r_n^2 - c\;(mod\;p) $$ known $r_0$, $c$ and $p$ can i get $r_n$ without having to compute all the previous values?
Flame's user avatar
  • 1
0 votes
1 answer
76 views

RFC: Approach to CSPRNG

I've been experimenting in python with different approaches to cryptographically secure pseudo random number generators, comparing them using the NIST testsuite implemented by https://github.com/...
Amo's user avatar
  • 1
0 votes
1 answer
76 views

Regarding: Pseudorandomness, Pseudorandomgenerators and Padding

Hey there guys and gals, so I am right now studying topics regarding pseudorandomness. I was wondering why, for example with CBC-MAC oder a regular CBC blockcipher, we use padding instead of a PRG. ...
LePetit's user avatar
  • 15
0 votes
0 answers
40 views

PRFs with long outputs and short keys

Assume I have a PRF $F$, with polynomial key length $s_{F}(n)\geq n$, and output length $l(n)$. I need to construct a PRF $F'$, with key length $s_{F'}(n)=n$ and output length $l(n)$. I thought about ...
Weierstrass99's user avatar
2 votes
1 answer
262 views

Is Python secrets module using a unsafe RNG on Windows?

The Python secrets module claims to produce cryptographically secure random numbers. I did some research on which random number generator is used when you call the secrets module on Windows. I found ...
Riemann's user avatar
  • 221
2 votes
0 answers
60 views

Is it possible to craft a valid AES-CBC cipher-text that will decrypt (to random) with any possible key?

I am mainly looking to perform this trick for fun. I have access to an API that uses WebCrypto under the hood for encrypt and ...
cmdruid's user avatar
  • 21

1
2 3 4 5
12