hw_random.txt 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. Introduction:
  5. The hw_random device driver is software that makes use of a
  6. special hardware feature on your CPU or motherboard,
  7. a Random Number Generator (RNG).
  8. In order to make effective use of this device driver, you
  9. should download the support software as well. Download the
  10. latest version of the "rng-tools" package from the
  11. hw_random driver's official Web site:
  12. http://sourceforge.net/projects/gkernel/
  13. About the Intel RNG hardware, from the firmware hub datasheet:
  14. The Firmware Hub integrates a Random Number Generator (RNG)
  15. using thermal noise generated from inherently random quantum
  16. mechanical properties of silicon. When not generating new random
  17. bits the RNG circuitry will enter a low power state. Intel will
  18. provide a binary software driver to give third party software
  19. access to our RNG for use as a security feature. At this time,
  20. the RNG is only to be used with a system in an OS-present state.
  21. Theory of operation:
  22. Character driver. Using the standard open()
  23. and read() system calls, you can read random data from
  24. the hardware RNG device. This data is NOT CHECKED by any
  25. fitness tests, and could potentially be bogus (if the
  26. hardware is faulty or has been tampered with). Data is only
  27. output if the hardware "has-data" flag is set, but nevertheless
  28. a security-conscious person would run fitness tests on the
  29. data before assuming it is truly random.
  30. /dev/hwrandom is char device major 10, minor 183.
  31. Driver notes:
  32. * FIXME: support poll(2)
  33. NOTE: request_mem_region was removed, for two reasons:
  34. 1) Only one RNG is supported by this driver, 2) The location
  35. used by the RNG is a fixed location in MMIO-addressable memory,
  36. 3) users with properly working BIOS e820 handling will always
  37. have the region in which the RNG is located reserved, so
  38. request_mem_region calls always fail for proper setups.
  39. However, for people who use mem=XX, BIOS e820 information is
  40. -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can
  41. succeed.
  42. Driver details:
  43. Based on:
  44. Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet
  45. May 1999 Order Number: 290658-002 R
  46. Intel 82802 Firmware Hub: Random Number Generator
  47. Programmer's Reference Manual
  48. December 1999 Order Number: 298029-001 R
  49. Intel 82802 Firmware HUB Random Number Generator Driver
  50. Copyright (c) 2000 Matt Sottek <msottek@quiknet.com>
  51. Special thanks to Matt Sottek. I did the "guts", he
  52. did the "brains" and all the testing.