{"id":22303545,"url":"https://github.com/lovesh/kzg-poly-commit","last_synced_at":"2025-07-29T04:31:06.514Z","repository":{"id":65515574,"uuid":"222217234","full_name":"lovesh/kzg-poly-commit","owner":"lovesh","description":"Polynomial Commitments using type-3 pairings","archived":false,"fork":false,"pushed_at":"2019-11-29T04:41:01.000Z","size":28,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T07:03:33.185Z","etag":null,"topics":["commitment-schemes","pairings","polynomial"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lovesh.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}},"created_at":"2019-11-17T08:15:35.000Z","updated_at":"2023-01-26T20:56:49.000Z","dependencies_parsed_at":"2023-01-26T21:35:11.392Z","dependency_job_id":null,"html_url":"https://github.com/lovesh/kzg-poly-commit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lovesh/kzg-poly-commit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2Fkzg-poly-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2Fkzg-poly-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2Fkzg-poly-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2Fkzg-poly-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovesh","download_url":"https://codeload.github.com/lovesh/kzg-poly-commit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovesh%2Fkzg-poly-commit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267629045,"owners_count":24118127,"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-07-29T02:00:12.549Z","response_time":2574,"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":["commitment-schemes","pairings","polynomial"],"created_at":"2024-12-03T18:44:11.401Z","updated_at":"2025-07-29T04:31:06.206Z","avatar_url":"https://github.com/lovesh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polynomial Commitments\n\nBased on the paper [Polynomial Commitments](https://pdfs.semanticscholar.org/31eb/add7a0109a584cfbf94b3afaa3c117c78c91.pdf) by Aniket Kate, \nGregory Zaverucha, Ian Goldberg. The schemes from the paper are modified to work with type-3 pairings.\n\nSince type-3 requires both groups of the bilinear map to be distinct (in addition to other conditions), another group G2 is \nintroduced. As a result public key becomes twice the size of whats mentioned in the paper as now for each power of secret key, \nthere is an element in both G1 and G2.  \nScheme PolyCommit_DL in section 3.2, for efficiency we can choose the public key elements in G2 (g2^{alpha^i}s) to compute commitment \nsince commitment is done once for each polynomial. The witness is computed in G1 since it is computed once \nfor each evaluation. Verification requires 1 exponentiation in G2 in addition to a multi-pairing. There are precomputations possible, \nlook at the verification methods for comments.  \nSimilarly for PolyCommit_Ped in 3.3, commitment is in G1 and witness is in G2.\nFor more details look at the code comments.\n\nFor batch openings, look at functions `create_witness_for_batch` and `verify_eval_for_batch` in both `PolyCommit_DL` and `PolyCommit_Ped`. \nRun tests `timing_batch_witness_random_poly` in both `PolyCommit_DL` and `PolyCommit_Ped` in release mode to see the time it takes for \ncreating and verifying the witness for various degree polynomials and for various batch sizes. Those tests will also do witness creation\nand verification individually as well and compare the timing with batched execution.   \n\n## TODO:\n- Error handling. Start by converting asserts into errors.\n- Address TODOs in code\n- More documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovesh%2Fkzg-poly-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovesh%2Fkzg-poly-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovesh%2Fkzg-poly-commit/lists"}