you can use openssl library to generate random bytes ... It's better than /dev/random ...
Originally Posted by elsengoo
I have a awk script for creating passwords and calculating statistical properties of the chosen type of passwords. It is working well on linux. But when I run it on the a780 (with busybox) /dev/random runs out of entropy quit fast and even after playing around a lot with several applications (button-press, joystick, internet-connection or even rebooting) I still can get only very, very few random bytes from this source.
How do I provide /dev/random with more entropy?
BTW. Floating point arithmethics in (busybox) awk results in completely wrong results. Is this a780 inherent or can it be solved?
you can use openssl library to generate random bytes ... It's better than /dev/random ...
Originally Posted by elsengoo
That is not really a solution to my problem, since /dev/random is acting as a source of seeds for a pseudo-random-number -generator (PRNG). So using the PRNG of openssl would only shift the problem, since it needs a seed itself. Using local files to create a seed is an alternative option to using /dev/random that is already available, so the option -rand of openssl is also no solution.
So I prefer to get /dev/random refilled again. But how?
Having approached this problem about a year ago, I can tell you theory, but not a specific answer.
I would suggest finding the block device for the a780's microphone, and cat'ing that into /dev/random. That should be sufficiently random, and you should be able to get tons of random bits from that.
try non-block IO on /dev/random (I tested on solaris/sparc) or use /dev/urandom (works fine on E680i)...
@numbski:
Thanks. Now i only have to find out how to access the microphone block device...
@epinter:
IMHO non-block IO does not solve the problem of failing entropy on /dev/random. It only returns faster if no entropy is available, or did I miss something here?
I am using /dev/urandom as a temporary workaround now. But it is no real solution, since AFAIK it returns PRNG data, as soon as /dev/random gets out of entropy. And I want to use /dev/random as an alternative option to a PRNG as a "real random number generator".
Anyway, I am still interested to find out, how my a780 got the entropy in /dev/random initially before I started to drain it. It has not been refilled since several days now.
From what I follow, /dev/dsp and /dev/dsp16 are the audio block devices. If you search the forums I'm pretty sure you can find the answer you need.
- /dev/dsp = stereo playback device
- /dev/dsp16 = mono playback + record device = microphone device
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
Hey blackhawk! Thanks for filling in that blank, now maybe that will give me a clue on how to figure out the portaudio confusion in the iaxclient thread.
You tried the stuff I've uploaded?