~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/hw_random.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/hw_random.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/hw_random.rst (Version linux-6.1.116)


  1 =================================              !!   1 ==========================================================
  2 Hardware random number generators              !!   2 Linux support for random number generator in i8xx chipsets
  3 =================================              !!   3 ==========================================================
  4                                                     4 
  5 Introduction                                        5 Introduction
  6 ============                                        6 ============
  7                                                     7 
  8 The hw_random framework is software that makes      8 The hw_random framework is software that makes use of a
  9 special hardware feature on your CPU or mother      9 special hardware feature on your CPU or motherboard,
 10 a Random Number Generator (RNG).  The software     10 a Random Number Generator (RNG).  The software has two parts:
 11 a core providing the /dev/hwrng character devi     11 a core providing the /dev/hwrng character device and its
 12 sysfs support, plus a hardware-specific driver     12 sysfs support, plus a hardware-specific driver that plugs
 13 into that core.                                    13 into that core.
 14                                                    14 
 15 To make the most effective use of these mechan     15 To make the most effective use of these mechanisms, you
 16 should download the support software as well.      16 should download the support software as well.  Download the
 17 latest version of the "rng-tools" package from !!  17 latest version of the "rng-tools" package from the
                                                   >>  18 hw_random driver's official Web site:
 18                                                    19 
 19         https://github.com/nhorman/rng-tools   !!  20         http://sourceforge.net/projects/gkernel/
 20                                                    21 
 21 Those tools use /dev/hwrng to fill the kernel      22 Those tools use /dev/hwrng to fill the kernel entropy pool,
 22 which is used internally and exported by the /     23 which is used internally and exported by the /dev/urandom and
 23 /dev/random special files.                         24 /dev/random special files.
 24                                                    25 
 25 Theory of operation                                26 Theory of operation
 26 ===================                                27 ===================
 27                                                    28 
 28 CHARACTER DEVICE.  Using the standard open()       29 CHARACTER DEVICE.  Using the standard open()
 29 and read() system calls, you can read random d     30 and read() system calls, you can read random data from
 30 the hardware RNG device.  This data is NOT CHE     31 the hardware RNG device.  This data is NOT CHECKED by any
 31 fitness tests, and could potentially be bogus      32 fitness tests, and could potentially be bogus (if the
 32 hardware is faulty or has been tampered with).     33 hardware is faulty or has been tampered with).  Data is only
 33 output if the hardware "has-data" flag is set,     34 output if the hardware "has-data" flag is set, but nevertheless
 34 a security-conscious person would run fitness      35 a security-conscious person would run fitness tests on the
 35 data before assuming it is truly random.           36 data before assuming it is truly random.
 36                                                    37 
 37 The rng-tools package uses such tests in "rngd     38 The rng-tools package uses such tests in "rngd", and lets you
 38 run them by hand with a "rngtest" utility.         39 run them by hand with a "rngtest" utility.
 39                                                    40 
 40 /dev/hwrng is char device major 10, minor 183.     41 /dev/hwrng is char device major 10, minor 183.
 41                                                    42 
 42 CLASS DEVICE.  There is a /sys/class/misc/hw_r     43 CLASS DEVICE.  There is a /sys/class/misc/hw_random node with
 43 two unique attributes, "rng_available" and "rn     44 two unique attributes, "rng_available" and "rng_current".  The
 44 "rng_available" attribute lists the hardware-s     45 "rng_available" attribute lists the hardware-specific drivers
 45 available, while "rng_current" lists the one w     46 available, while "rng_current" lists the one which is currently
 46 connected to /dev/hwrng.  If your system has m     47 connected to /dev/hwrng.  If your system has more than one
 47 RNG available, you may change the one used by      48 RNG available, you may change the one used by writing a name from
 48 the list in "rng_available" into "rng_current"     49 the list in "rng_available" into "rng_current".
 49                                                    50 
 50 ==============================================     51 ==========================================================================
 51                                                    52 
 52                                                    53 
 53 Hardware driver for Intel/AMD/VIA Random Numbe     54 Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)
 54         - Copyright 2000,2001 Jeff Garzik <jgar     55         - Copyright 2000,2001 Jeff Garzik <jgarzik@pobox.com>
 55         - Copyright 2000,2001 Philipp Rumpf <pr     56         - Copyright 2000,2001 Philipp Rumpf <prumpf@mandrakesoft.com>
 56                                                    57 
 57                                                    58 
 58 About the Intel RNG hardware, from the firmwar     59 About the Intel RNG hardware, from the firmware hub datasheet
 59 ==============================================     60 =============================================================
 60                                                    61 
 61 The Firmware Hub integrates a Random Number Ge     62 The Firmware Hub integrates a Random Number Generator (RNG)
 62 using thermal noise generated from inherently      63 using thermal noise generated from inherently random quantum
 63 mechanical properties of silicon. When not gen     64 mechanical properties of silicon. When not generating new random
 64 bits the RNG circuitry will enter a low power      65 bits the RNG circuitry will enter a low power state. Intel will
 65 provide a binary software driver to give third     66 provide a binary software driver to give third party software
 66 access to our RNG for use as a security featur     67 access to our RNG for use as a security feature. At this time,
 67 the RNG is only to be used with a system in an     68 the RNG is only to be used with a system in an OS-present state.
 68                                                    69 
 69 Intel RNG Driver notes                             70 Intel RNG Driver notes
 70 ======================                             71 ======================
 71                                                    72 
 72 FIXME: support poll(2)                             73 FIXME: support poll(2)
 73                                                    74 
 74 .. note::                                          75 .. note::
 75                                                    76 
 76         request_mem_region was removed, for th     77         request_mem_region was removed, for three reasons:
 77                                                    78 
 78         1) Only one RNG is supported by this d     79         1) Only one RNG is supported by this driver;
 79         2) The location used by the RNG is a f     80         2) The location used by the RNG is a fixed location in
 80            MMIO-addressable memory;                81            MMIO-addressable memory;
 81         3) users with properly working BIOS e8     82         3) users with properly working BIOS e820 handling will always
 82            have the region in which the RNG is     83            have the region in which the RNG is located reserved, so
 83            request_mem_region calls always fai     84            request_mem_region calls always fail for proper setups.
 84            However, for people who use mem=XX,     85            However, for people who use mem=XX, BIOS e820 information is
 85            **not** in /proc/iomem, and request     86            **not** in /proc/iomem, and request_mem_region(RNG_ADDR) can
 86            succeed.                                87            succeed.
 87                                                    88 
 88 Driver details                                     89 Driver details
 89 ==============                                     90 ==============
 90                                                    91 
 91 Based on:                                          92 Based on:
 92         Intel 82802AB/82802AC Firmware Hub (FW     93         Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet
 93         May 1999 Order Number: 290658-002 R        94         May 1999 Order Number: 290658-002 R
 94                                                    95 
 95 Intel 82802 Firmware Hub:                          96 Intel 82802 Firmware Hub:
 96         Random Number Generator                    97         Random Number Generator
 97         Programmer's Reference Manual              98         Programmer's Reference Manual
 98         December 1999 Order Number: 298029-001     99         December 1999 Order Number: 298029-001 R
 99                                                   100 
100 Intel 82802 Firmware HUB Random Number Generat    101 Intel 82802 Firmware HUB Random Number Generator Driver
101         Copyright (c) 2000 Matt Sottek <msottek    102         Copyright (c) 2000 Matt Sottek <msottek@quiknet.com>
102                                                   103 
103 Special thanks to Matt Sottek.  I did the "gut    104 Special thanks to Matt Sottek.  I did the "guts", he
104 did the "brains" and all the testing.             105 did the "brains" and all the testing.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php