{"id":15048994,"url":"https://github.com/cjee21/rdrand-tester","last_synced_at":"2025-04-10T01:41:05.598Z","repository":{"id":232781420,"uuid":"351457010","full_name":"cjee21/RDRAND-Tester","owner":"cjee21","description":"Application to test the functionality of the RDRAND instruction in x86 CPUs","archived":false,"fork":false,"pushed_at":"2021-04-16T13:47:11.000Z","size":17,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T03:22:52.139Z","etag":null,"topics":["amd-ryzen","assembly","assembly-language","c","c-language","c-programming","c-programming-language","cli","cli-app","cpu","cpuid","cpus","gcc","intel","rdrand","rdrand-instruction","x86","x86-64","x86-assembly"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cjee21.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}},"created_at":"2021-03-25T14:02:06.000Z","updated_at":"2024-07-05T06:11:48.000Z","dependencies_parsed_at":"2024-04-11T12:43:49.999Z","dependency_job_id":null,"html_url":"https://github.com/cjee21/RDRAND-Tester","commit_stats":null,"previous_names":["cjee21/rdrand-tester"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjee21%2FRDRAND-Tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjee21%2FRDRAND-Tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjee21%2FRDRAND-Tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjee21%2FRDRAND-Tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjee21","download_url":"https://codeload.github.com/cjee21/RDRAND-Tester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142073,"owners_count":21054582,"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":["amd-ryzen","assembly","assembly-language","c","c-language","c-programming","c-programming-language","cli","cli-app","cpu","cpuid","cpus","gcc","intel","rdrand","rdrand-instruction","x86","x86-64","x86-assembly"],"created_at":"2024-09-24T21:17:30.018Z","updated_at":"2025-04-10T01:41:05.574Z","avatar_url":"https://github.com/cjee21.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RDRAND-Tester\nThis is an application to test the functionality of the RDRAND instruction in x86 CPUs. It additionally shows the presence of the RDSEED instruction. This may be useful to test for the presence of buggy RDRAND implementations which are present on some CPUs that causes issues with certain software which depends on this instruction.\n\n## Pre-built Binaries\nThe pre-built binaries can be found in the [releases](https://github.com/cjee21/RDRAND-Tester/releases) section. The binaries were built as described below.\n### Windows\n1. Obtain MinGW/GCC from [winlibs](https://github.com/brechtsanders/winlibs_mingw).\n2. Prepare manifest for UAC by executing `windres win_manifest\\resource.rc obj\\manifest.o`.\n3. Build the binary by executing `gcc RDRAND_Tester.c obj\\manifest.o -o release\\RDRAND_Tester_Windows.exe -Wall -Wconversion -Wformat-security -std=c17 -O3 -static -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -fstack-clash-protection -fcf-protection -Wl,-pie,--no-copy-dt-needed-entries,--as-needed,--nxcompat,--dynamicbase,--high-entropy-va -s`.\n### Linux\n1. Install GCC.\n2. Build the binary by executing `gcc RDRAND_Tester.c -o release/RDRAND_Tester_Linux -Wall -Wconversion -Wformat-security -O3 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -fPIE -fstack-clash-protection -fcf-protection -Wl,-z,relro,-z,now,-pie,--hash-style=gnu,--no-copy-dt-needed-entries,--as-needed -s`.\n\n## Example Output\nBelow is an example of the output produced by this application on a CPU with a properly functioning RDRAND instruction.\n```\n================================================================================\nRDRAND Tester v20210328 x86_64\n--------------------------------------------------------------------------------\nCompiled on Apr 16 2021\nCompiled with GNU Compiler Collection (GCC) 10.3.0\n================================================================================\n\nRunning on Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz\nThis CPU supports the following instructions:\n RDRAND: Supported\n RDSEED: Supported\n\nTesting RDRAND...\n\ntry:   1   success: 1   random number:  5012598193280705724 (0x4590537fb842e4bc)\ntry:   2   success: 1   random number: 13057969725578991747 (0xb5373a4804f0d883)\ntry:   3   success: 1   random number: 15258542471905877516 (0xd3c13b88f4291e0c)\ntry:   4   success: 1   random number:  2878339394249548515 (0x27f1ea6dd141e2e3)\ntry:   5   success: 1   random number:  5238856747007213768 (0x48b428746a8600c8)\ntry:   6   success: 1   random number: 12836524077560437497 (0xb2247ea341bd1af9)\ntry:   7   success: 1   random number: 15869268653934935726 (0xdc3af7c303087eae)\ntry:   8   success: 1   random number: 17374580931805302711 (0xf11ee94d9187cfb7)\ntry:   9   success: 1   random number:  2260023498090627146 (0x1f5d3765bbba404a)\ntry:  10   success: 1   random number:   380621888462874021 (0x05483d97479165a5)\ntry:  11   success: 1   random number: 17765201729153443702 (0xf68aacd93d58a776)\ntry:  12   success: 1   random number: 17666429294697117999 (0xf52bc3d7bff9f92f)\ntry:  13   success: 1   random number: 10586101450554073644 (0x92e9632e8485e22c)\ntry:  14   success: 1   random number:  3888766898547441689 (0x35f7ace40237c019)\ntry:  15   success: 1   random number:  5764275204437754665 (0x4ffed1c20c1ac329)\ntry:  16   success: 1   random number:  8845614113758411495 (0x7ac1ef2b9ec07ae7)\ntry:  17   success: 1   random number:  4829856922400078030 (0x43071947ff9e38ce)\ntry:  18   success: 1   random number:  6630984605313841605 (0x5c05fd5db6d0b9c5)\ntry:  19   success: 1   random number:  6917881360425400011 (0x60014071de73b6cb)\ntry:  20   success: 1   random number: 18115961797194281831 (0xfb68d345a64ff367)\n\nThe RDRAND instruction of this CPU appears to be working.\nThe numbers generated should be different and random.\nIf the numbers generated appears to be similar, the RDRAND instruction is\nbroken.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjee21%2Frdrand-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjee21%2Frdrand-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjee21%2Frdrand-tester/lists"}