diff options
-rw-r--r-- | Documentation/hw_random.txt | 59 | ||||
-rw-r--r-- | drivers/char/hw_random/Kconfig | 9 |
2 files changed, 48 insertions, 20 deletions
diff --git a/Documentation/hw_random.txt b/Documentation/hw_random.txt index bb58c36b5845..690f52550c80 100644 --- a/Documentation/hw_random.txt +++ b/Documentation/hw_random.txt | |||
@@ -1,33 +1,26 @@ | |||
1 | Hardware driver for Intel/AMD/VIA Random Number Generators (RNG) | ||
2 | Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com> | ||
3 | Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com> | ||
4 | |||
5 | Introduction: | 1 | Introduction: |
6 | 2 | ||
7 | The hw_random device driver is software that makes use of a | 3 | The hw_random framework is software that makes use of a |
8 | special hardware feature on your CPU or motherboard, | 4 | special hardware feature on your CPU or motherboard, |
9 | a Random Number Generator (RNG). | 5 | a Random Number Generator (RNG). The software has two parts: |
6 | a core providing the /dev/hw_random character device and its | ||
7 | sysfs support, plus a hardware-specific driver that plugs | ||
8 | into that core. | ||
10 | 9 | ||
11 | In order to make effective use of this device driver, you | 10 | To make the most effective use of these mechanisms, you |
12 | should download the support software as well. Download the | 11 | should download the support software as well. Download the |
13 | latest version of the "rng-tools" package from the | 12 | latest version of the "rng-tools" package from the |
14 | hw_random driver's official Web site: | 13 | hw_random driver's official Web site: |
15 | 14 | ||
16 | http://sourceforge.net/projects/gkernel/ | 15 | http://sourceforge.net/projects/gkernel/ |
17 | 16 | ||
18 | About the Intel RNG hardware, from the firmware hub datasheet: | 17 | Those tools use /dev/hw_random to fill the kernel entropy pool, |
19 | 18 | which is used internally and exported by the /dev/urandom and | |
20 | The Firmware Hub integrates a Random Number Generator (RNG) | 19 | /dev/random special files. |
21 | using thermal noise generated from inherently random quantum | ||
22 | mechanical properties of silicon. When not generating new random | ||
23 | bits the RNG circuitry will enter a low power state. Intel will | ||
24 | provide a binary software driver to give third party software | ||
25 | access to our RNG for use as a security feature. At this time, | ||
26 | the RNG is only to be used with a system in an OS-present state. | ||
27 | 20 | ||
28 | Theory of operation: | 21 | Theory of operation: |
29 | 22 | ||
30 | Character driver. Using the standard open() | 23 | CHARACTER DEVICE. Using the standard open() |
31 | and read() system calls, you can read random data from | 24 | and read() system calls, you can read random data from |
32 | the hardware RNG device. This data is NOT CHECKED by any | 25 | the hardware RNG device. This data is NOT CHECKED by any |
33 | fitness tests, and could potentially be bogus (if the | 26 | fitness tests, and could potentially be bogus (if the |
@@ -36,9 +29,37 @@ Theory of operation: | |||
36 | a security-conscious person would run fitness tests on the | 29 | a security-conscious person would run fitness tests on the |
37 | data before assuming it is truly random. | 30 | data before assuming it is truly random. |
38 | 31 | ||
39 | /dev/hwrandom is char device major 10, minor 183. | 32 | The rng-tools package uses such tests in "rngd", and lets you |
33 | run them by hand with a "rngtest" utility. | ||
34 | |||
35 | /dev/hw_random is char device major 10, minor 183. | ||
36 | |||
37 | CLASS DEVICE. There is a /sys/class/misc/hw_random node with | ||
38 | two unique attributes, "rng_available" and "rng_current". The | ||
39 | "rng_available" attribute lists the hardware-specific drivers | ||
40 | available, while "rng_current" lists the one which is currently | ||
41 | connected to /dev/hw_random. If your system has more than one | ||
42 | RNG available, you may change the one used by writing a name from | ||
43 | the list in "rng_available" into "rng_current". | ||
44 | |||
45 | ========================================================================== | ||
46 | |||
47 | Hardware driver for Intel/AMD/VIA Random Number Generators (RNG) | ||
48 | Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com> | ||
49 | Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com> | ||
50 | |||
51 | |||
52 | About the Intel RNG hardware, from the firmware hub datasheet: | ||
53 | |||
54 | The Firmware Hub integrates a Random Number Generator (RNG) | ||
55 | using thermal noise generated from inherently random quantum | ||
56 | mechanical properties of silicon. When not generating new random | ||
57 | bits the RNG circuitry will enter a low power state. Intel will | ||
58 | provide a binary software driver to give third party software | ||
59 | access to our RNG for use as a security feature. At this time, | ||
60 | the RNG is only to be used with a system in an OS-present state. | ||
40 | 61 | ||
41 | Driver notes: | 62 | Intel RNG Driver notes: |
42 | 63 | ||
43 | * FIXME: support poll(2) | 64 | * FIXME: support poll(2) |
44 | 65 | ||
diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig index 6bbd4fa50f3b..8d6c2089d2a8 100644 --- a/drivers/char/hw_random/Kconfig +++ b/drivers/char/hw_random/Kconfig | |||
@@ -9,7 +9,14 @@ config HW_RANDOM | |||
9 | Hardware Random Number Generator Core infrastructure. | 9 | Hardware Random Number Generator Core infrastructure. |
10 | 10 | ||
11 | To compile this driver as a module, choose M here: the | 11 | To compile this driver as a module, choose M here: the |
12 | module will be called rng-core. | 12 | module will be called rng-core. This provides a device |
13 | that's usually called /dev/hw_random, and which exposes one | ||
14 | of possibly several hardware random number generators. | ||
15 | |||
16 | These hardware random number generators do not feed directly | ||
17 | into the kernel's random number generator. That is usually | ||
18 | handled by the "rngd" daemon. Documentation/hw_random.txt | ||
19 | has more information. | ||
13 | 20 | ||
14 | If unsure, say Y. | 21 | If unsure, say Y. |
15 | 22 | ||