[ / / / / / / / / / / / / / ] [ dir / abc / acme / agatha2 / bestemma / builders / islam / sonyeon / wooo ]

/g/ - Technology

Name
Email
Subject
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Options
dicesidesmodifier

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 16 MB.
Max image dimensions are 15000 x 15000.
You may upload 5 per post.


File: 3c197f53044d9a2⋯.jpg (96.96 KB, 634x937, 634:937, 4D64DA5200000578-5859467-T….jpg)

 No.7599

Back in the day I remember when the randomness was not quite as random as I would like it to have been. Example: computer generated randomness was based on the uptime of the cpu and if you made a program which started at a particular time in the uptime of the cpu. Let's say 2.32575 seconds after the computer was started you would get the same sequence of apparently random numbers. My question is, has this improved? how has randomness been bettered in the last 20 or 30 years? I am not an expert in random number generation so can anyone explain in simple terms if, and how, random number generation has improved in that time?

 No.7625

What you're describing is this: https://en.wikipedia.org/wiki/Linear_congruential_generator, a pseudo-rng.

This type of algorithm is cyclic, you cannot go beyond a certain limit. Therefore, the set from which you pick your numbers is bound, not infinite. It also depends on the allocated bits used to represent a number (32 bits ==> 2^32 possibilities). If you use arbitrary precision, this issue is no more a bottleneck.

Back in the old days, randomness wasn't as necessary and mathematical models weren't as computer friendly as today. Nowadays, because of computer simulation (i.e. Monte Carlo-Method) and cryptography, quality random numbers became a must.

There are three classes of RNG (Random Number Generators):

1. Cryptographically secure random sequences or values

2. "Real" or "True" random number sequences

3. The rest

These classes are defined by the generation method and the target. For example, "real" random numbers can only be generated by hardware exploiting some unpredictable phenomenon (white noise, specific atoms count in an area, a sensor of some sort, ...): https://en.wikipedia.org/wiki/Hardware_random_number_generator.

(these can be used everywhere, mostly for cryptographic algorithms).

For crypto, I'll let you read this: https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator

Check out this algorithm: https://en.wikipedia.org/wiki/Blum_Blum_Shub, there's a link for a nice paper called About Random Bits.

When it comes to methods, there are many. For example, you can use the linux /dev/urandom to generate a file and stop there. Or, hash the file using sha256 or another algorithm and extract a pseudo-random amount of bits from the hash and combine them to build a value.

I would recommend reading the following article: https://www.2uo.de/myths-about-urandom/

Enjoy




[Return][Go to top][Catalog][Nerve Center][Cancer][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / abc / acme / agatha2 / bestemma / builders / islam / sonyeon / wooo ]