# 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).

727 questions
Filter by
Sorted by
Tagged with
1k views

### How do you test randomness?

Suppose I receive a list of 1 million coinflips, and I want to know how likely it is that the list was randomly generated. My first thought would be to count the number of heads and tails, which ...
2k views

### ANSI X9.31: the purpose of the date/time vector in the PRNG?

What is the exact purpose of the date/time vector $dt$ in the ANSI X9.31 PRNG? $$I := E_K(dt)$$ $$R := E_K(I \oplus V_{old})$$ $$V_{new} := E_K(R \oplus I)$$ Specifically, the document seems ...
1k views

### Entropy estimation by Linux Kernel when adding entropy from TRNG

As per resources given below, after adding the bits to entropy pool, the Linux RNG estimates the amount of entropy for "credit_entropy_bits" function. It is estimating the amount of entropy of an ...
1k views

### Entropy vs predictability in PRNGs

If entropy is the measure of surprise, and a given PRNG has a uniform distribution, then the entropy would be high. So the Mersenne Twister(MT) has high entropy. But the MT is also predictable. You ...
2k views

### Is FIPS 140-2's "Continuous random number generator test" practical?

Section 4.9.2 of FIPS PUB 140-2 specifies, amongst other things, a "Continuous random number generator test." Here are the relavant bits: If each call to a[n] RNG produces blocks of n bits (...
12k views

### How to find generator $g$ in a cyclic group?

As generator $g$ is used in DH how do you find a combination of prime $p$ and $g$? eg: if we choose $p=23$ and its generator is $7$ (given in the book) how do we find the generator?
2k views

### Why do we use pseudo random PRNG in cryptographic applications instead of true random number TRNG

Cryptographic applications use deterministic algorithm for random number generation that are not statistically random but they appears to be random. Why do cryptographic applications use PRNGa ...
679 views

### Random number generator issue

I wrote a litte random generator using a geiger tube. I use a 16bit timer that overflows every ~1ms; when i get a reading form the geiger (~36count/minute), i save the current timer value as "random ...
434 views

### Are there flaws in (cryptographic) science/engineering/software/research due to pseudo random generators?

I am trying to see if there were any incidents in the past where using PRNG or not actual random scheme leaded to wrong conclusion in research. For example, a lot of fields today use simulations to ...
2k views

### Is Curve25519 vulnerable to private key exposure in the case of a bad RNG?

I'm really excited by what I've learned of advancements in elliptic-curve cryptography. Curve25519 seems to be a great choice at this point in time, but if I recall correctly, some elliptic curve ...
2k views

### Is ISAAC considered secure as a cryptographic random number generator?

The ISAAC site claims it is secure, but I wasn't aware of any trusted 3rd party sources that verified its security.
2k views

### Differences between methods of hardware random number generators

I'm reading about various hardware random number generators which - among others - implement the following approaches: Analog-to-digital converter noise Johnson–Nyquist noise Reverse biased ...
4k views

### Is SHA-1 secure when used to implement a PRNG

I read SHA-1 is still a secured hashing function with no collision found as of now. However, it's just a matter of time for someone to come up with such a collision or attack. Therefore, in new ...
3k views

### When is an RNG a CSPRNG, a CSRNG, or a TRNG?

In a recent answer to a question about CSPRNGs, it was stated that… Nondeterministic algorithms where there is no such requirement, and ideally could be replaced by a true random generator. Example: ...
4k views

### True random numbers generated by sensors

Is using sensor raw data a good way of generating true random numbers? I mean using an IPhone's gyro/accelerometer raw output as a base for generating an array of true random numbers.
1k views

### Are there secure stream ciphers that cannot be parallelized?

Are there any stream ciphers (or a deterministic random number generators, that should work as well I guess?) that cannot be parallelized? For example, if I seed it with a specific value, and then &...
773 views

### Can I break a random number into two smaller vectors and consider them as two random numbers?

I have a cryptographically secured RNG that uses a recommended block cipher to generate the random number. As its output, I receive the random number which is very large, but the application requires ...
2k views

### Generating a random number using a quantum computer

I have been looking into the creation of truly random numbers using a quantum computer, but I have been having trouble with finding resources on this problem. Is it possible to create a truly random ...
465 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})$ ...
1k views

### Perform ENT / Dieharder on raw entropy or on whitenened entropy?

In this question about hardware random number generator, a discussion about the following question has been started: In order to test RNG's and entropy's quality, should test suites like ENT and ...
566 views

### How did SHA-1 'feed' Blum Blum Shub

One of the most (in)famous hardware derived random number generators was Lavarand (patent). It did it with funky lava lamps. An image of the lamps was hashed and fed into Blum Blum Shub (BBS) to ...
2k views

### Can it ever be impossible to invert a PRNG?

I've read about the possibility of inverting the Mersenne Twister after 624 numbers of output. 624 matches the state size of my implementation of the Twister. Coincidence? If the generator only ...
2k views

### True Random Number Generator by milliseconds per keystroke (TRNG-Kms)

The simplest way to generate truly random numbers for OTP keys is to measure the time in milliseconds between each keystroke on a keyboard. The randomness depends on the user typing in various speeds. ...
1k views

### Why does anyone use elliptic curves for a CSPRNG?

I saw Martijn Grooten's talk on elliptic curves at BSides London this year, and it helped me understand how elliptic curve crypto works, especially in the case of Diffie-Hellman (ECDH). He also ...
998 views

359 views

### Are my random numbers really "bad" or is that a statistical effect which "must" happen from time to time?

My software uses a TRNG (entropy source) which is part of an MCU. A check of random numbers generated by my software, carried out by a testing authority revealed a problem, which I have to examine ...
1k views

### What weaknesses in Hash_DRBG did NIST find and fix?

Matthew Green states in the Practical Kleptography presentation (video, at about 12:15) that Hash_DRBG (from SP800-90A) as originally proposed by NSA had potentially exploitable flaws or bugs and that ...
2k views

### How do I produce a stream of secure random numbers from AES-Counter mode?

I have just made my own program to encipher, using AES in counter mode, and have validated it using NIST data. So I know I have done it properly. I have read that AES-CTR can produce a stream of ...
1k views

### Is this a good entropy collector and whitening technique?

I'm just reviewing a program someone wrote to provide high quality random data using an entropy collector and a hash based whitening technique. I'll try summarize the process: Collect entropy from ...
3k views

### RSA random prime generator

What is the current standard of random bit generators? RSA relies on two large prime numbers, and I am wondering what is the algorithm used to generate such numbers?
460 views

### A source of randomness that anyone can independently, conveniently and robustly access?

Does there exist a source of randomness that anyone in the world can independently, conveniently and robustly access? For example, the 10th decimal place of the temperature in Mexico City is ...
618 views

### Can I create a random access CSPRNG from a hash?

Can I use a keyed hash of a counter as a secure CSPRNG? E.g. 4th random block is Hash(4, seed) If not, what are the possible attacks?
292 views

### Are factorization algorithms parallelizable?

I was reading about the Blum-Blum-Shub random number generator, and its security depends on the hardness of factoring very large numbers (like many things in crypto do). I'm just wondering, if I have ...
1k views

### Why aren't stream ciphers extremely secure?

The way I understand it, stream ciphers are pretty much one time pads off-sourced to a PRNG (the seed is the key that generates the fake one time pad). So why not just use one or more CSPRNGs (...