{"id":31943232,"url":"https://github.com/zksecurity/flatn","last_synced_at":"2026-01-20T16:40:40.247Z","repository":{"id":276703646,"uuid":"929996226","full_name":"zksecurity/flatn","owner":"zksecurity","description":"Python package for the flatter lattice reduction library ","archived":false,"fork":false,"pushed_at":"2025-06-24T13:44:43.000Z","size":37032,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-03T03:52:00.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/zksecurity.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,"zenodo":null}},"created_at":"2025-02-09T21:34:14.000Z","updated_at":"2025-03-27T20:37:28.000Z","dependencies_parsed_at":"2025-06-22T19:34:34.118Z","dependency_job_id":null,"html_url":"https://github.com/zksecurity/flatn","commit_stats":null,"previous_names":["zksecurity/flatn"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zksecurity/flatn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zksecurity%2Fflatn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zksecurity%2Fflatn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zksecurity%2Fflatn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zksecurity%2Fflatn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zksecurity","download_url":"https://codeload.github.com/zksecurity/flatn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zksecurity%2Fflatn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018554,"owners_count":26086404,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-14T09:50:09.564Z","updated_at":"2025-10-14T09:50:24.743Z","avatar_url":"https://github.com/zksecurity.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flatn - Python Wrapper for Flatter\n\nFlatn is a Python wrapper around the execellent [flatter](https://github.com/keeganryan/flatter) lattice reduction library, providing a simple and convenient way to perform lattice reduction operations from Python code.\n\nLattice reduction is an important technique in computational number theory and cryptanalysis that transforms a given set of basis vectors into a \"nicer\" (shorter) basis for the same lattice.\nIf you found this package, you probably know why you want to do this...\n\n## Installation\n\nYou can install Flatn using pip:\n\n```bash\npip install flatn\n```\n\nCurrently, only `darwin/aarch64`, `linux/x86_64`, and `linux/arm64` are supported. No dependencies are required: all the flatter dependencies are statically linked into the binary.\n\n## Usage Example\n\nThe library provides two main functions:\n\n- `reduce()`: The main function for lattice reduction\n- `run_flatter_raw()`: Lowest-level function for debugging: simply calls the `flatter` binary.\n\nHere is a simple example:\n\n```python\nimport flatn\n\n# define a lattice as a list of basis vectors\nlattice = [\n    [1, 0, 331, 303],\n    [0, 1, 456, 225],\n    [0, 0, 628, 0],\n    [0, 0, 0, 628]\n]\n\n# derform lattice reduction\nreduced_basis = flatn.reduce(lattice)\n\nprint(reduced_basis)\n# output:\n# [[-9, 1, -11, 10],\n#  [16, -2, -12, 2],\n#  [12, 23, 16, 19],\n#  [3, 35, -3, -8]]\n\n# You can also control the reduction quality with parameters:\n# - alpha: higher means more reduced\n# - rhf: target root Hermite factor\n# - delta: LLL parameter (between 0.25 and 1.0)\n# - logcond: maximum allowed log of condition number\n\n# For example, specifying delta:\nreduced_basis = flatn.reduce(lattice, delta=0.99)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzksecurity%2Fflatn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzksecurity%2Fflatn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzksecurity%2Fflatn/lists"}