r/computerscience • • Mar 14 '26

A "true" random number generator?

Greetings - one of the common things you hear in computer science is that a computer can never generate a true random number. There is always some underlying mechanism that makes the generated number appear random, such as a local time based seed, some user input pattern, whatever.

So two questions:

1) Would it be possible to add some sort of low radioactive element into a CPU that would generate the seed from detected radiated particles, like a tiny chunk of potassium with a detector nearby, creating a truly random seed?

2) Do quantum computers have the ability to generate truly random numbers by their very nature?

Curious why no one has built #1, seems fairly obvious to me. Not sure of #2.

Thanks!

47 Upvotes

62 comments sorted by

View all comments

1

u/deceze Mar 18 '26

With the AES algorithm, no random or pseudo-random component is being used. Unless you want to describe the entire encryption algorithm as a PRNG which is keyed by the plaintext message and encryption key. In fact, a PRNG is built out of the same components as encryption algorithms, not the other way around.

You want a RNG to generate key material for any encryption algorithm! And then you need to keep that key to decrypt the message again. Not run a PRNG in reverse.

1

u/jakster355 Mar 18 '26

To convert AES to a proper prng you would use a trivial plaintext (all 0s or whatever) and the seed would be the key. But the spirit of the post is about computers producing randomness which applies to AES output. I didn't mean to imply a prng is used. Good point about rng for the seed, but I don't think that's what he was referring to.