€•FŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ)/translations/zh_CN/admin-guide/hw_random”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/zh_TW/admin-guide/hw_random”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/it_IT/admin-guide/hw_random”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ja_JP/admin-guide/hw_random”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/ko_KR/admin-guide/hw_random”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ)/translations/sp_SP/admin-guide/hw_random”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ!Hardware random number generators”h]”hŒ!Hardware random number generators”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒC/var/lib/git/docbuild/linux/Documentation/admin-guide/hw_random.rst”h Kubh¢)”}”(hhh]”(h§)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hhºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh·hžhhŸh¶h KubhŒ paragraph”“”)”}”(hX-The hw_random framework is software that makes use of a special hardware feature on your CPU or motherboard, a Random Number Generator (RNG). The software has two parts: a core providing the /dev/hwrng character device and its sysfs support, plus a hardware-specific driver that plugs into that core.”h]”hX-The hw_random framework is software that makes use of a special hardware feature on your CPU or motherboard, a Random Number Generator (RNG). The software has two parts: a core providing the /dev/hwrng character device and its sysfs support, plus a hardware-specific driver that plugs into that core.”…””}”(hhÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubhÉ)”}”(hŒ£To make the most effective use of these mechanisms, you should download the support software as well. Download the latest version of the "rng-tools" package from:”h]”hŒ§To make the most effective use of these mechanisms, you should download the support software as well. Download the latest version of the “rng-tools†package from:”…””}”(hhØhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubhŒ block_quote”“”)”}”(hŒ%https://github.com/nhorman/rng-tools ”h]”hÉ)”}”(hŒ$https://github.com/nhorman/rng-tools”h]”hŒ reference”“”)”}”(hhîh]”hŒ$https://github.com/nhorman/rng-tools”…””}”(hhòhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”hîuh1hðhhìubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khhèubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhŸh¶h Khh·hžhubhÉ)”}”(hŒ”Those tools use /dev/hwrng to fill the kernel entropy pool, which is used internally and exported by the /dev/urandom and /dev/random special files.”h]”hŒ”Those tools use /dev/hwrng to fill the kernel entropy pool, which is used internally and exported by the /dev/urandom and /dev/random special files.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒTheory of operation”h]”hŒTheory of operation”…””}”(hj%hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj"hžhhŸh¶h KubhÉ)”}”(hX´CHARACTER DEVICE. Using the standard open() and read() system calls, you can read random data from the hardware RNG device. This data is NOT CHECKED by any fitness tests, and could potentially be bogus (if the hardware is faulty or has been tampered with). Data is only output if the hardware "has-data" flag is set, but nevertheless a security-conscious person would run fitness tests on the data before assuming it is truly random.”h]”hX¸CHARACTER DEVICE. Using the standard open() and read() system calls, you can read random data from the hardware RNG device. This data is NOT CHECKED by any fitness tests, and could potentially be bogus (if the hardware is faulty or has been tampered with). Data is only output if the hardware “has-data†flag is set, but nevertheless a security-conscious person would run fitness tests on the data before assuming it is truly random.”…””}”(hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj"hžhubhÉ)”}”(hŒhThe rng-tools package uses such tests in "rngd", and lets you run them by hand with a "rngtest" utility.”h]”hŒpThe rng-tools package uses such tests in “rngdâ€, and lets you run them by hand with a “rngtest†utility.”…””}”(hjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K%hj"hžhubhÉ)”}”(hŒ./dev/hwrng is char device major 10, minor 183.”h]”hŒ./dev/hwrng is char device major 10, minor 183.”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K(hj"hžhubhÉ)”}”(hX§CLASS DEVICE. There is a /sys/class/misc/hw_random node with two unique attributes, "rng_available" and "rng_current". The "rng_available" attribute lists the hardware-specific drivers available, while "rng_current" lists the one which is currently connected to /dev/hwrng. If your system has more than one RNG available, you may change the one used by writing a name from the list in "rng_available" into "rng_current".”h]”hX¿CLASS DEVICE. There is a /sys/class/misc/hw_random node with two unique attributes, “rng_available†and “rng_currentâ€. The “rng_available†attribute lists the hardware-specific drivers available, while “rng_current†lists the one which is currently connected to /dev/hwrng. If your system has more than one RNG available, you may change the one used by writing a name from the list in “rng_available†into “rng_currentâ€.”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K*hj"hžhubhŒ transition”“”)”}”(hŒJ==========================================================================”h]”h}”(h]”h ]”h"]”h$]”h&]”uh1jkhŸh¶h K2hj"hžhubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ¶Hardware driver for Intel/AMD/VIA Random Number Generators (RNG) - Copyright 2000,2001 Jeff Garzik - Copyright 2000,2001 Philipp Rumpf ”h]”(hŒterm”“”)”}”(hŒ@Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)”h]”hŒ@Hardware driver for Intel/AMD/VIA Random Number Generators (RNG)”…””}”(hj„hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hŸh¶h K8hj~ubhŒ definition”“”)”}”(hhh]”hŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ3Copyright 2000,2001 Jeff Garzik ”h]”hÉ)”}”(hj h]”(hŒ!Copyright 2000,2001 Jeff Garzik <”…””}”(hj¢hžhhŸNh Nubhñ)”}”(hŒjgarzik@pobox.com”h]”hŒjgarzik@pobox.com”…””}”(hj©hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:jgarzik@pobox.com”uh1hðhj¢ubhŒ>”…””}”(hj¢hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K6hjžubah}”(h]”h ]”h"]”h$]”h&]”uh1jœhj™ubj)”}”(hŒ=Copyright 2000,2001 Philipp Rumpf ”h]”hÉ)”}”(hŒ;Copyright 2000,2001 Philipp Rumpf ”h]”(hŒ#Copyright 2000,2001 Philipp Rumpf <”…””}”(hjÍhžhhŸNh Nubhñ)”}”(hŒprumpf@mandrakesoft.com”h]”hŒprumpf@mandrakesoft.com”…””}”(hjÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:prumpf@mandrakesoft.com”uh1hðhjÍubhŒ>”…””}”(hjÍhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K7hjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1jœhj™ubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1j—hŸh¶h K6hj”ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hj~ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j|hŸh¶h K8hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1jwhj"hžhhŸNh Nubeh}”(h]”Œtheory-of-operation”ah ]”h"]”Œtheory of operation”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒ=About the Intel RNG hardware, from the firmware hub datasheet”h]”hŒ=About the Intel RNG hardware, from the firmware hub datasheet”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h K;ubhÉ)”}”(hX·The Firmware Hub integrates a Random Number Generator (RNG) using thermal noise generated from inherently random quantum mechanical properties of silicon. When not generating new random bits the RNG circuitry will enter a low power state. Intel will provide a binary software driver to give third party software access to our RNG for use as a security feature. At this time, the RNG is only to be used with a system in an OS-present state.”h]”hX·The Firmware Hub integrates a Random Number Generator (RNG) using thermal noise generated from inherently random quantum mechanical properties of silicon. When not generating new random bits the RNG circuitry will enter a low power state. Intel will provide a binary software driver to give third party software access to our RNG for use as a security feature. At this time, the RNG is only to be used with a system in an OS-present state.”…””}”(hj(hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K=hjhžhubeh}”(h]”ŒhžhhŸh¶h KFubhÉ)”}”(hŒFIXME: support poll(2)”h]”hŒFIXME: support poll(2)”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KHhj>hžhubhŒnote”“”)”}”(hXôrequest_mem_region was removed, for three reasons: 1) Only one RNG is supported by this driver; 2) The location used by the RNG is a fixed location in MMIO-addressable memory; 3) users with properly working BIOS e820 handling will always have the region in which the RNG is located reserved, so request_mem_region calls always fail for proper setups. However, for people who use mem=XX, BIOS e820 information is **not** in /proc/iomem, and request_mem_region(RNG_ADDR) can succeed.”h]”(hÉ)”}”(hŒ2request_mem_region was removed, for three reasons:”h]”hŒ2request_mem_region was removed, for three reasons:”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KLhj_ubhŒenumerated_list”“”)”}”(hhh]”(j)”}”(hŒ)Only one RNG is supported by this driver;”h]”hÉ)”}”(hjxh]”hŒ)Only one RNG is supported by this driver;”…””}”(hjzhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KNhjvubah}”(h]”h ]”h"]”h$]”h&]”uh1jœhjsubj)”}”(hŒLThe location used by the RNG is a fixed location in MMIO-addressable memory;”h]”hÉ)”}”(hŒLThe location used by the RNG is a fixed location in MMIO-addressable memory;”h]”hŒLThe location used by the RNG is a fixed location in MMIO-addressable memory;”…””}”(hj‘hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KOhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jœhjsubj)”}”(hX.users with properly working BIOS e820 handling will always have the region in which the RNG is located reserved, so request_mem_region calls always fail for proper setups. However, for people who use mem=XX, BIOS e820 information is **not** in /proc/iomem, and request_mem_region(RNG_ADDR) can succeed.”h]”hÉ)”}”(hX.users with properly working BIOS e820 handling will always have the region in which the RNG is located reserved, so request_mem_region calls always fail for proper setups. However, for people who use mem=XX, BIOS e820 information is **not** in /proc/iomem, and request_mem_region(RNG_ADDR) can succeed.”h]”(hŒéusers with properly working BIOS e820 handling will always have the region in which the RNG is located reserved, so request_mem_region calls always fail for proper setups. However, for people who use mem=XX, BIOS e820 information is ”…””}”(hj©hžhhŸNh NubhŒstrong”“”)”}”(hŒ**not**”h]”hŒnot”…””}”(hj³hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j±hj©ubhŒ> in /proc/iomem, and request_mem_region(RNG_ADDR) can succeed.”…””}”(hj©hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KQhj¥ubah}”(h]”h ]”h"]”h$]”h&]”uh1jœhjsubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1jqhj_ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j]hj>hžhhŸNh Nubeh}”(h]”Œintel-rng-driver-notes”ah ]”h"]”Œintel rng driver notes”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KFubh¢)”}”(hhh]”(h§)”}”(hŒDriver details”h]”hŒDriver details”…””}”(hjíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjêhžhhŸh¶h KYubjx)”}”(hhh]”(j})”}”(hŒaBased on: Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet May 1999 Order Number: 290658-002 R ”h]”(jƒ)”}”(hŒ Based on:”h]”hŒ Based on:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hŸh¶h K]hjþubj“)”}”(hhh]”hÉ)”}”(hŒVIntel 82802AB/82802AC Firmware Hub (FWH) Datasheet May 1999 Order Number: 290658-002 R”h]”hŒVIntel 82802AB/82802AC Firmware Hub (FWH) Datasheet May 1999 Order Number: 290658-002 R”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K\hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hjþubeh}”(h]”h ]”h"]”h$]”h&]”uh1j|hŸh¶h K]hjûubj})”}”(hŒyIntel 82802 Firmware Hub: Random Number Generator Programmer's Reference Manual December 1999 Order Number: 298029-001 R ”h]”(jƒ)”}”(hŒIntel 82802 Firmware Hub:”h]”hŒIntel 82802 Firmware Hub:”…””}”(hj1hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hŸh¶h Kbhj-ubj“)”}”(hhh]”hÉ)”}”(hŒ^Random Number Generator Programmer's Reference Manual December 1999 Order Number: 298029-001 R”h]”hŒ`Random Number Generator Programmer’s Reference Manual December 1999 Order Number: 298029-001 R”…””}”(hjBhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K`hj?ubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hj-ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j|hŸh¶h Kbhjûhžhubj})”}”(hŒmIntel 82802 Firmware HUB Random Number Generator Driver Copyright (c) 2000 Matt Sottek ”h]”(jƒ)”}”(hŒ7Intel 82802 Firmware HUB Random Number Generator Driver”h]”hŒ7Intel 82802 Firmware HUB Random Number Generator Driver”…””}”(hj`hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hŸh¶h Kehj\ubj“)”}”(hhh]”hÉ)”}”(hŒ4Copyright (c) 2000 Matt Sottek ”h]”(hŒ Copyright (c) 2000 Matt Sottek <”…””}”(hjqhžhhŸNh Nubhñ)”}”(hŒmsottek@quiknet.com”h]”hŒmsottek@quiknet.com”…””}”(hjyhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:msottek@quiknet.com”uh1hðhjqubhŒ>”…””}”(hjqhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Kehjnubah}”(h]”h ]”h"]”h$]”h&]”uh1j’hj\ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j|hŸh¶h Kehjûhžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1jwhjêhžhhŸh¶h NubhÉ)”}”(hŒZSpecial thanks to Matt Sottek. I did the "guts", he did the "brains" and all the testing.”h]”hŒbSpecial thanks to Matt Sottek. I did the “gutsâ€, he did the “brains†and all the testing.”…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Kghjêhžhubeh}”(h]”Œdriver-details”ah ]”h"]”Œdriver details”ah$]”h&]”uh1h¡hh£hžhhŸh¶h KYubeh}”(h]”Œ!hardware-random-number-generators”ah ]”h"]”Œ!hardware random number generators”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jæŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jÀj½jjjjj;j8jçjäj¸jµuŒ nametypes”}”(jÀ‰j‰j‰j;‰jç‰j¸‰uh}”(j½h£jh·jj"j8jjäj>jµjêuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.