lurk101
Posts: 289
Joined: Mon Jan 27, 2020 2:35 pm

Re: Random Number Generator Using Build In Hardware

Sun Oct 04, 2020 5:35 pm

Heater wrote:
Sat Oct 03, 2020 6:16 pm
I'm pretty sure that chaos in my mind can have effects outside. After all, if even one electron moves in one synapse of by brain, it wiggles an electric field, generates a magnetic field, even disturbs gravity, in some small way, that radiates out to the rest of the universe at the speed of
Ah, but what about all the quantum phenomenon happening in your brain at the sub-atomic level?
I always wondered how it is possible that the para-* guys are not totally blown away by all this, not curious how it all works, and still yearn for for some spooky "other thing".
Methinks that if the para folks were interested in spooky they'd do the hard work of understanding the ultraviolet catastrophe and all that ensued.

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Sun Oct 04, 2020 6:37 pm

lurk101 wrote:
Sun Oct 04, 2020 5:35 pm
Ah, but what about all the quantum phenomenon happening in your brain at the sub-atomic level?
Yeah, what about them?

Humans tend to have this idea that they can do something different, and more better, than a computer can. That is to say something more than than within the mathematical confines of a Turing Machine. This does not fit well with the mechanistic view of the world through Newtonian Mechanics, where everything is deterministic and runs like clockwork.

To that end some suggest that we have some kind of "mind", "psyche", "soul", "spirit", whatever you want to call it. That is separate from our physical being.

Hard headed physicists are not so keen on these spooky/hippy/religious ideas. So they look for some other means by which a human could be more that just a computer.

Enter quantum mechanics. Great, that throws a whole pile of unknowable randomness into things. Perhaps the human "mind" arises because of that. Which for sure puts it outside the rigid, logical, mathematics and limitations of the Turing Machine.

The renowned physicist Roger Penrose explored these ideas in his famous book "The Emperor's New Mind" back in the 1980's : https://en.wikipedia.org/wiki/The_Emperor%27s_New_Mind. Although I noticed recently he has stepped back from the ideas presented there a bit.

But anyway, let's assume those quantum phenomenon happening in my head some how shape what I think and do. The question still remains: What is all this about telekinesis? That has never been demonstrated.
lurk101 wrote:
Sun Oct 04, 2020 5:35 pm
Methinks that if the para folks were interested in spooky they'd do the hard work of understanding the ultraviolet catastrophe and all that ensued.
Quite so.

Although I'd say not even something as conceptually complex as the ultraviolet catastrophe.

Did anyone of those "para" folks ever do any simple high school / undergraduate lab exercises. Like estimating the mass of an electron or measuring the speed of light or seeing how electric charge, magnetism and motion can produce motors and generators.

All these things, and many more simple experiments, are bind blowing and "spooky" enough. And pose far more questions in ones mind than they answer if one is curious.

Heck, why does a frikken magnet stick to my fridge door?
Memory in C++ is a leaky abstraction .

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Sun Oct 04, 2020 9:30 pm

Did anyone of those "para" folks ever do any simple high school / undergraduate lab exercises. Like estimating the mass of an electron or measuring the speed of light or seeing how electric charge, magnetism and motion can produce motors and generators.
not to talk about the Double-slit experiment and Quantum entanglement.... :roll:

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 12:59 pm

dsyleixa123 wrote:
Sun Oct 04, 2020 9:30 pm
not to talk about the Double-slit experiment and Quantum entanglement.... :roll:
Oh boy. Let's not go there.
Memory in C++ is a leaky abstraction .

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 2:06 pm

tbh, I think that would be a great para folks experiments, apart from RRNGs:
set up the Double-slit experiment and force the electrons by mental power to go just throught the left slit. :ugeek: :mrgreen:

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 3:18 pm

dsyleixa123 wrote:
Mon Oct 05, 2020 2:06 pm
tbh, I think that would be a great para folks experiments, apart from RRNGs:
set up the Double-slit experiment and force the electrons by mental power to go just throught the left slit. :ugeek: :mrgreen:
Bites lip, thinks, do I really want to reply to this... Oh, what the heck:

I do hope those emoji are supposed indicate you are joking.

The whole point of the Double-slit experiment, the famous mystery of the thing, is that it impossible to tell whether the photon/electron/whatever traveled though the left slit, the right slit or both. As soon as one tries to find out what is happening there the interference pattern produced by the slits disappears.

Which is especially odd when considering electrons, which are otherwise considered to be point like particles and do have a point like effect on the photographic film or whatever the interference pattern is detected with at the end of the experiment.

Some how the experiment requires to have both slits to produce the interference pattern. But how can a particle like an electron travel through both?
Memory in C++ is a leaky abstraction .

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 3:32 pm

I know that, I'm into that quantum theory and mechanics, that's why the emojies 8-)
1 electron travels through both slits at a time, because as a wave, it can.

ejolson
Posts: 5971
Joined: Tue Mar 18, 2014 11:47 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 5:08 pm

dsyleixa123 wrote:
Mon Oct 05, 2020 3:32 pm
I know that, I'm into that quantum theory and mechanics, that's why the emojies 8-)
1 electron travels through both slits at a time, because as a wave, it can.
My understanding is that electrons are particles shaped like vitamin pills with minus signs on them but much smaller. The wave-like effects can be explained as the result of the combined psychokinetic powers of many scientists in need of additional publications for promotion.

Back on the topic of the Raspberry Pi hardware random number generator, is it still the case that it is not mixed into the Linux entropy pool, or has that changed with the latest 5.x kernels?
Last edited by ejolson on Mon Oct 05, 2020 5:17 pm, edited 2 times in total.

lurk101
Posts: 289
Joined: Mon Jan 27, 2020 2:35 pm

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 5:16 pm

dsyleixa123 wrote:
Mon Oct 05, 2020 3:32 pm
I know that, I'm into that quantum theory and mechanics, that's why the emojies 8-)
1 electron travels through both slits at a time, because as a wave, it can.
How can you just be 'into' quantum theory? It takes a lifetime of study, starting with Planck.

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 5:21 pm

naaah, not a lifetime. There are very good books, also for beginners to that topic, and the math about it is mostly Linear Algebra (ok, as to the optional wavefunction form it's Analysis).

@ejolson: https://en.wikipedia.org/wiki/Wave%E2%8 ... le_duality

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 5:40 pm

lurk101 wrote:
Mon Oct 05, 2020 5:16 pm
How can you just be 'into' quantum theory? It takes a lifetime of study, starting with Planck.
Hardly. I got a good handle on a lot of QM during my 3 years as a Physics undergraduate. Of course we had to study a whole bunch of other stuff as well during that time. Forgotten the most of it now though.

So I reckon if one is smart and keen one could pick up enough QM from books and videos now a days.
See the lectures: https://theoreticalminimum.com/courses/ ... 012/winter
Read the book: https://www.goodreads.com/book/show/182 ... -mechanics
Memory in C++ is a leaky abstraction .

ejolson
Posts: 5971
Joined: Tue Mar 18, 2014 11:47 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 6:15 pm

Heater wrote:
Mon Oct 05, 2020 5:40 pm
lurk101 wrote:
Mon Oct 05, 2020 5:16 pm
How can you just be 'into' quantum theory? It takes a lifetime of study, starting with Planck.
Hardly. I got a good handle on a lot of QM during my 3 years as a Physics undergraduate. Of course we had to study a whole bunch of other stuff as well during that time. Forgotten the most of it now though.

So I reckon if one is smart and keen one could pick up enough QM from books and videos now a days.
See the lectures: https://theoreticalminimum.com/courses/ ... 012/winter
Read the book: https://www.goodreads.com/book/show/182 ... -mechanics
As a student I learned from

Image
https://www.amazon.com/Introductory-Qua ... 001DN3IBG/

The professor teaching the course was not afraid to assign lots of homework. That was probably the first course I took where the exercises took so much effort that I got to see the sunrise the morning before the deadline. Strangely, quantum mechanics along with a proof-based calculus class were part of my effort to prepare for a job in which I didn't have to stare at a computer every day.

Unfortunately, the joke was on me and computers popped up in almost every facet of daily life. Now my phone and car have turned into computers. There are even computers which come for free with a magazine subscription that have a hardware random number generator.

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 7:42 pm

One of my favorite courses was on Statistical Mechanics. Bose-Einstein, Fermi-Dirac and all that. The prof. said in the first lecture "I don't recommend any text book for this course. Because I have not written it yet". After that every week we got photocopies of draft chapters of the book he was writing. They were wonderful. Sadly I don't recall his name nor the title of his book.
Memory in C++ is a leaky abstraction .

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 8:52 pm

Heater wrote:
Mon Oct 05, 2020 5:40 pm
...
Read the book: https://www.goodreads.com/book/show/182 ... -mechanics
I didn't know that specific book yet, but it's already available in German, too, and was 5-star high-rated at Amazon. I just ordered it, out of curiousity 8-)
(Nonetheless, I am not a physicist, just interested, so "into" it ;-) )

ejolson
Posts: 5971
Joined: Tue Mar 18, 2014 11:47 am

Re: Random Number Generator Using Build In Hardware

Mon Oct 05, 2020 11:08 pm

dsyleixa123 wrote:
Mon Oct 05, 2020 8:52 pm
Heater wrote:
Mon Oct 05, 2020 5:40 pm
...
Read the book: https://www.goodreads.com/book/show/182 ... -mechanics
I didn't know that specific book yet, but it's already available in German, too, and was 5-star high-rated at Amazon. I just ordered it, out of curiousity 8-)
(Nonetheless, I am not a physicist, just interested, so "into" it ;-) )
While browsing for the book I used as a student I also found

Image
https://www.amazon.com/Introduction-Qua ... 107189632/

which I like very much on account of the cat as well as the introduction of Hermitian operators in Chapter 3--neither too soon nor too late. Unfortunately, Section 12.5 on Schrodinger's cat was missing from the free preview and to Fido's dismay there wasn't anything about Dirac's dog at all.

Back on the subject of random numbers, I'm having quite a time trying to construct a 32-bit unsigned multiply function using only 16-bit 2's compliment signed integers. While the only available arithmetic operations are addition, subtraction, multiply, divide and modulus, the main difficulty so far has been a corrupt SSD caused by what appear to be memory errors on the x86 PC that serves for my desktop. Who would have known those matched DIMMs would also function as a built-in hardware random number generator when paired in dual channel mode. It appears the random numbers do not arise from a quantum source, otherwise, I might have been able to fix the fault using a simple Jedi mind trick. If only the Pi 4B supported Zoom.

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 7:38 am

after all the discussion, why would anyone need a hardware RNG, other than the excellent available PRNGs we have been talking about?

User avatar
jahboater
Posts: 6270
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 7:51 am

dsyleixa123 wrote:
Tue Oct 06, 2020 7:38 am
after all the discussion, why would anyone need a hardware RNG, other than the excellent available PRNGs we have been talking about?
1) Cryptography.
2) Lotteries
...
Pi4 8GB running PIOS64 Lite

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 8:01 am

which advantage would a uint64_t HW RNG number have from a uint64_t PRNG number for cryptography or Lotteries?
Or is it just about the seed?

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 8:02 am

The person who resurrected this thread after five years wants them for some experiments into micropsychokinesis where clearly a totally deterministic, algorithmic, PRNG will not do the job: viewtopic.php?f=33&t=127706#p1735383 and a real physical phenomena must be used that ones mind-rays can have an effect on.

Of course a real noise source will not do the job either. But never mind.

Real random numbers are required for cryptography. As noted above.

They are also required for online gambling and such. There have been examples of people figuring out properties of the PRNG in use on such sites and making unexpected winnings.

Anyway, even in games and simulations etc where on wants a lot of random numbers a PRNG is often used for it's speed but seed by a real random source at start up to ensure the sequences obtained from the PRNG are as randomly different as possible on each run.
Memory in C++ is a leaky abstraction .

Heater
Posts: 16829
Joined: Tue Jul 17, 2012 3:02 pm

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 8:08 am

dsyleixa123 wrote:
Tue Oct 06, 2020 8:01 am
which advantage would a uint64_t HW RNG number have from a uint64_t PRNG number for cryptography or Lotteries?
Or is it just about the seed?
With many PRNGs if one knows the algorithm and has a sample of it's output one can fairly easily figure out what is coming next in the PRNG sequence. At least in principle that is always true. Although "cryptographically secure" PRNGs are designed to make it as impractical as possible.

Have a read of PCG Party Tricks: https://www.pcg-random.org/party-tricks.html to see what surprises a PRNG can have.
Memory in C++ is a leaky abstraction .

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 8:14 am

But if you don't know the seed, how could you figure out the sequence? e.g., for the Xoroshiro1024++ (reseeded for either draw)?

User avatar
jahboater
Posts: 6270
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 8:55 am

dsyleixa123 wrote:
Tue Oct 06, 2020 8:14 am
But if you don't know the seed, how could you figure out the sequence? e.g., for the Xoroshiro1024++ (reseeded for either draw)?
As above, if you know the algorithm, then given ANY value (state), you can predict the next value and so on.
Pi4 8GB running PIOS64 Lite

dsyleixa123
Posts: 1024
Joined: Mon Jun 11, 2018 11:22 am

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 9:06 am

for seeding, you could take the actual 64bit Unix time, or perhaps the ADC value of an unconnected ADC IC (Arduino, ads1115,...) or a user interface: "press button to continue", for reaction time seeding - how could one predict that?

User avatar
jahboater
Posts: 6270
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 9:21 am

dsyleixa123 wrote:
Tue Oct 06, 2020 9:06 am
for seeding, you could take the actual 64bit Unix time, or perhaps the ADC value of an unconnected ADC IC (Arduino, ads1115,...) or a user interface: "press button to continue", for reaction time seeding - how could one predict that?
You cant if its a good seed. And I think that's what CSPRNG's rely on (frequent seeding from a TRNG).

A PRNG produces a fixed sequence of numbers. Its always the same sequence. The sequence is very long.
For example, for a good 64-bit LCG (called full period) the sequence is all of 2^64 numbers long. The mersenne twister PRNG has a sequence 2^19937 numbers long.

So if you can detect a value in the sequence, you can determine the next value.
With a TRNG, if you can detect the value you have no idea what the next value will be.
Pi4 8GB running PIOS64 Lite

User avatar
jahboater
Posts: 6270
Joined: Wed Feb 04, 2015 6:38 pm
Location: Wonderful West Dorset

Re: Random Number Generator Using Build In Hardware

Tue Oct 06, 2020 11:11 am

jahboater wrote:
Tue Oct 06, 2020 9:21 am
a user interface: "press button to continue", for reaction time seeding?
I think that sort of thing is a waste of time on Linux. The kernel uses the timings of certain interrupts (such as keyboard events) as one of many sources of entropy.
Linux uses naturally occurring chaotic events on the local system to generate entropy for the kernel pool. These events, such as disk IO events, network packet arrival times, keyboard presses, and mouse movements, are the primary sources of entropy on many systems.
Also the HW DRNG if available.

Seed the PRNG from /dev/urandom to start at an unknown point in the sequence.
Or allow the user to seed it with a specific value so that the starting point in the sequence is fixed and they get reproducible results (useful for testing).
Pi4 8GB running PIOS64 Lite

Return to “C/C++”