[Contents]

Copyright © 2010 jsd

1  Improving Security when Booting from Read-Only Media

There are many situations where you might want to boot a computer from read-only media such as “Live CD” or memory stick or whatever. You ought to be concerned about security, especially if the computer is connected to a network.

Most modern security algorithms rely on a source of random numbers. It is recommended that these come from a HRNG (hardware random number generator) ... but in this document we focus on the less-than-ideal case where you do not have confidence in the computer’s ability to generate adequate amounts of real entropy.

The solution given here is significantly better than the prior art, although we again emphasize that it is less than ideal, and again recommend using a good HRNG whenever possible.

Here’s the idea: Seed /dev/random with two contributions: (a) the time-of-day, and (b) a random-seed file that is unique to this boot image.

These to contributions together are far more powerful than either one separately. That is:

Note that the Linux kernel makes some effort to collect entropy from various sources. However, there is no guarantee as to how effective these efforts are going to be. For an unattended machine booting from read-only media, the effectiveness is particularly open to question.

So, the goal is to make each Live CD (or memory stick etc.) have its very own private random.seed file, and to make it initialize /dev/random using that file and the time of day.

I have created some software to help with this. The top-level program is a shell script, and it is supported by two Perl programs.

Here’s the procedure: If you want to make N disks:

For additional details, download the aforementioned programs and read their usage messages.

Note that if the Ubuntu folks made a modest change to their downloadable image, the process for the first disk would be two orders of magnitude quicker.

[Contents]

Copyright © 2010 jsd