Pages: 1 [2] 3 4   Go Down
Author Topic: Good source of random numbers?  (Read 3600 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm afraid I don't have an ethernet shield, so that's not an option!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24317
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If finding enough entropy is the only problem, I'm willing to offer my son's bedroom as a useful source.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8436
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
my son's bedroom
Now there's a source we haven't considered before. Probably the only one left I think.

Note that the Due should finally lay this to rest as the SAM3X has TRNG hardware.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Dallas, Texas
Offline Offline
God Member
*****
Karma: 3
Posts: 717
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin - John von Neumann

If you really want better randomness, you pretty much have to get it from some external physical source.
It really depends upon what you are using the 'randomness' for.  For instance simulation techniques do not usually need true randomness--only something that is close.  Something mathematical techniques are usually well suited for.  And there are a few mathematical generators that outperform all but the best of the physical sources. 
Most true sources of entropy; radioactive DECAY; avalanche noise; Johnson noise; clock jiggered; all require deterministic whitening techniques in order to produce unbiased random numbers. And they are very temperamental.  Small changes to their operating environment can severely compromise their performance.
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 0.7.2

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ID Quantique makes the Quantis RNG:

http://www.idquantique.com/true-random-number-generator/products-overview.html

which looks pretty good. The USB-4M module costs 990 €.
Logged

Leon Heller
G1HSM

Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

990 €.

I'm nowhere NEAR that desperate.  I don't need it to stand up to an army of statisticians, I just need something more random than what the Arduino can do on its own!  I think the entropy library will work fine.
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Exploiting quantum mechanics like that is a clever idea, though.
Logged

Leon Heller
G1HSM

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24317
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Exploiting quantum mechanics like that is a clever idea, though.
But think of all the poor cats.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Couldn't you use a tunnel diode to achieve about the same thing?  Of course, they're more expensive than Zeners....
Logged

St. Leonards-on-Sea, E. Sussex, UK.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 301
Ancient developer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Tunnel diodes aren't suitable as noise generators.
Logged

Leon Heller
G1HSM

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just skimmed through the thread, so I don't know if someone mentioned this already. How about trying http://code.google.com/p/tinkerit/wiki/TrueRandom. They claim that it is very random. It uses analog input A0, and some other stuff.
Logged


Dallas, Texas
Offline Offline
God Member
*****
Karma: 3
Posts: 717
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just skimmed through the thread, so I don't know if someone mentioned this already. How about trying http://code.google.com/p/tinkerit/wiki/TrueRandom. They claim that it is very random. It uses analog input A0, and some other stuff.
They claim it is random; however, it fails even the simple tests

Code:
Entropy = 6.440816 bits per byte.
 
Optimum compression would reduce the size
of this 1,002,424 byte file by 19.49%
 
Chi square distribution for 1,002,424 samples is 4802982.71, and randomly
would exceed this value 0.00% percent of the time.
 
Arithetic mean value of data bytes is 100.3535 (127.5 = random)
Serial correlation coefficient is 0.042774 (totally uncorrelated = 0.0).
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 0.7.2

Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm intrigued as to where you got those test results from... whatever you used for it seems like it would be very useful!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


ent can be downloaded here...
http://www.fourmilab.ch/random/

Just feed it a file of binary data.  Try a few JPGs.
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 3
Posts: 717
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

As CodingBadly mentioned ent is the source of the test results I posted; however, I made a python script that performed those tests with a few options along with some graphs which I find useful; histogram and scatter.

That python script can be found here; http://code.google.com/p/avr-hardware-random-number-generation/source/browse/analyze.py
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 0.7.2

Pages: 1 [2] 3 4   Go Up
Jump to: