{"id":22499580,"url":"https://github.com/cleanpegasus/kzg-commitment-python","last_synced_at":"2025-03-27T22:25:24.891Z","repository":{"id":245798550,"uuid":"818693622","full_name":"CleanPegasus/kzg-commitment-python","owner":"CleanPegasus","description":"A simple python implementation of KZG Commitment","archived":false,"fork":false,"pushed_at":"2024-06-25T05:11:54.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T00:41:18.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/CleanPegasus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-06-22T15:25:41.000Z","updated_at":"2024-06-25T05:11:57.000Z","dependencies_parsed_at":"2024-06-24T08:27:50.986Z","dependency_job_id":"a612950c-1c5d-4b51-96ab-8c9ac3ef6220","html_url":"https://github.com/CleanPegasus/kzg-commitment-python","commit_stats":null,"previous_names":["cleanpegasus/kzg-commitment-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanPegasus%2Fkzg-commitment-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanPegasus%2Fkzg-commitment-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanPegasus%2Fkzg-commitment-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CleanPegasus%2Fkzg-commitment-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CleanPegasus","download_url":"https://codeload.github.com/CleanPegasus/kzg-commitment-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245933168,"owners_count":20696184,"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-12-06T22:14:32.561Z","updated_at":"2025-03-27T22:25:24.863Z","avatar_url":"https://github.com/CleanPegasus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KZG Commitment\n\nThis is a simple implementation of KZG Commitment\n\n**KZG Commitment** is a commitment scheme that allows you to commit to a polynomial and later prove that a value is the evaluation of the polynomial at a specific point.\n\n**This code is not audited and purely for research and education purposes only.**\n**DO NOT USE IT IN PRODUCTION ENVIRONMENT**\n\n[KZG Commitment Paper](https://www.iacr.org/archive/asiacrypt2010/6477178/6477178.pdf)\n[Dankrad Feist's blog on KZG Commitment](https://dankradfeist.de/ethereum/2020/06/16/kate-polynomial-commitments.html)\n\n### Features \n- **Galois Field Initialization**: Initializes a Galois Field with the BLS12-381 curve order.\n- **Lagrange Polynomial Interpolation**: Interpolates a set of points to a polynomial in the Galois Field.\n- **Trusted Setup Generation**: Generates a trusted setup for cryptographic operations.\n- **Polynomial Evaluation**: Evaluates polynomials at given points using the trusted setup.\n- **Zero-Knowledge Proof Generation**: Generates a zero-knowledge proof for a given polynomial and set of points.\n- **Proof Verification**: Verifies the validity of a zero-knowledge proof.\n\n### Requirements\n\nTo run this script, you need Python 3.6 or later and the following packages:\n\n- `galois`\n- `py_ecc`\n\nYou can install these packages using pip:\n\n```bash\npip install -r requirements.txt\n```\n\n### Usage\n\n1. Ensure you have Python 3.6 or later installed on your system.\n2. Install the required packages using pip.\n3. Run the script using Python:\n\n```bash\npython src/main.py\n```\nThe script will perform the following operations:\n\n- Initialize a Galois Field with the BLS12-381 curve order.\n- Generate a trusted setup for cryptographic operations.\n- Interpolate a vector to a polynomial in the Galois Field.\n- Generate and verify a zero-knowledge proof for a set of points on the polynomial.\n\n### Disclaimer\nThis code is not audited and is provided for research and education purposes only. Do not use it in a production environment.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleanpegasus%2Fkzg-commitment-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleanpegasus%2Fkzg-commitment-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleanpegasus%2Fkzg-commitment-python/lists"}