{"id":17655961,"url":"https://github.com/sagi/fastgcd","last_synced_at":"2025-05-07T11:14:02.576Z","repository":{"id":34771008,"uuid":"38753311","full_name":"sagi/fastgcd","owner":"sagi","description":"Fastgcd is a C implementation of an efficient algorithm to compute the pairwise GCDs of a collection of integers. The algorithm is due to Bernstein and is a simplified version of (http://cr.yp.to/papers.html#smoothparts). ","archived":false,"fork":false,"pushed_at":"2024-05-13T21:57:03.000Z","size":1592,"stargazers_count":17,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T11:13:56.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sagi.png","metadata":{"files":{"readme":"README","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":"2015-07-08T12:43:08.000Z","updated_at":"2024-07-03T15:40:33.000Z","dependencies_parsed_at":"2025-03-11T00:32:47.456Z","dependency_job_id":"9b86683c-23b3-43a2-9916-faf1c8c73b7d","html_url":"https://github.com/sagi/fastgcd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagi%2Ffastgcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagi%2Ffastgcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagi%2Ffastgcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagi%2Ffastgcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagi","download_url":"https://codeload.github.com/sagi/fastgcd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252865765,"owners_count":21816308,"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":[],"created_at":"2024-10-23T13:09:18.169Z","updated_at":"2025-05-07T11:14:02.554Z","avatar_url":"https://github.com/sagi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"fastgcd\n-------\n\nNadia Heninger\nJ. Alex Halderman\n\nFastgcd is a C implementation of an efficient algorithm to compute the pairwise\nGCDs of a collection of integers.  The algorithm is due to Bernstein and is a\nsimplified version of (http://cr.yp.to/papers.html#smoothparts).\n\nThe input to the program is a file listing the collection of integers (e.g.,\nRSA moduli).  The algorithm will compute the GCD of each input integer with the\nproduct of every other input integer, and output the nontrivial common divisors\nalong with a list of input integers which had a nontrivial common divisor.  In\nthe simplest case for RSA moduli, the common divisor will be a single prime\nfactor.  We leave it as an exercise to deal with cases where the divisor is\ncomposite.\n\nThis program was used in \"Mining your Ps and Qs: Detection of Widespread Weak\nKeys in Network Devices\" to discover weak RSA keys. For more information, and a\ncopy of the paper, see https://factorable.net/\n\n\nInstall\n-------\n\nTo install fastgcd (in current directory), simply run\n\n./install.sh\n\nThe install script will download and install a local copy of gmp-5.0.5 and\nextract and apply our patch to GMP.  This patch modifies GMP to add an integer\noutput format that can accommodate integers larger than 2^32 bytes, which is\nnecessary for large inputs to the algorithm.  This means that the temporary\nfiles written to disk in the course of the algorithm by our patched GMP are not\ncompatible with the standard GMP output format.\n\nRunning\n-------\n\nTo run a fresh instance of fastgcd, use\n\n./fastgcd input.moduli\n\nOn completion, fastgcd will output:\n\nvulnerable_moduli       - list of moduli that had a nontrivial common divisor\n                          with any input modulus, in hex, one per line.\n\ngcds                    - list of the common divisor of each modulus in \n                          vulnerable_moduli with the product of every other \n                          modulus in input.moduli, in hex, one per line.\n\n\nWe have provided a sample input:\ninput.moduli            - list of moduli, in hex, one per line. Note: these\n                          must be unique.\n\nSample output produced by running fastgcd on the provided input.moduli file are\ncontained in sample.out/.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagi%2Ffastgcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagi%2Ffastgcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagi%2Ffastgcd/lists"}