{"id":23145075,"url":"https://github.com/jeong0982/gkr","last_synced_at":"2025-08-17T15:31:37.580Z","repository":{"id":62593519,"uuid":"549377643","full_name":"jeong0982/gkr","owner":"jeong0982","description":"zero knowledge proof aggregator for general circuit","archived":false,"fork":false,"pushed_at":"2024-05-20T12:42:43.000Z","size":140,"stargazers_count":72,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-05T08:41:24.331Z","etag":null,"topics":["aggregator","circom","cryptography","zkp"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/jeong0982.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-11T05:05:31.000Z","updated_at":"2025-01-29T17:58:49.000Z","dependencies_parsed_at":"2023-02-19T06:01:15.053Z","dependency_job_id":null,"html_url":"https://github.com/jeong0982/gkr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jeong0982/gkr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeong0982%2Fgkr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeong0982%2Fgkr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeong0982%2Fgkr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeong0982%2Fgkr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeong0982","download_url":"https://codeload.github.com/jeong0982/gkr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeong0982%2Fgkr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270869247,"owners_count":24659877,"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-08-17T02:00:09.016Z","response_time":129,"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":["aggregator","circom","cryptography","zkp"],"created_at":"2024-12-17T15:18:49.011Z","updated_at":"2025-08-17T15:31:37.211Z","avatar_url":"https://github.com/jeong0982.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proof aggregator using recursive GKR scheme\nThis is Cli tool for **generation of aggregated proof for multiple inputs**.\n\nIn this version, it supports circom circuit.\n\n## Preliminaries\ncircom and snarkjs should be installed already.\n\nYou can check that by this command:\n```sh\nsnarkjs --help\n```\n```sh\ncircom --help\n```\n## How to use\n### 1. Install gkr\n```sh\ncargo install --path ./rust\n```\n### 2. Move to `./rust`\n```sh\ncd rust\n```\n### 3. Write a circuit in `./rust` and inputs in `./rust/example/` (`/example` is not mandatory)\n\n### 4. Create GKR proof for inputs\nYou can give inputs by commands:\n```sh\ngkr-aggregator prove -c circuit.circom -i ./example/input1.json ./example/input2.json ./example/input3.json\n```\n\nYou can get a message from cli:\n```sh\nProving by groth16 can be done\n```\n\n### 4. Prepare zkey\nYou should prepare an appropriate ptau file.\n```sh\nsnarkjs groth16 setup aggregated.r1cs pot.ptau c0.zkey\nsnarkjs zkey contribute c0.zkey c1.zkey --name=“mock” -v\n```\nGive random string for contribution, and then\n```sh\nsnarkjs zkey beacon c1.zkey c.zkey 0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f 10 -n=\"Final Beacon phase2\"\n```\n\n### 5. Create aggregated Groth16 proof\n```sh\ngkr-aggregator mock-groth -z c.zkey\n```\nYou can get `proof.json` and `public.json`.\n\n## Implementation details\n### Internal\n#### Initial round\nGet input from `input.json`, make `d` in proof with it.  \nParse r1cs file and convert it to `GKRCircuit`. (Let's call this $C$)  \nMake proof $\\pi_0$ from `d` and `GKRCircuit`.\n#### Iterative round (0 \u003c $i$ \u003c n)\nThere are two circuit $C_i$ and $C_{v_{i - 1}}$. $C_{v_{i - 1}}$ is circuit that can verify $C_{i - 1}$.  \n$C_{v_i}$ can be different form for each circuit $C_i$. \nTo make aggregated proof for previous proof and current round's proof, we need\n- input (for $C_i$)\n- proof $\\pi_{i - 1}$\n\nMake integrated circuit $C'_i$.\n\nUse those inputs, make proof $\\pi_i$.\nTo be specific, input and proof $\\pi_{i - 1}$\n#### Last round\nAlso there are two circuit $C_n$ and $C_{v_{n - 1}}$. To send aggregated proof to on-chain verifier, we can use groth16 prover in `snarkjs`.  \nIntegrated circuit $C'_{n}$ can be proved with `snarkjs` also.  \nSo final proof $\\pi_n$ is groth16 or plonk proof\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeong0982%2Fgkr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeong0982%2Fgkr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeong0982%2Fgkr/lists"}