Join Today
+ Reply to Thread
Results 1 to 9 of 9
  1. #1

    Default Refilling /dev/random

    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?

  2. #2
    Join Date
    Nov 2005
    Location
    Brazil
    Posts
    308

    Default Re: Refilling /dev/random

    you can use openssl library to generate random bytes ... It's better than /dev/random ...

    Quote 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?

  3. #3

    Default Re: Refilling /dev/random

    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?

  4. #4

    Default Re: Refilling /dev/random

    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.

  5. #5
    Join Date
    Nov 2005
    Location
    Brazil
    Posts
    308

    Default Re: Refilling /dev/random

    try non-block IO on /dev/random (I tested on solaris/sparc) or use /dev/urandom (works fine on E680i)...

  6. #6

    Default Re: Refilling /dev/random

    @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.

  7. #7

    Default Re: Refilling /dev/random

    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.

  8. #8
    Join Date
    Sep 2005
    Location
    Jakarta, Indonesia
    Posts
    1,091

    Default Re: Refilling /dev/random

    - /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

  9. #9

    Default Re: Refilling /dev/random

    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?


 
+ Reply to Thread

Similar Threads

  1. random request for help
    By lily in forum E680 General Chat
    Replies: 1
    Last Post: 10-23-2008, 09:44 PM
  2. random vibration ?
    By gldelx in forum E6 General Chat
    Replies: 9
    Last Post: 09-29-2007, 09:39 PM
  3. Random Questions
    By cyberoidx in forum E6 General Chat
    Replies: 4
    Last Post: 09-08-2007, 04:45 PM
  4. Random noice ??
    By el_montro in forum E6 General Chat
    Replies: 3
    Last Post: 05-09-2007, 04:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1