{"id":50821291,"url":"https://github.com/sri-csl/zk-gen","last_synced_at":"2026-06-13T14:02:39.106Z","repository":{"id":277068087,"uuid":"838922542","full_name":"SRI-CSL/zk-gen","owner":"SRI-CSL","description":"zk-gen: an OCaml platform for zero knowledge computations","archived":false,"fork":false,"pushed_at":"2025-02-11T23:43:22.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-02-12T00:28:08.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","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/SRI-CSL.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}},"created_at":"2024-08-06T15:50:21.000Z","updated_at":"2025-02-11T23:43:26.000Z","dependencies_parsed_at":"2025-02-12T00:38:19.610Z","dependency_job_id":null,"html_url":"https://github.com/SRI-CSL/zk-gen","commit_stats":null,"previous_names":["sri-csl/zk-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SRI-CSL/zk-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fzk-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fzk-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fzk-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fzk-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SRI-CSL","download_url":"https://codeload.github.com/SRI-CSL/zk-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRI-CSL%2Fzk-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34286976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"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":"2026-06-13T14:02:38.247Z","updated_at":"2026-06-13T14:02:39.101Z","avatar_url":"https://github.com/SRI-CSL.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZKgen: an OCaml platform for zero knowledge computations\n\nZKgen is a ZK platform that aggregates multiple ZK protocols into a single solution, giving the user the flexibility to chose which ZK protocol best fit its application scenario. \nIt supports the evaluation of ZK relations written in SIEVE IR format.\n\n## Usage\n\nZKgen provides two binaries: `zk-gen-prover` and `zk-gen-verifier`. We next provide instructions on how to use both of them.\n\nInside ZKgen, a ZK protocol always starts with the **verifier**. It needs to be invoked together with the following command line arguments:\n\n- `--backend` - sets the ZK backend to be used\n- `--cores` - sets the number of parallel cores to be used\n- `--relation` - relation file, in the SIEVE IR format\n- `--instance` - instance file, in the SIEVE IR format\n- `--port` - the port where the verifier will be listening to\n\nNext the **prover** is called with the following arguments:\n\n- `--backend` - sets the ZK backend to be used\n- `--cores` - sets the number of parallel cores to be used\n- `--relation` - relation file, in the SIEVE IR format\n- `--instance` - instance file, in the SIEVE IR format\n- `--witness` - witness file, in the SIEVE IR format\n- `--verip` - the verifier IP\n- `--verport` - the port where the verifier is listening to\n\nFor example, the evaluation of a ZK statement using ZKgen can be done by running\n\n```\n$\u003e zk-gen-verifier --backend lpzk --cores 8 --relation relation.txt --instance instance.txt --port 12345\n```\n\nwhich will boot a ZKgen verifier that will use the LPZK protocol as the ZK backend, will use 8 parallel cores to speed up the evaluation and will be listening in port 12345. The verifier will be in a idle state, waiting for the prover to start, which can be done via\n\n```\n$\u003e zk-gen-prover --backend lpzk --cores 8 --relation relation.txt --instance instance.txt --witness witness.txt --verip 73.227.130.85 --verport 12345\n```\n\nAdditional instructions on how to correctly invoke both of them can be found by typing\n\n```\n$\u003e zk-gen-prover --help\n```\n\nor \n\n```\n$\u003e zk-gen-verifer --help\n```\n\nrespectively. However, we summarize usage instructions in this\n\n## Supported ZK backends \n\nSo far, we support the following ZK protocols:\n- MPC-in-the-Head, using BGW as the underlying MPC protocol, which can be used with backend argument `mith-bgw`\n- Line-Point Zero Knowledge (LPZK), assuming pre-computed correlated randomness, which can be used with backend argument `lpzk`\n\n## Instalation requirements\n\nZKgen uses the following third-party tools/libraries:\n- OCaml (\u003e= 4.14.0) - available at [https://ocaml.org/](https://ocaml.org/)\n- Dune (\u003e= 3.14) - available at [https://github.com/ocaml/dune](https://github.com/ocaml/dune)\n- EVOCrypt - available at [https://github.com/SRI-CSL/evocrypt](https://github.com/SRI-CSL/evocrypt)\n- Wiztoolkit OCaml bindings - available at [https://github.com/SRI-CSL/wiztoolkit_ocaml](https://github.com/SRI-CSL/wiztoolkit_ocaml)\n- Timer - available at [https://github.com/disteph/timer](https://github.com/disteph/timer)\n- Domainslib - available at [https://github.com/ocaml-multicore/domainslib](https://github.com/ocaml-multicore/domainslib)\n- Yojson - available at [https://github.com/ocaml-community/yojson](https://github.com/ocaml-community/yojson)\n\nWe recommend installing the above dependencies using `opam`. However, they can be installed by cloning the corresponding repository and manually installing the tool/library.\n\nAfter installing `OCaml` and `opam`, typing\n\n```\n$\u003e opam install dune domainslib yojson\n$\u003e opam pin git+https://github.com/SRI-CSL/evocrypt.git#main\n$\u003e opam pin git+https://github.com/SRI-CSL/wiztoolkit-ocaml-bindings.git#main\n$\u003e opam pin git+https://github.com/disteph/timer.git#main\n```\n\ninstalls all ZKgen required dependencies\n\n## Installing/Compiling EVOCrypt\n\nIf installing from source, running\n\n```\n$\u003e make\n$\u003e make install\n```\n\nbuilds and install ZKGen (with corresponding binaries named `zk-gen-prover` and `zk-gen-verifier`) assuming that all dependencies have been successfully installed. \n\nZKgen can also be installed via `opam`, by running\n\n```\n$\u003e opam pin git+https://github.com/SRI-CSL/zk-gen.git#main\n```\n\nwhich installs ZKgen and its dependencies via `opam`.\n\n## Examples\n\nExamples of how to use ZKgen can be found in the `test` directory.\n\n## Acknowledgments\n\nThis material is based upon work supported by DARPA under Contract No. HR001120C0086. Any opinions, findings and conclusions or recommendations expressed in this material are those the author(s) and do not necessarily reflect the views of the United States Government or DARPA.\n\nDistribution Statement ‘A’ (Approved for Public Release, Distribution Unlimited)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fzk-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsri-csl%2Fzk-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsri-csl%2Fzk-gen/lists"}