{"id":25878453,"url":"https://github.com/fionn/batch-gcd","last_synced_at":"2025-03-02T12:30:48.391Z","repository":{"id":57676366,"uuid":"413905947","full_name":"fionn/batch-gcd","owner":"fionn","description":"DJB's batch GCD algorithm for fast factoring sequences of integers","archived":false,"fork":false,"pushed_at":"2023-06-14T17:01:44.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T20:12:29.228Z","etag":null,"topics":["batch-gcd","cryptanalysis","factoring-algorithms","integer-factorization","number-theory"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/batch-gcd/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fionn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-05T16:58:02.000Z","updated_at":"2022-05-02T14:45:57.000Z","dependencies_parsed_at":"2022-09-02T22:31:25.849Z","dependency_job_id":null,"html_url":"https://github.com/fionn/batch-gcd","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fbatch-gcd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fbatch-gcd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fbatch-gcd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fionn%2Fbatch-gcd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fionn","download_url":"https://codeload.github.com/fionn/batch-gcd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241507429,"owners_count":19973823,"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":["batch-gcd","cryptanalysis","factoring-algorithms","integer-factorization","number-theory"],"created_at":"2025-03-02T12:30:47.939Z","updated_at":"2025-03-02T12:30:48.353Z","avatar_url":"https://github.com/fionn.png","language":"Python","readme":"# Batch GCD\n\n## Overview\n\nA pure Python implementation of DJB's Batch GCD algorithm.\n\n## Installation\n\nDownload and install with `pip`.\n\nOr, download from source and install with `make install` (standard, user) or `make install_dev` (editable, system).\n\n## Usage\n\nThis is a library and cannot be invoked directly.\n\nTest with `make test`.\n\nThe `batch_gcd` module exposes a `batch_gcd` function which takes integers and returns a list of their GCDs at the corresponding index.\n\n```python\n\u003e\u003e\u003e # Example batch_gcd usage\n\u003e\u003e\u003e from batch_gcd import batch_gcd\n\u003e\u003e\u003e batch_gcd(1909, 2923, 291, 205, 989, 62, 451, 1943, 1079, 2419)\n[1909, 1, 1, 41, 23, 1, 41, 1, 83, 41]\n```\n\nThis calculation involves two intermediate steps: creating a product tree and creating a remainder tree.\nThese functions are also exposed, as `products` and `remainders`.\n`products` take integers and returns a product tree, `remainders` takes an integer and a product tree and returns a list of remainders.\n\n## Resources\n\n* [How to Find Smooth Parts of Integers](https://cr.yp.to/factorization/smoothparts-20040510.pdf)\n* [FactHacks: Batch GCD](https://facthacks.cr.yp.to/batchgcd.html)\n* [FactHacks: RSA Factorization in the Real World](https://www.hyperelliptic.org/tanja/vortraege/facthacks-29C3.pdf)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffionn%2Fbatch-gcd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffionn%2Fbatch-gcd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffionn%2Fbatch-gcd/lists"}