{"id":24502520,"url":"https://github.com/microcontroleurmonde/esp8266_rng","last_synced_at":"2026-05-07T21:38:17.259Z","repository":{"id":263746428,"uuid":"891356771","full_name":"MicroControleurMonde/ESP8266_RNG","owner":"MicroControleurMonde","description":"Tinny random number generate running on ESP8266. Just as proof of concept ^_^","archived":false,"fork":false,"pushed_at":"2024-12-30T00:36:17.000Z","size":1821,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T08:13:18.480Z","etag":null,"topics":["esp8266","micropython","rng"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MicroControleurMonde.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-20T07:29:56.000Z","updated_at":"2024-12-30T00:36:20.000Z","dependencies_parsed_at":"2024-11-20T09:13:22.983Z","dependency_job_id":null,"html_url":"https://github.com/MicroControleurMonde/ESP8266_RNG","commit_stats":null,"previous_names":["microcontroleurmonde/esp8266_rng"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroControleurMonde%2FESP8266_RNG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroControleurMonde%2FESP8266_RNG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroControleurMonde%2FESP8266_RNG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroControleurMonde%2FESP8266_RNG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MicroControleurMonde","download_url":"https://codeload.github.com/MicroControleurMonde/ESP8266_RNG/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701469,"owners_count":20333631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp8266","micropython","rng"],"created_at":"2025-01-21T23:12:12.047Z","updated_at":"2026-05-07T21:38:17.206Z","avatar_url":"https://github.com/MicroControleurMonde.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP8266_RNG\n![Link](https://github.com/MicroControleurMonde/ESP32_RNG/blob/main/Reports/ESP32download.jpg)\n\nTinny random number generator running on ESP8266.\n\n## Introduction:\nIn the spirit of the RP2040 generator [Link](https://github.com/MicroControleurMonde/RP2040-RNG), the code has been adapted to run on ESP8266EX.\n\n***`Just as proof of concept`.***\n## Concept:\n\nA Micro-python library which provides an interface to generate a random number using the ESP8266's capabilities. \n\nIt enables Wi-Fi temporarily to enhance entropic noise, reads a random value from the ADC, and then disables Wi-Fi.\n\n- Library : **esp8266_rng_lib**\n- Libarary test: **Test_Simple_ESP8266_rng_lib.py**\n- Example (100'000 values): **esp8266_100000.py**\n\nThe random number generated by the library is **64 bits**.\n\n## Performance:\n\n- Elapsed Time to generate 100000 values: 14 minutes and 11 secondes (**851  sec.**)\n- Throughput: **942 Bytes/sec**\n- **117** random values / sec.\n\n## RNG testing\n\nFor verification purposes, we will only run Ent tests to quantify and assess the quality of the numbers generated.\n\n### Ent Test\n\n[Ent](https://www.fourmilab.ch) John Walker\n\n- Sample size: 1.94 MB (in the Ent Folder)\n- Total generated: 100'000 values\n- [Ent report - Raw](https://github.com/MicroControleurMonde/ESP8266_RNG/blob/main/Ent/esp8266_100000_ent.txt)\n\n### Ent/DJent Analysis :\n\n- **Entropy**:\n   - Min Entropy (by max occurrence of symbol 1) = 0.978254\n   - Shannon IID Entropy = **0.999834** bits per symbol\n- **Compression**: Optimal compression: it could reduce the file size by only 0.016638 %.\n- **Distribution**: The distribution of values is broadly uniform, but the entropy and Pi calculations show that there are still biases in the data.\n- **Monte Carlo**: The calculated value of Pi is 3.100761, with an error of 1.30%.\n- **Correlation**: The serial correlation is -0.000466, which suggests that the successive symbols in the file are practically uncorrelated, therefore close to random.\n\n## Conclusion:\nSo, overall the generator produces random numbers with good quality, but there are biases.\n\nOn the downside, the generator is extremely slow ... which is normal for this kind of small MCU.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocontroleurmonde%2Fesp8266_rng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrocontroleurmonde%2Fesp8266_rng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocontroleurmonde%2Fesp8266_rng/lists"}