Questions tagged [random-number-generator]

A random number generator is a software or hardware solution which functions as a generator of (real or pseudo) random numbers (or bits).

841 questions
Filter by
Sorted by
Tagged with
244 views

Is the complexity of NIST's CTR_DRBG needed for security?

I'm trying to find an efficient deterministic PRF construction that can quickly output a large amount of pseudo-random data from a seed of collected entropy. I ran tests with a contruction based on ...
363 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 ...
1k views

Why can a symmetric encryption algorithm be considered a pseudo-random number generation algorithm?

I have a question from my teacher: "Why can a symmetric encryption algorithm be considered a pseudo-random number generation algorithm? Can anyone explain it to me? And sorry if my english is not ...
90 views

I've experimentally verified that the following (incredibly simple) PRNG can have period $2^w - 1$ for $w = 8$ and $w = 16$, for appropriate choices of $r, c$, where $0 < r < w$: x \leftarrow ...
248 views

How good is blake3 compared to a random oracle?

How good is blake3 for generating pseudo-random bitstrings in comparison to a random oracle? Let's say we generated an arbitrarily long pseudo-random bitstring by concatenating blake3 hashes together ...
348 views

In proof of CPA-security of encryption scheme $(r, F_k(r)\oplus m )$ where: $F_k$ is a keyed function $r\in_R\{0,1\}^n$ is a random number, on page 85 of Introduction to modern cryptography we have ...
21k views

What does it mean for a random number generator to be cryptographically secure?

I've never heard a good answer. I'd like to hear details about: What are the criteria that make an RNG cryptographically secure? Why must your RNG be cryptographically secure? I.e., what are the ...
966 views

Can a deck of cards be used as a practical source of cryptographic randomness?

This is not a duplicate of Entropy measurement from shuffled cards, as this concerns use of cards as a cryptographic entropy source, rather than calculating entropy from some number of cards. The ...
564 views

Enumerating the bias of NIST and Pearson randomness extractors

The following is an extract from a paper about using your mobile phone as a true random number generator (TRNG). The mobile phone bit is incidental to this question though. I'm interested in the ...
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) ...
1 vote
27 views

Is the random number analiser software reliable for performing Nist 800_22 test

I am working on generating pseudo random numbers from a chaotic oscillator's signal. In literature I have read about the Nist 800-22 test used for checking randomness. I friend gave me a software &...
89 views

"intermediate" PRNG

Two popular example dynamical systems for PRNG are LFSRs, basically the orbit $(x^ks)_{k>0}$ for some non-zero seed $s$ and (primitive) $x$ in $GF(2^n)^{\times}$ CTR_DRBG, say with AES128 and 256-...
73 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,...
1 vote
749 views

Input size recomendation of sequence for each test in NIST SP 800-22

I am using the NIST SP 800-22 to evaluate the performance of the Random Number Generator. NIST SP 800-22 has a total of 15 tests. In each test, it has a recommendation for the size of the tested ...
3k views

How to prove the security of the PRNG?

Are there any realties tests or criterias that prove the security of the PRNG? What kind of tests or criteria?
662 views

Does a hash function in chaining mode or in counter mode make a better pseudo-random number generator?

I have two pseudorandom generators: $f_1$ takes a random seed $l_0||r_0$ $\in \{0,1\}^{160}$ as input and outputs $r_1||r_2|| \dots ||r_k$, where $l_i||r_i = \operatorname{SHA-1}(l_{i-1}||r_{i-1})$ ...
918 views

Breaking a Mersenne-twister RNG with unsequential outputs

Pardon me for this newbie-ish question. I'm still a novice in cryptography . I have an application that outputs random numbers from 0 - 12 (endpoints inclusive) unsequentially (some outputs are thrown ...
79 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 ...
82 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 ...
196 views

Correlation among pseudorandom sequences generated from correlated seeds

I want to see and mathematically verify how pseudonoise (PN) sequence generated by LFSR or maximum length codes would correlate (auto-correlation and cross correlation) for seeds of varying ...
194 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 ...
266 views

Entropy extraction from a Zener diode TRNG

My project is to build a true random number generator that relies on the avalanche effect in a Zener diode. This for a messaging device that uses one-time-pad encryption. Reading about similar ...
4k views

Given PRNG $G(s)$, why is $G(s) || G(s+1)$ not a PRNG?

I have given a pseudorandom Generator $G(s)$, $|s|=n$ whose expansion $l(n)$ is $>2n$. I also know that $G^\prime(s) := G(s_1,\ldots,s_{\lfloor\frac{n}{2}\rfloor})$ is a pseudorandom generator. Now ...
1 vote
87 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. ...
1 vote
3k views

Is it possible to compress a random sequence with high entropy?

I have an algorithm that generates a pseudorandom sequence with a length of 100k and high entropy. I would like to check the quality of its randomness. So, I used a popular software program to ...
69 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 ...
1k views

How to compute the dataset size required by dieharder tests?

I am trying to use the dieharder random number test suite. However, this suite requires massive amount of data (this paper claims 228GB for no rewinding for every test) for most of the tests. I'd like ...
399 views

Conformance of Windows Random Number Generator (SP800-90A) with Key Lifecycle Security Requirements of the BSI

The BSI (Federal Office for Information Security in Germany) has published a paper detailing the requirements of cryptographic modules for certain applications in the energy sector: Key Lifecycle ...
591 views

Is there a counterpart of /dev/random and /dev/urandom in Windows NT systems?

I am trying to implement a TRNG on Windows and among other entropy sources, I want to extract raw bytes from various kinds of CPU and process info. As per my knowledge, BCryptGenRandom is a CRNG in ...
1 vote
116 views

Manual entropy collection from sources with an arbitrary base

I'm writing a tool for manually collecting entropy from sources like coins and dice, and I'm wondering how to best deal with the case where the desired number of bits of entropy is not representable ...
1 vote
322 views

symmetric key generation - random number vs pbkdf2

I am working on improving my grasp on applied cryptography. Following question is just for learning/understanding purposes.. Lets say I want to generate a 16 byte key that I want to use for some ...
1 vote
116 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. ...
1k views

How can I recover mersenne twister when only the part of the bits?

https://github.com/tna0y/Python-random-module-cracker Here, when we get 32*624 bits of outputs from Mersenne-twister we can recover Mersenne twister. My question is when we get the parts of the bits, ...
220 views

Are TRNGs used in low power devices? Why?

I read somewhere that TRNGs are better than cryptographic algorithms that generate pseudo-random numbers (PRNGs) because these algorithms are more energy intensive than TRNGs. By low power devices, I ...
2k views

Introduction to LLL algorithm applied to linear modular inequalities

What is the Lenstra–Lenstra–Lovász lattice basis reduction algorithm about? How is it applied to solve for $x\pmod m$ a system of modular inequalities $(u_i\,x+v_i\bmod m)<w$ for $0\le i<n$? I'm ...
243 views

Can I predict CryptGenRandom on my own device?

I have a Windows 10 laptop with an algorithm that creates a random number using the PRNG CryptGenRandom. According to Wikipedia: Because CryptGenRandom is the de facto standard CSPRNG in Win32 ...
830 views

What are the state-of-the-art TRNGs today?

How fast are the fastest ones? Which ones have the most entropy? Which ones are the most practical ones? I tried looking for answers on Wikipedia and also, I tried reading papers, but I am couldn’t ...
198 views

Is it valid to transform the tested sample file and re-test, rather than invent additional randomness tests?

I'm enhancing the venerable ent randomness test suite. And I came across this idea in On Independence and Sensitivity of Statistical Randomness Tests. "To ...
1k views

Optimize the speed of a safe prime finder in C

I am trying to implement the Schnorr’s identification protocol in C. I need a safe prime in order to be able to find a generator of the cyclic group efficiently. The problem is that my program takes ...
1 vote
185 views

Can someone give a comprehensive guide on how to run NIST SP 800 90B entropy assessment c code in windows? [closed]

I am trying to run the github code in windows 11. I don't know what all I need to install in my laptop to run the C++ code. It would be a great help if someone can point out the steps to run the code.
278 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 ...
656 views

Generating X ids on Y offline machines in a short time period without collision

In theory this is what I have : Around 10 000 offline machines Each machine will generate around 10 000 ids I can program the machine in any way I want, but I prefer a low memory and low cpu They all ...
144 views

A HRNG that is NIST 800-90 compliant is not suitable for use for OTP generation right?

A HRNG that is NIST 800-90 compliant must use a DRBG in some way regardless of whether it adheres to a RBG1, RBG2 RBG3(XOR), or RBG3(RS) construction. This violates the requirement that the OTP is ...
702 views

Why does NIST SP 800-90C RBG3 construction require XOR or reseeding a DRBG with a physical entropy source to produce full entropy?

NIST 800-90C defines 3 classes of random bit generation (RBG) constructions: RBG1, RBG2 and RBG3. All constructions must include a DRBG from NIST SP 800-90A. The particular construction in question is ...
922 views

Trustless, Two-Party Random Number Generation

I've been having trouble with coming up with a random number generator that produces a random number between two parties. My current scheme is this: User 1 gives user 2 the hash of their randomly ...
35 views

Academic papers for the pros and cons of password based system and digital signature with challenge and response system

I don't really know what should be the correct title for this and the community can correct it after reading. I was the author of PKDSA (Searchable on github). I have the idea to do it because I feel ...
1 vote
46 views

How did the VB6 PRNG generate a byte output from a specific seed, and how to replicate in C? [closed]

I'm hoping to get some help regarding an old problem that has eluded me. I'm trying to figure out how the VB6 PRNG was used to generate a byte output from the two byte seed that the Randomize() ...
1 vote
135 views

Collision Resistance in Random Bit Generator

Consider following simple RBG where SHA-256 of random noise (more than 200Bytes of 4 bits entropy per byte) is computed to produce 256 output bits \$\text{output} = \operatorname{SHA-256}(\text{...
1 vote