Skip to content

Commit

Permalink
reformat file according to prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
remicolin committed Jul 14, 2024
1 parent 8920bc4 commit 3669e7c
Show file tree
Hide file tree
Showing 14 changed files with 1,262 additions and 1,207 deletions.
21 changes: 11 additions & 10 deletions circuits/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Proof of Passport Circuits
# Proof of Passport Circuits

## Requirements

| Requirement | Version | Installation Guide |
|-------------|---------|--------------------|
| nodejs | > v18 | [Install nodejs](https://nodejs.org/) |
| circom | Latest | [Install circom](https://docs.circom.io/) |
| Requirement | Version | Installation Guide |
| ----------- | ------- | --------------------------------------------------- |
| nodejs | > v18 | [Install nodejs](https://nodejs.org/) |
| circom | Latest | [Install circom](https://docs.circom.io/) |
| snarkjs | Latest | [Install snarkjs](https://github.com/iden3/snarkjs) |


## Overview of the circuits

Circom circuits are located in the `circuits/` folder.
The circuits are split into two parts: `register` and `disclose`.
This design is close to that of [semaphore](https://semaphore.pse.dev/).

The `register` circuit is used for the following:

1. Verify the signature of the passport
2. Verify that the public key which signed the passport is part of the registry merkle tree (a check of the merkle roots will be performed on-chain)
3. Generate commitment = H (secret + passportData + some other data)
Expand All @@ -27,6 +27,7 @@ The `register` will follow the `register_<hash>With<signature>.circom` naming co
One verifier for each register circuit will be deployed on-chain, all of them committing to the same merkle tree.

The `disclose` circuit is used for the following:

1. Verify that a user knows a secret e.g., he is able to reconstruct one leaf of the merkle tree (a check of the merkle roots will be performed on-chain)
2. Passport expiry is verified
3. A range check is performed over the age of the user
Expand All @@ -36,8 +37,8 @@ The `disclose` circuit is used for the following:
Any application that wants to use Proof of Passport can actually build its own `disclose` circuit.

### 🚧 Under development 🚧
Proof of Passport currently supports the following sig/hash algorithms:

Proof of Passport currently supports the following sig/hash algorithms:

- [x] sha256WithRSAEncryption
- [x] sha1WithRSAEncryption
Expand All @@ -48,8 +49,7 @@ Proof of Passport currently supports the following sig/hash algorithms:
- [ ] ecdsa-with-SHA512
- [ ] sha512WithRSAEncryption

> 💡 We currently have a bounty program if you implement a sig/hash setup.
> 💡 We currently have a bounty program if you implement a sig/hash setup.
## Installation

Expand All @@ -68,4 +68,5 @@ yarn install-circuits
```bash
yarn test
```
This will run tests with sample data generated on the fly.

This will run tests with sample data generated on the fly.
Loading

0 comments on commit 3669e7c

Please sign in to comment.