{"id":30704044,"url":"https://github.com/noway/nzcp-circom","last_synced_at":"2025-09-02T17:13:03.987Z","repository":{"id":42494272,"uuid":"454914316","full_name":"noway/nzcp-circom","owner":"noway","description":"ZK proof of NZ COVID Pass identity written in Circom","archived":false,"fork":false,"pushed_at":"2022-04-03T00:07:44.000Z","size":782,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T16:22:21.355Z","etag":null,"topics":["cbor","circom","circuit","covid-19","cwt","newzealand","nzcp","vaccine","vaccine-passports","zk","zk-snarks","zkp"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/noway.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":"2022-02-02T19:51:54.000Z","updated_at":"2024-09-23T00:10:52.000Z","dependencies_parsed_at":"2022-09-14T17:53:25.372Z","dependency_job_id":null,"html_url":"https://github.com/noway/nzcp-circom","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/noway/nzcp-circom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noway%2Fnzcp-circom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noway%2Fnzcp-circom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noway%2Fnzcp-circom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noway%2Fnzcp-circom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noway","download_url":"https://codeload.github.com/noway/nzcp-circom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noway%2Fnzcp-circom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273318211,"owners_count":25084148,"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-09-02T02:00:09.530Z","response_time":77,"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":["cbor","circom","circuit","covid-19","cwt","newzealand","nzcp","vaccine","vaccine-passports","zk","zk-snarks","zkp"],"created_at":"2025-09-02T17:13:02.864Z","updated_at":"2025-09-02T17:13:03.976Z","avatar_url":"https://github.com/noway.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NZCP.circom\n\nZK proof of [NZ COVID Pass](https://github.com/minhealthnz/nzcovidpass-spec) identity written in [Circom](https://github.com/iden3/circom).\n\nThis circuit allows to prove that a unique identity is part of an NZ COVID Pass without revealing that identity.\n\n## How it works\n\nThe circuit takes in the following private inputs:\n- `toBeSigned` - the `ToBeSigned` value of NZ COVID Pass as per https://datatracker.ietf.org/doc/html/rfc8152#section-4.4\n- `toBeSignedLen` - the length of `toBeSigned`\n\n\nThe circuit outputs the following public inputs:\n- `credSubjSha256` - the SHA256 hash of the credential subject of the NZ COVID Pass. That is your given name, family name and date of birth delimited by comma. \n- `toBeSignedSha256` - the SHA256 hash of the `toBeSigned` value.\n- `exp` - the expiry date of the NZ COVID Pass.\n\n## NZ COVID Pass verification\nThe circuit does not verify the signature of the NZ COVID Pass. It merely proves that an identity is associated with the NZ COVID Pass, be it signed or unsigned. The user may not be in a possession of a valid signature for the `ToBeSigned` value that is provided.\n\nWhile it is theoretically possbile to verify the signature (using a circuit similar to [circom-ecdsa](https://github.com/0xPARC/circom-ecdsa) for NIST P-256 curves), it is outside the scope of this project.\n\n## Limitations\nFor live passes:\n- The length of the `ToBeSigned` value is limited to 355 bytes.\n- The length of the credential subject string (defined as `${familyName},${givenName},${dob}`) is limited to 64 bytes.\n\n## Tests\n- Create `.env` file in the root directory of the project\n- Populate it with at least 1 live pass URI. \n    - Use `.env.example` as a reference.\n- Run `make test`\n\n## Usage\nSee the [test/nzcp.js](test/nzcp.js) file for usage examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoway%2Fnzcp-circom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoway%2Fnzcp-circom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoway%2Fnzcp-circom/lists"}