{"id":20109975,"url":"https://github.com/distributed-lab/rarimo-issuer-risc0","last_synced_at":"2025-09-21T01:32:12.687Z","repository":{"id":249127270,"uuid":"830099848","full_name":"distributed-lab/rarimo-issuer-risc0","owner":"distributed-lab","description":"Nullifier Counter in RISC Zero for apps on top of Rarimo Protocol.","archived":false,"fork":false,"pushed_at":"2024-08-02T12:06:12.000Z","size":168,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-13T18:09:55.193Z","etag":null,"topics":["nullifier","rarimo","risc-v","risc0","rust","zkp"],"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/distributed-lab.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-07-17T15:32:03.000Z","updated_at":"2024-11-01T11:18:18.000Z","dependencies_parsed_at":"2024-08-02T13:44:24.094Z","dependency_job_id":"f0f8a8af-5eea-4425-8212-b3f3f1b1faba","html_url":"https://github.com/distributed-lab/rarimo-issuer-risc0","commit_stats":null,"previous_names":["distributed-lab/issuer-risc0","distributed-lab/rarimo-issuer-risc0"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributed-lab%2Frarimo-issuer-risc0","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributed-lab%2Frarimo-issuer-risc0/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributed-lab%2Frarimo-issuer-risc0/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distributed-lab%2Frarimo-issuer-risc0/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/distributed-lab","download_url":"https://codeload.github.com/distributed-lab/rarimo-issuer-risc0/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233699714,"owners_count":18716262,"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":["nullifier","rarimo","risc-v","risc0","rust","zkp"],"created_at":"2024-11-13T18:09:57.971Z","updated_at":"2025-09-21T01:32:07.379Z","avatar_url":"https://github.com/distributed-lab.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nullifier Counter in RISC Zero for apps on top of Rarimo Protocol\n\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/MIT)\n\nThis repository is a module for Identity Provider in [FreedomTool by Rarimo](https://freedomtool.org/).\n\nParticularly, it contains necessary functionality to construct ZKP for counting duplicates of nullifiers\nfor some document (passport) hash.\n\nReference implementation is [nullifiersCounter](https://github.com/rarimo/passport-zk-circuits/tree/main/nullifiersCounter) in Circom.\n\n## TL;DR in Risc0\n\n`Risc0` is a technology allowing to construct ZKP logic in arbitrary language, which can get compiled down to\n`RISC-V` architecture. Currently, flagship support is for `Rust`.\n\n### Guest\n\nIn a `methods/guest` directory is located rust code, whose trace of execution is constructing ZKP.\nIt is compiled to `RISC-V ELF` binary, which is then getting run by zkVM.\n\n### Host\n\nThe entity, responsible for running zkVM and handling I/O with guest, is known as `host`.\n\nIn this repository is present necessary functionality for running the host locally, meaning private inputs\nwon't leave machine (versa using remote proving server known as `Bonsai`).\n\n### Core\n\n`core` directory is a convention in Risc0 projects for placing the models shared between host and guest.\n\n## Data flow and Testing\n\nIn order to test everything, [SageMath](https://www.sagemath.org/) script is present in `host/sage` directory. It allows to randomly generate input for `guest` program to run on. In a `host/test_values` directory\nyou can find generated inputs and expected _journal_ - public information in Risc0 ZKP.\n\nThe host program expects CLI argument for filepath to `JSON` input. It is then read and passed to `guest`\nfor ZKP generation.\n\n## Quick Launch\n\nAfter cloning this repository and making sure you've got installed rust and risc0, run:\n\n```bash\nmake run-prove\n```\n\n## Development mode and Execution Statistics\n\nDuring development, faster iteration upon code changes can be achieved by leveraging [dev-mode], we strongly suggest activating it during your early development phase. Furthermore, you might want to get insights into the execution statistics of your project, and this can be achieved by specifying the environment variable `RUST_LOG=\"[executor]=info\"` before running your project.\n\nPut together, the command to run your project in development mode while getting execution statistics is:\n\n```bash\nRUST_LOG=\"[executor]=info\" RISC0_DEV_MODE=1 cargo run -- \u003cpath-to-input-file\u003e\n```\n\n## Cryptography Acceleration\n\nThe main cryptographical primitive in this ZK scheme is a hashing function.\nEven though examples like `Pedersen` or `Poseidon` are known to be ZK-friendly, Risc0 has extensive support\nfor `SHA256`. It is hardware accellerated and utilized in this project unlike circom implementation.\n\n## Benchmarks\n\nProject has been tested for computational efficiency with a variety of inputs.\nYou can examine results in [Benchmark.md](./BENCHMARK.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributed-lab%2Frarimo-issuer-risc0","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistributed-lab%2Frarimo-issuer-risc0","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistributed-lab%2Frarimo-issuer-risc0/lists"}