View Single Post
b666m's Avatar
Posts: 1,090 | Thanked: 476 times | Joined on Jan 2010 @ Ingolstadt, Germany
#114
as far as i understand /dev/urandom gets seeded with noise from drivers during operations from the user.
so if you just startup and shutdown there are very small chances that there are any differences.

unfortunately i don't know when the entropy pool gets seeded exactly. it could be when you open any app. but it could be that it's only seeded when special things happen.

so my suggestion would be a "longer" testing of this:
1. edit /etc/event.d/rvid and change the line "start on startup" to "start on starting shutdown" and then do "chmod 777 /etc/event.d/rvid"
2. but don't startup and then shutdown your phone immediatly.
3. after startup maybe you want to open different apps. for example: surf the web with browser and things you would also do normally.
(hopefully by doing so the pool gets seeded)

if this doesn't bring any improvements i could write some additional code which saves some blocks of on shutdown /dev/urandom to a file and then seeds /dev/urandom on startup first before doing my random number generation.
(that would be a very freaky solution ^^)

one other thing you can do when you have changed to "start on starting shutdown":
open /etc/event.d/rvid and comment out the line "rn=$(dd ... )". make a new line right under this one and type "rn=$(date +%s)".
seconds since 00:00:00, Jan 1, 1970 (a GNU extension)
Note that this value is defined by the localtime system
call.
ok... it's not 100% random but hey... chances are nearly equal for all of the x.conf to get loaded.

Last edited by b666m; 2010-02-21 at 16:32.