summaryrefslogtreecommitdiff
path: root/Hurd/RandomDevice.mdwn
blob: 340835309b7ed3a501c56770e58f5c099ac5a9cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## <a name="_http_savannah_gnu_org_task_5130"> </a> [Savannah task #5130: random translator](http://savannah.gnu.org/task/?5130)

See the attached [[ATTACHURLmboxbz2]] containing all the emails concerning this topic which I was able to gather from public archives.

## <a name="Description"> Description </a>

Sources of entropy are for example disk access latencies or keystroke patterns or behavior on networks. This suggests that for implementing a random translator a kernel part is needed as well, to gather that entropy. That kernel part would then export the gathered entropy via a kernel device, named perhaps _entropy_. TODO.

## <a name="Setup_pseudo_random_devices"> Setup pseudo random devices </a>

Stuck getting SSH to work? You need a pseudo random generator (PRG).

There are several solutions to the lack of _/dev/random_ and _/dev/urandom_, but they are not yet in the default installation.

* Marcus' work can be downloaded at [random.tar.gz](ftp://alpha.gnu.org/gnu/hurd/contrib/marcus/random.tar.gz). (Identical to <http://kilobug.free.fr/hurd/random-64.tar.gz>?)
  * [A patch](http://mail.gnu.org/pipermail/bug-hurd/2002-August/010248.html) that was probably already incorporated from August 14, 2002.
  * Clemmitt Sigler [reported success](http://lists.gnu.org/archive/html/help-hurd/2002-10/msg00076.html) October 11, 2002 and Marcus [described some](http://lists.gnu.org/archive/html/help-hurd/2002-10/msg00081.html) of the internals.

* [Entropy Gathering Daemon](http://egd.sourceforge.net/).
  * [request for packaging](http://bugs.debian.org/145498).

* [OSKit Entropy Patch](http://lists.gnu.org/archive/html/bug-hurd/2003-01/msg00000.html) from Derek Davies - Jan 2003.
  * See also [this page](http://www.ddavies.net/oskit-entropy/).
  * Note that this patch can (and should) be used with this [OSKit NIC patch](ftp://flux.cs.utah.edu/flux/oskit/mail/html/oskit-users/msg01570.html).

* [Sune Kirkeby's incomplete port of the Linux /dev/\{,u\}random device driver](http://ibofobi.dk/stuff/hurd-entropy/)
  * [The files](http://download.ibofobi.dk/hurd-entropy/), including a [patch for GNU Mach](http://download.ibofobi.dk/hurd-entropy/gnumach-entropy.diff.bz2).

----

## <a name="Setup_tips"> Setup tips </a>

Here are some tips on how to actually setup the two random devices using Kilobugs' [random-64 server](http://kilobug.free.fr/hurd/random-64.tar.gz). His tarball is a complete Hurd server including a pre-built binary - so you don't need GCC or magic fingers for this! :)

After untaring the package you copy the random binary to the /hurd directory. Then you setup the translators for random and urandom.

    # settrans -c /dev/random /hurd/random \
               --seed-file /var/run/random-seed --secure
    # settrans -c /dev/urandom /hurd/random \
               --seed-file /var/run/urandom-seed --fast
    # chmod 0644 /dev/random /dev/urandom