{"id":11640,"date":"2015-01-21T21:06:14","date_gmt":"2015-01-22T02:06:14","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=11640"},"modified":"2025-02-11T10:52:09","modified_gmt":"2025-02-11T15:52:09","slug":"%e2%88%9e-noise","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2015\/01\/21\/%e2%88%9e-noise\/","title":{"rendered":"\u221e Noise"},"content":{"rendered":"<p>(<em>Quick reminder, <a href=\"https:\/\/web.archive.org\/web\/20150301023340\/http:\/\/scruss.com\/blog\/2013\/06\/07\/well-that-was-unexpected-the-raspberry-pis-hardware-random-number-generator\/\">before it becomes obvious from the text<\/a> \u2014 I have more interest in hardware random number generation than I have understanding \u2026<\/em>)<\/p>\n<p>Just got Bill \u201c<a href=\"https:\/\/web.archive.org\/web\/20150301023340\/https:\/\/twitter.com\/waywardgeek\">WaywardGeek<\/a>\u201d Cox\u2019s <a href=\"https:\/\/web.archive.org\/web\/20150301023340\/https:\/\/www.tindie.com\/products\/WaywardGeek\/infinite-noise\/\">Infinite Noise<\/a> USB Random Number Generator. It uses very few components, and doesn\u2019t even have a microcontroller on board. It relies on the controlled amplification of thermal noise as its entropy source.<\/p>\n<figure id=\"attachment_11661\" aria-describedby=\"caption-attachment-11661\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/infnoise-bw.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-11661\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/infnoise-bw-576x1024.jpg\" alt=\"Not great enhanced image of the Infinite Noise board. Yes, that's all there is to it\" width=\"474\" height=\"843\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/infnoise-bw-576x1024.jpg 576w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/infnoise-bw-90x160.jpg 90w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/infnoise-bw-180x320.jpg 180w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/infnoise-bw.jpg 675w\" sizes=\"auto, (max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-11661\" class=\"wp-caption-text\">Not great enhanced image of the Infinite Noise board. Yes, that&#8217;s all there is to it<\/figcaption><\/figure>\n<p>As it&#8217;s so very simple, it uses a driver to read from the device, and then hashes the data to reduce the data stream to very close to pure noise. Building the driver is easy, once you work it that the code lives in the <a href=\"https:\/\/github.com\/waywardgeek\/infnoise\/tree\/master\/software\">infnoise\/software<\/a> folder on the author&#8217;s github repo.<\/p>\n<p>Normal operation would look like this:<\/p>\n<pre>sudo .\/infnoise | entropy_consuming_program \u2026<\/pre>\n<p>as in<\/p>\n<pre>sudo .\/infnoise | rngtest -t 10<\/pre>\n<p>which I left running for a work day to get<\/p>\n<pre>\u2026\nrngtest: bits received from input: 10327720032\nrngtest: FIPS 140-2 successes: 515955\nrngtest: FIPS 140-2 failures: 431\nrngtest: FIPS 140-2(2001-10-10) Monobit: 63\nrngtest: FIPS 140-2(2001-10-10) Poker: 61\nrngtest: FIPS 140-2(2001-10-10) Runs: 162\nrngtest: FIPS 140-2(2001-10-10) Long run: 151\nrngtest: FIPS 140-2(2001-10-10) Continuous run: 0\nrngtest: input channel speed: (min=29.022; avg=178.828; max=19531250.000)Kibits\/s\nrngtest: FIPS tests speed: (min=17.403; avg=30.153; max=85.917)Mibits\/s\nrngtest: Program run time: 56727702860 microseconds<\/pre>\n<p>So from its success to failure rate, it produces pretty decent (for my casual use) results. These bytes chug out at around 22\u00be Kbytes\/second; not screamingly fast, but decent, considering the very simple hardware.<\/p>\n<p>You can run the hardware without hashing\/whitening, and the results (from a much shorter run) are less solid:<\/p>\n<pre>sudo .\/infnoise --raw | rngtest -t 10\n\u2026\nrngtest: bits received from input: 15499264\nrngtest: FIPS 140-2 successes: 0\nrngtest: FIPS 140-2 failures: 774\nrngtest: FIPS 140-2(2001-10-10) Monobit: 0\nrngtest: FIPS 140-2(2001-10-10) Poker: 774\nrngtest: FIPS 140-2(2001-10-10) Runs: 774\nrngtest: FIPS 140-2(2001-10-10) Long run: 0\nrngtest: FIPS 140-2(2001-10-10) Continuous run: 0\nrngtest: input channel speed: (min=27.201; avg=355.760; max=9765625.000)Kibits\/s\nrngtest: FIPS tests speed: (min=24.868; avg=30.488; max=41.554)Mibits\/s\nrngtest: Program run time: 49831593 microseconds<\/pre>\n<p>Another na\u00efve test is seeing how images made from the data stream look:<\/p>\n<figure id=\"attachment_11643\" aria-describedby=\"caption-attachment-11643\" style=\"width: 128px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/random20150121073922.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11643 size-full\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/random20150121073922.png\" alt=\"don't stare at this too long, or richard d james's grinning mug will appear\" width=\"128\" height=\"128\" \/><\/a><figcaption id=\"caption-attachment-11643\" class=\"wp-caption-text\">random bytes (PNG), file size 49435 bytes<\/figcaption><\/figure>\n<figure id=\"attachment_11642\" aria-describedby=\"caption-attachment-11642\" style=\"width: 128px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/nvrandom20150121074051.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-11642 size-full\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2015\/01\/nvrandom20150121074051.png\" alt=\"nvrandom20150121074051\" width=\"128\" height=\"128\" \/><\/a><figcaption id=\"caption-attachment-11642\" class=\"wp-caption-text\">raw bytes (PNG), file size 45421 bytes<\/figcaption><\/figure>\n<p>Each of these 128 pixel squares should be no less than 49152 (= 128 \u00d7 128 \u00d7 3) bytes \u2014 plus the size of any PNG header\/metadata \u2014 in size. The fact that the raw output is smaller shows that PNG\u2019s compressor found some patterns it could work with.<\/p>\n<p>It&#8217;s a fun little device, and Bill is adding new code and features to the driver at <a href=\"https:\/\/github.com\/waywardgeek\/infnoise\/\">waywardgeek\/infnoise<\/a> regularly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Quick reminder, before it becomes obvious from the text \u2014 I have more interest in hardware random number generation than I have understanding \u2026) Just got Bill \u201cWaywardGeek\u201d Cox\u2019s Infinite Noise USB Random Number Generator. It uses very few components, and doesn\u2019t even have a microcontroller on board. It relies on the controlled amplification of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[1473,1384,2669,2861,229],"class_list":["post-11640","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-noise","tag-random","tag-rng","tag-tindie","tag-usb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-31K","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/11640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=11640"}],"version-history":[{"count":4,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/11640\/revisions"}],"predecessor-version":[{"id":17748,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/11640\/revisions\/17748"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=11640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=11640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=11640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}