In the Software without restriction, including without limitation the rights Of this software and associated documentation files (the "Software"), to deal Permission is hereby granted, free of charge, to any person obtaining a copy Is it possible to run Timer 1 so slowly that it doesn't change between samples? That would be bad. Not sure about switching Timer 1 to other prescalers. If you use the watchdog timer to reset Timer 1 before reading it, for instance, you won't get random numbers. Using Clear Timer on Compare mode should be ok, as long as the compare isn't correlated with the watchdog. (But it doesn't use any obfuscation or whitening other than the XOR shifting, so if you feed it nothing but 0s, it will output nothing but 0s and it will be obvious.) Obviously if your program turns off Timer 1 completely, this will no longer produce random numbers. The LSBs will still be noisy even if the MSBs are periodic, and XORing the two will preserve only the randomness of the LSBs. So you should be able to use all the inputs and outputs normally, and still generate random numbers. Serial correlation coefficient is -0.001267 (totally uncorrelated = 0.0). Monte Carlo value for Pi is 3.145767276 (error 0.13 percent). Would exceed this value 75.00 percent of the times.Īrithmetic mean value of data bytes is 127.4536 (127.5 = random). I've also tested without the TimerOne library ( probably_random.ino), just sampling the Arduino's constantly-cycling PWM timers instead of configuring and resetting Timer 1, and it doesn't seem to hurt the randomness: Entropy = 7.999969 bits per byte.Ĭhi square distribution for 5489591 samples is 233.95, and randomly Gallery of tests of both TrueRandom and ProbablyRandom Output scatter plotted ( plot(a, 'bo', alpha=0.1)): Generating the 13 GB required by dieharder would take about 48 years. Serial correlation coefficient is -0.007752 (totally uncorrelated = 0.0). Monte Carlo value for Pi is 3.126899835 (error 0.47 percent). Would exceed this value 15.83 percent of the times.Īrithmetic mean value of data bytes is 127.8158 (127.5 = random). Serial correlation coefficient is -0.008583 (totally uncorrelated = 0.0).įor comparison, with probably_random_with_TimerOne.ino, ent says: Entropy = 7.996943 bits per byte.Ĭhi square distribution for 65536 samples is 277.59, and randomly Monte Carlo value for Pi is 3.682216212 (error 17.21 percent). Would exceed this value 0.01 percent of the times.Īrithmetic mean value of data bytes is 93.7178 (127.5 = random). Optimum compression would reduce the sizeĬhi square distribution for 92810048 samples is 131287892.21, and randomly "TrueRandom" is not truly random: Entropy = 7.544390 bits per byte. The micro-controller and conclude that it should not be used to produceĭisclaimer: I have no idea what I'm doing.īut it measures better than TrueRandom.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |