{"id":28319241,"url":"https://github.com/rarimo/passport-zk-circuits-noir","last_synced_at":"2025-10-22T21:37:09.348Z","repository":{"id":284961600,"uuid":"943503636","full_name":"rarimo/passport-zk-circuits-noir","owner":"rarimo","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-14T11:21:21.000Z","size":1127,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T16:50:47.082Z","etag":null,"topics":["noir","noir-lang","passport","registration","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/rarimo.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,"zenodo":null}},"created_at":"2025-03-05T20:13:36.000Z","updated_at":"2025-05-30T12:15:46.000Z","dependencies_parsed_at":"2025-03-28T16:35:46.735Z","dependency_job_id":"8f91ed0e-9962-4567-8c1f-56b7617a517b","html_url":"https://github.com/rarimo/passport-zk-circuits-noir","commit_stats":null,"previous_names":["rarimo/passport-zk-circuits-noir"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/rarimo/passport-zk-circuits-noir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-zk-circuits-noir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-zk-circuits-noir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-zk-circuits-noir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-zk-circuits-noir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rarimo","download_url":"https://codeload.github.com/rarimo/passport-zk-circuits-noir/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rarimo%2Fpassport-zk-circuits-noir/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261173511,"owners_count":23120093,"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":["noir","noir-lang","passport","registration","zkp"],"created_at":"2025-05-25T09:10:29.844Z","updated_at":"2025-10-22T21:37:09.341Z","avatar_url":"https://github.com/rarimo.png","language":"JavaScript","funding_links":[],"categories":["Projects"],"sub_categories":["Identity"],"readme":"## Implementation of Zero-Knowledge verification for biometric passports using Noir\n\n### Requirements\n\n- nargo version = 1.0.0-beta.1\n- bb verion = 0.66.0\n\n### Tests\n\nTo run tests for a specific passport provide json file with the passport details ([see](js/process_passport.js)) and use\n```\ncd js\nnpm run test\n```\n\nTo run the noir tests use\n```\nnargo test\n```\n\n### Run\n\nTo build circuit use\n```\nnargo execute\n```\n\nFor proving the [Barretenberg backend](https://github.com/AztecProtocol/barretenberg) is recommended\n\nTo generate a proof use\n```\nnargo execute\nbb prove -b ./target/noir_dl.json -w ./target/noir_dl.gz -o ./target/proof\n```\n\n### Support\n\n#### Hash functions: \n- SHA-1\n- SHA-224\n- SHA-256\n- SHA-384\n- SHA-512\n\n#### Signature algorithm\n\n- RSA 2048 bits\n- RSA 3072 bits\n- RSA 4096 bits\n- RSA-PSS 2048 bits (MGF1)\n- RSA-PSS 3072 bits (MGF1)\n- RSA-PSS 4096 bits (MGF1)\n- ECDSA over secp256r1\n- ECDSA over brainpoolP256r1\n- ECDSA over brainpoolP384r1\n- ECDSA over brainpoolP512r1\n- ECDSA over secp521r1\n\n### Naming conventions\n\nThis proposal includes the mechanism for selecting the register identity circuit based on the passport parameters.\n\n### ***Passport parameters (generic parameters):***\n\n- *Signature type* (see the corresponding table);\n- *Passport hash type* (see the corresponding table);\n- *Document type* (see the corresponding table);\n- ***EC** chunk number* (number of hash blocks used by the encapsulated content, for SHA1, SHA256 block size = 512 bits, for SHA384, SHA512 block size = 1024 bits);\n- ***EC** digest position* (position of encapsulated content hash in the signed attributes);\n- ***DG1** digest position shift* (position of the DG1 hash in the encapsulated content);\n- *AA Signature type / NA - No Active auth* (see the corresponding table);\n  - ***DG15** digest position shift* (position of the DG15 hash in the encapsulated content);\n  - ***DG15** chunk number* (number of hash blocks used by the DG15);\n  - *AA Key position shift* (shift to the first bit of the AA public key);\n\n### ***Circuit naming example:***\n\n- **registerIdentity_1_256_1_3_228_248_NA**\n- **registerIdentity_1_256_1_3_228_248_1_220_3_456**\n\n\n**Hash type table:**\n\n| TYPE | ALGO |\n| --- | --- |\n| 160 | SHA1 |\n| 256 | SHA2-256 |\n| 384 | SHA2-384 |\n| 512 | SHA2-512 |\n\n**Document type table:**\n\n| TYPE | FORMAT |\n| --- | --- |\n| 1 | TD1 |\n| 3 | TD3 |\n\n\n**Signature type table:**\n| TYPE | ALGO   | BITS           | E / CURVE           | SALT | HASH_ALGO |\n|------|--------|----------------|---------------------|------|-----------|\n| 1    | RSA    | 2048 = 64*32   | 65537 / -             | -    | 256       |\n| 2    | RSA    | 4096 = 64*64   | 65537 / -             | -    | 256       |\n| 3    | RSA    | 2048 = 64*32   | 65537 / -             | -    | 160       |\n| 4    | RSA    | 3072 = 64*48   | 37187 / -             | -    | 160       |\n| 5    | RSA    | 2048 = 64*32   | 65537 / -             | -    | 512       |\n| 6    | RSA    | 2048           | 58333 / -             | -    | 160       |\n| 7    | RSA    | 3072           | 45347 / -             | -    | 160       |\n| 8    | RSA    | 3072           | 46271 / -             | -    | 160       |\n| 10   | RSAPSS | 2048 = 64*32   | 3 / -                 | 32   | 256       |\n| 11   | RSAPSS | 2048 = 64*32   | 65537 / -             | 32   | 256       |\n| 12   | RSAPSS | 2048 = 64*32   | 65537 / -             | 64   | 256       |\n| 13   | RSAPSS | 2048 = 64*32   | 65537 / -             | 48   | 384       |\n| 14   | RSAPSS | 3072 = 64*48   | 65537 / -             | 32   | 256       |\n| 15   | RSAPSS | 2048 = 64*32   | 65537 / -             | 64   | 512       |\n| 20   | ECDSA  | 256 = 64*4     | - / secp256r1       | -    | 256       |\n| 21   | ECDSA  | 256 = 64*4     | - / brainpoolP256r1 | -    | 256       |\n| 22   | ECDSA  | 320 = 64*5     | - / brainpoolP320r1 | -    | 256       |\n| 23   | ECDSA  | 192 = 64*3     | - / secp192r1       | -    | 160       |\n| 24   | ECDSA  | 224 = 32*7     | - / secp224r1       | -    | 224?      |\n| 25   | ECDSA  | 384 = 64*6     | - / brainpoolP384r1 | -    | 384       |\n| 26   | ECDSA  | 512 = 64*8     | - / brainpoolP512r1 | -    | 512       |\n| 27   | ECDSA  | 521 = 66*8     | - / secp521r1       | -    | 512       |\n| 28   | ECDSA  | 384            | - / secp384r1       | -    | 384       |\n\n\n**Active auth signature types table:**\n\n| TYPE | ALGO | BITS | E | SALT | CURVE | HASH_ALGO |\n| --- | --- | --- | --- | --- | --- | --- |\n| 0 | NO AA | - | - | - | - | - |\n| 1 | RSA | any | any | - | - | any |\n| 20 | ECDSA | - | - | - | secp256r1 | 160 |\n| 21 | ECDSA | - | - | - | BrainpoolP256 | 160 |\n| 22 | ECDSA | - | - | - | Brainpool320r1 | 256 |\n| 23 | ECDSA | - | - | - | secp192r1 | 160 |\n| 24 | ECDSA | - | - | - | secp384r1 | 384 |\n\nNote: Any RSA goes as type 1, but we handle different ecdsa prime curves as different algos in production.\n\n### Benchmarks\n\n#### Android\n\n| ALGO | RAM GB | Time |\n| --- | --- | --- |\n| brainpoolP512r1 | 2.7 | 1 min 7 sec |\n| secp521r1 | 2.9 | 1 min |\n\n\n### Issues\n\nIssues can be submitted via [GitHub](https://github.com/rarimo/passport-zk-circuits-noir/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarimo%2Fpassport-zk-circuits-noir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frarimo%2Fpassport-zk-circuits-noir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frarimo%2Fpassport-zk-circuits-noir/lists"}