dropbearkey freeze

Matt Johnston matt at ucc.asn.au
Thu Jan 13 11:17:28 WST 2005

On Wed, Jan 12, 2005 at 11:34:08AM -0800, Gavinux wrote:
> my embedded system's root file system is on a NFS
> server which is running RedHat7.3
> I put the command dropbearkey -t dss -f
> /etc/dropbear/dropbear_dss_host_key in my embedded
> system's /etc/rc.d/rcS, this dropbearkey takes more
> than half hour to create the key. But After I boot the
> system up, I login as root and removed the key file,
> then I do dropbearkey -t dss -f
> /etc/dropbear/dropbear_dss_host_key in bash command
> line, it finished in just a few seconds.

Are you using 0.44 to generate the key? I wonder if
dropbearkey is blocking waiting for random data from
/dev/random - at boot the system possibly doesn't have
enough entropy, so won't produce output from /dev/random.

Versions prior to 0.44 used /dev/urandom (set in options.h),
which does not block - this is insecure if the system hasn't
got enough entropy, as the "random" data may actually be

Would there be any possibility of securely storing a
seed between reboots, and feeding that to /dev/urandom at
boot time? Look at the comment "Ensuring unpredictability at
system startup" in Linux's random.c [1] for an example. I
don't think adding data will actually increase the entropy
count so /dev/random will probably still block, though if
you're certain there is sufficient entropy, /dev/urandom may
be suitable. The best solution is probably to find an
improved random source, though that could be difficult
depending on your device.

As an aside, are you sure that dropbearkey should be run
every time at startup?  (If it's just exiting since the key
already exists then that's fine).


[1] http://kernel.kernelnotes.de/linux-2.6.3/drivers/char/random.c

More information about the Dropbear mailing list