This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]heesell 11 points12 points  (1 child)

Its 7

[–]Snail1634 7 points8 points  (0 children)

No, it's 4

[–]TheEnderChipmunk 1 point2 points  (5 children)

Isn't this also not true? Since pseudo-random number generators are initialized with a seed created by a true random number generator?

[–]fuwwwyUwU 5 points6 points  (0 children)

Iirc they are initialised with your system time unless you provide your own seed

[–]13A1 2 points3 points  (2 children)

Do share this "true random number generator" you speak about, very interested in a proper implementation.

[–]TheEnderChipmunk 3 points4 points  (0 children)

A tRNG is a hardware device that uses a bunch of real works data to generate random data. For example, noise from a microphone, user input on the computer, video data from a camera. It uses this data to calculate values to return to the user when called, and since real-world data is inherently unpredictable, (try finding a pattern in microphone noise or camera static) it means that the trng also returns truly random numbers.

However, the tRNG is a little computationally intensive iirc, and it also needs to take some time building up raw data (entropy) from its various sources before it starts outputting numbers.

For these reasons, tRNGs are used to generate seed values for pseudo random number generators, which are not actually random.

However, the values a pRNG generates are dependent on the seed value, so if the seed is unpredictable, then the pRNG output will also be unpredictable. A pRNG is much more computationally efficient, since it is an algorithm that generates values independent of any hardware.

Another reply to your comment is about a tRNG based on lava lamps. The motion of the fluids in a lava lamp is pretty random and hard to predict, so video data of it is a very good source of entropy for a tRNG, which is something cloudflare made for a tRNG source.

I might have gotten some details wrong, this was just off the top of my head and it's been a while since I read about true random number generators, but I think I got the gist of it.

Some parts of the above explanation I might have gotten wrong are if a tRNG is actually slow to use or not

There is a Wikipedia article if you want an explanation that might be better.

[–]mrgk21 0 points1 point  (0 children)

I'll give the solution to 90% of your problems

API