[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread James Johnson
Thank you for replying with such specific assistance. I am made acutely aware that I am only a Python enthusiast, and not an academic. Hashes are deterministic, not random, but byte by byte, they can be very random. Please accept the attached script as a "hack," that might be novel, or a curiosity

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread Wes Turner
QRNG "Quantum Random Number Generation" -> Hardware random number generator > Physical phenomena with random properties > Quantum random properties https://en.wikipedia.org/wiki/Hardware_random_number_generator#Quantum_random_properties FWIW, SciPy and SymPy have various non-CSPRNG random distrib

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread Wes Turner
https://docs.python.org/3/library/random.html : > Warning: The pseudo-random generators of this module should not be used for security purposes. For security or cryptographic uses, see the secrets module https://docs.python.org/3/library/secrets.html#module-secrets PEP 506 – Adding A Secrets Mod

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread David Mertz, Ph.D.
I should add, as does the Python documentation, that if you want genuinely non-reproducible random values, the `secrets` module exists and produces the best results possible on a given OS and computer architecture. On Unix-like systems, /dev/random is the best source of entropy you're going to fin

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread Chris Angelico
On Tue, 15 Nov 2022 at 03:16, David Mertz, Ph.D. wrote: > > In concept, what James suggests, is similar to the Random123 library, written > at D.E.Shaw Research by my sadly late colleague John Salmon. See > https://github.com/DEShawResearch/random123 and the linked academic > publications. E.g

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread David Mertz, Ph.D.
In concept, what James suggests, is similar to the Random123 library, written at D.E.Shaw Research by my sadly late colleague John Salmon. See https://github.com/DEShawResearch/random123 and the linked academic publications. E.g. https://dl.acm.org/doi/10.1145/2063384.2063405 In general, all PRNG

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread Chris Angelico
On Tue, 15 Nov 2022 at 01:34, James Johnson wrote: > > I wrote the attached python (3) code to improve on existing prng functions. I > used the time module for one method, which resulted in disproportionate odd > values, but agreeable means. > Current time of day is NOT random, and the low bits

[Python-ideas] Re: Better (?) PRNG

2022-11-14 Thread Barry
> On 14 Nov 2022, at 14:31, James Johnson wrote: > >  > I wrote the attached python (3) code to improve on existing prng functions. I > used the time module for one method, which resulted in disproportionate odd > values, but agreeable means. > > I used the hashlib module for the second. It

[Python-ideas] Better (?) PRNG

2022-11-14 Thread James Johnson
I wrote the attached python (3) code to improve on existing prng functions. I used the time module for one method, which resulted in disproportionate odd values, but agreeable means. I used the hashlib module for the second. It is evident that the code is amateur, but the program might result in b