Skip to main content
115 votes

Why do some people believe that humans are "bad at" generating random numbers/characters like this?

In short, it is more than a belief: there is strong evidence that humans are not good entropy sources. There is a test for this Man vs. Machine. Or, why Man is not a Particularly Good Source of ...
kelalaka's user avatar
  • 49k
49 votes
Accepted

Can an AI really generate random numbers?

First of all, you have only 540 digits, and 540 digits seems a bit small. I would have asked the AI to generate as many digits as it can. Nevertheless, I was able to find the following sources of non-...
Joseph Van Name's user avatar
42 votes
Accepted

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

What are the criteria that make an RNG cryptographically secure? In short, a DRBG [deterministic random bit generator] is formally considered computationally secure if a computationally-limited ...
Stephen Touset's user avatar
35 votes
Accepted

How can C rand() be exploited if a secure seed is used?

The ISO/IEC 9899:1990 edition of the C standard contains: EXAMPLE     The following functions define a portable implementation of rand and ...
fgrieu's user avatar
  • 142k
32 votes
Accepted

A website that identifies an RNG from its output

A colleague of mine told me about a website that, given a sufficient quantity of output from an PRNG, had been able to deduce which application the PRNG was from. As you correctly identified this ...
SEJPM's user avatar
  • 46.1k
31 votes

Why do some people believe that humans are "bad at" generating random numbers/characters like this?

For me, the fraud-related applications of Benford's Law come to mind. When people make up data they tend to create overly uniform data, even when it's not appropriate. There's a definite psychology ...
thesquaregroot's user avatar
29 votes

A website that identifies an RNG from its output

One tool that tries to do this is untwister. It's almost certainly not the tool you were thinking of, though, as it cannot determine if the output came from OpenSSL specifically. It can determine ...
ChrisInEdmonton's user avatar
22 votes

Is a PRG more costly than AES or any other encryption standard?

A one-time pad requires a true random sequence that is as long as the material you want to encrypt. If you have a pseudo-random sequence, then you don't have a one-time pad: you have a stream cipher. ...
Gilles 'SO- stop being evil''s user avatar
22 votes
Accepted

What is wrong with XOR encryption with secure PRNG?

The bytes that you XOR with the message to get the ciphertext are called the key stream. It is secure to create a key stream using a CSPRNG yes, a cryptographically secure pseudo-random number ...
Maarten Bodewes's user avatar
  • 93.2k
21 votes
Accepted

Is it possible to recover the seed used by Python's pseudo-random number generator?

I have the first 40 numbers of the sequence. Is there a way to recover the seed or find the next 460 numbers in the sequence? The first thing to know is that Python's random module uses Mersenne ...
otus's user avatar
  • 32.2k
21 votes

Using Tweets as a Random seed

The other answers provide very good lists of reasons not to use Twitter as an entropy source. What follows is the flip side of your question:- Why would you want to? Tweets are typically read on ...
Paul Uszak's user avatar
  • 15.6k
20 votes
Accepted

Using Tweets as a Random seed

What you are suggesting is not a good idea for a general purpose random number generator. It could be meaningful for very specific use cases if you need a random number generator whose output can be ...
kasperd's user avatar
  • 1,387
18 votes

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

What are the criteria that make an RNG cryptographically secure? From en.wikipedia.org/wiki/CSPRNG: Given all outputs so far, there must not be any algorithm that predicts future outputs with ...
Luc's user avatar
  • 1,528
18 votes

Why do some people believe that humans are "bad at" generating random numbers/characters like this?

Why would a dice rolled be "more random" than simply coming up with a sequence in your head, and then changing some of them? Humans have too many biases regarding what a random sequence is. ...
Jean-Baptiste Yunès's user avatar
17 votes
Accepted

Overview of relations between cryptographic primitives?

You'll find it in any textbook on basics of cryptography, for example Foundations of Cryptography by Goldreich. I have added a figure which sums up the relationship between the primitives: arrow ...
ckamath's user avatar
  • 5,298
16 votes

What is wrong with XOR encryption with secure PRNG?

Yes, you can; it's called a stream cipher. It can be viewed as an approximation of a one-time pad, where you don't have enough entropy available to generate an OTP key (which must be the same length ...
dan04's user avatar
  • 279
15 votes

Is it possible to recover the seed used by Python's pseudo-random number generator?

Python uses a Mersenne twister PRNG, and though it is not secure it does have a large state. You have here 40 numbers, the first one gives you 1 bit and each subsequent number has an extra bit for a ...
Meir Maor's user avatar
  • 11.8k
15 votes

Using Tweets as a Random seed

How are you going to decide which tweet to use? Randomly? This quickly leads to a chicken / egg problem. What if the chosen tweet is one word? That would not add a lot of entropy. What if twitter is ...
Maarten Bodewes's user avatar
  • 93.2k
15 votes

Why do some people believe that humans are "bad at" generating random numbers/characters like this?

Randomness is a measurable, statistical property of a set of values. It doesn't mean the same as "hard for a human to guess." Your sample string is hard for a human to guess, but it isn't ...
JesseM's user avatar
  • 462
14 votes

How can C rand() be exploited if a secure seed is used?

I once played this online game, it was an old-school MUD. You log in, chat, kill some goblins. It had a casino. You go into the casino and you bet X gold, and there was a 40% chance you win double ...
Ron Penton's user avatar
14 votes
Accepted

How fast does a pseudorandom number generator have to be in order to be competitive?

On modern CPUs, a fast Cryptographically Secure Pseudo-Random Number Generator runs sizably faster than one cycle per byte. We are talking >40Gbit/s. See numbers there. Top contenders are AES-CTR ...
fgrieu's user avatar
  • 142k
14 votes

Why do some people believe that humans are "bad at" generating random numbers/characters like this?

People are not that bad, but we're slow. See How were one-time pads and keys historically generated? In summary, MB's of 100% secure key material were generated for one time pads by people simply key ...
Paul Uszak's user avatar
  • 15.6k
13 votes
Accepted

What is the relation between the existence of a cryptographic hash function and the existence of a PRG?

There is a black-box separation between one-way functions and collision resistant hash functions. This was proven at Eurocrypt 1998 by Dan Simon, in the paper entitled Finding collisions on a one-way ...
Yehuda Lindell's user avatar
12 votes
Accepted

What does "seed" mean in cryptography?

The seed of a pseudorandom number generator — whether cryptographically secure of not — is the initial input that defines the pseudorandom sequence of outputs generated from it. It's not really a term ...
Ilmari Karonen's user avatar
11 votes

What are the dangers of using CPU clock drift for generating random data?

A TRNG is never used instead of a CSPRNG. They serve different purposes. A TRNG is used to seed a CSPRNG. A CSPRNG alone isn't enough to generate random data since it's reproducible. A hardware ...
Gilles 'SO- stop being evil''s user avatar
11 votes
Accepted

Does ChaCha20-Poly1305 need random nonce?

No, it doesn't need a random nonce. Yes, if you use an incrementing counter, that works. As the RFC says, the only requirement is uniqueness; as long as you make sure that each nonce you use is ...
poncho's user avatar
  • 148k
11 votes
Accepted

Perfect shuffle possible with limited raw entropy?

Is it possible to generate all shuffles with a PRNG that has 64, 128 or 160 bit internal state? No, for restriction of "possible .. with" to a deterministic procedure using the Pseudo RNG output as ...
fgrieu's user avatar
  • 142k
11 votes

Can an AI really generate random numbers?

Answering the title - yes, it can. A neural network can generate random output if it contains a layer introducing randomness. For example - when I use the TensorFlow framework I can consider tf.random....
Tomasz Witkowski's user avatar
10 votes
Accepted

Why is ISAAC not a pseudo random number generator?

Trying to distinguish a synchronous stream cipher from a CSPRNG seems to me a bit like trying to distinguish ice from frozen water. Any secure stream cipher is a CSPRNG, and any CSPRNG can be used as ...
Ilmari Karonen's user avatar
10 votes

Is a PRG more costly than AES or any other encryption standard?

Distilling your question down to these two salient points:- Why don't we use OTP in every case, what is the downside? leads directly to Why wouldn't everyone encrypt with a One Time Pad? and I ...
Paul Uszak's user avatar
  • 15.6k

Only top scored, non community-wiki answers of a minimum length are eligible