Skip to content

Commit

Permalink
Merge pull request #171 from zk-passport/main
Browse files Browse the repository at this point in the history
merging readme updates on dev
  • Loading branch information
0xturboblitz authored Aug 10, 2024
2 parents 95a73b9 + ee00a02 commit db45ffe
Showing 1 changed file with 25 additions and 67 deletions.
92 changes: 25 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,51 @@
![DALL·E 2023-10-25 11 57 47 - tight AF](https://github.com/zk-passport/proof-of-passport/assets/62038140/514ae671-3c02-434f-ac6a-31ce20eec24d)
![Github banner (2)](https://github.com/user-attachments/assets/e182b110-94a2-47b5-9875-48e1736fa923)

Monorepo for the Proof of Passport protocol.
Monorepo for OpenPassport.

Proof of Passport lets users scan the NFC chip in their government-issued passport and prove the correctness of the signature in a zk-SNARK.
This unlocks two interesting use cases:
- For sybil-resistance, proof of passport can provide a source of unique identity.
- For identity and privacy, proof of passport allows selective disclosure of private data. For instance, users can disclose their nationality or their date of birth without revealing any other private information.
OpenPassport is an identity wallet that lets users generate privacy-preserving proofs from government-issued IDs such as passports.
By scanning the NFC chip in their ID document, users can prove their validity while only revealing specific attributes such as age, nationality or simply humanity.
Under the hood, OpenPassport uses zk-SNARKs to make sure personal data is redacted, but the document is verified.

As a first application, users who can prove they indeed hold a valid passport can verify this proof on-chain to mint a Soulbound Token (SBT).

## Subdirectories

- `app`: Mobile app
- `circuits`: Circom circuits
- `contracts`: Solidity contracts
- `common`: Common utils
- `registry`: Public key registry

## Roadmap

- ✅ Passport verification circuit
- ✅ Selective disclosure
- ✅ Mobile app
- ✅ SBT smart contract
- ✅ On-chain public key registry
- 🚧 Support additional signature algorithms
- 🚧 Support Active Authentication
- 🚧 SDK
Use cases unlocked include:
- **Airdrop protection**: Protect a token distribution from bots
- **Social media**: Add humanity checks to user's profiles
- **Quadratic funding**: Prevent farmers from skewing rewards
- **Wallet recovery**: Safeguard assets using IDs as recovery sources
- **Compliance**: Check a user is not part of a sanctioned entity list

## FAQ

#### Does my passport support Proof of Passport ?

![EPassport_logo_grey](https://github.com/zk-passport/proof-of-passport/assets/62038140/c3263600-19b6-45f9-9b5f-63f352992c88)
#### Is my passport supported?

If it has this symbol on the front cover, yes.
Checkout our [coverage map here](https://map.openpassport.app/)

#### What exactly is being signed ?

The circuit looks like this:

<p align="center">
<img src="https://github.com/zk-passport/proof-of-passport/assets/62038140/593e6530-6ce1-4468-b088-b8defc512de8" width="50%" height="50%">
</p>

Most of the data of interest is in the Datagroup 1, which contains the following info:
When a country issues a passport, they sign datagroups that include at least:
- First name
- Last name
- Nationality
- Date of birth
- Gender
- Expiration date of passport
- Expiration date
- Passport number

This goes through a bunch of hashes, concatenations with other data, and then is signed. By verifying the signature, we can make sure the personnal information cannot be altered.
- Photo

#### What is the signature algorithm ?

Most countries use RSA with sha256 but some of them use other signature algorithms like ECDSA and other hash functions like SHA-512. You can find a summary of the signature algorithm used [here](https://github.com/zk-passport/modulus-extractooor/blob/main/signature_algorithms.json)
Countries use different signature algorithms to sign passports. Check out our [coverage map](https://map.openpassport.app/) to see which~

#### I just read my passport but it says my signature algorithm is not implemented. What do I do ?

Currently we support the most common one, RSA with sha256. We're planning to add support for others shortly. Feel free to try your hand at implementing one!

#### What's the ICAO ?

The International Civil Aviation Organization (ICAO) is a specialized agency of the United Nations. Among other things, it establishes the specifications for passports, that have to be followed by all countries. The full passport specs are available [here](https://www.icao.int/publications/pages/publication.aspx?docnum=9303).

#### Where can I see those public keys ?

You can download the full list of public keys on the [ICAO website](https://download.pkd.icao.int/), in the strange `.ldif` format. The parsed list is [here](https://github.com/zk-passport/modulus-extractooor/blob/main/publicKeysParsed.json)

#### What can be proven ?
Not all signature algorithms are currently supported. To help us add support for yours, please contact us.

Here is all that can be proven:
#### Where can I find the countries' public keys ?

<p align="center">
<img src="https://github.com/zk-passport/proof-of-passport/assets/62038140/84ff70d2-1d82-4bee-9b57-d10c2d53f00a" width="70%" height="70%">
</p>
You can download the full list of public keys on the [ICAO website](https://download.pkd.icao.int/). Our parsed list is at [`/registry`](https://github.com/zk-passport/proof-of-passport/tree/main/registry).

Note that we can't access DG3 and DG4 which are optional fingerprint and iris scan without government authorization.

#### Even the photo is signed ?!

Yep. Currently we don't use it. If you have an idea of some fun zkml to do with it, let us know!

#### When I mint a Proof of passport SBT, what prevents someone else to frontrun my transaction ?
#### What's the ICAO ?

The SBT circuit includes a commitment to your address. If someone else tries to mint it, they will mint it to your address.
The International Civil Aviation Organization (ICAO) is a specialized agency of the United Nations. Among other things, they establish the specifications for passports, that have to be followed by all countries. The full passport specs are available [here](https://www.icao.int/publications/pages/publication.aspx?docnum=9303).

## Project Ideas

Expand All @@ -111,10 +69,10 @@ Everything we write is MIT licensed. Circom and circomlib are GPL tho.

## Contributing

We are actively looking for contributors. Please check the [open issues](https://github.com/zk-passport/proof-of-passport/issues) if you don't know were to start! We will offer bounties from $100 to $1000 for any significant progress on these, depending on difficulty. Please contact us for more details.
We are actively looking for contributors. Please check the [open issues](https://github.com/zk-passport/proof-of-passport/issues) if you don't know were to start! We will offer bounties from $100 to $1000 for any significant progress on these, depending on difficulty.

## Contact us

Contact me @FlorentTavernier on telegram for any feedback.
Contact me [@FlorentTavernier](https://t.me/FlorentTavernier) on telegram for any feedback or questions.

Thanks to [Rémi](https://github.com/remicolin), [Youssef](https://github.com/yssf-io), [Aayush](https://twitter.com/yush_g), [Andy](https://twitter.com/AndyGuzmanEth), [Vivek](https://twitter.com/viv_boop), [Marcus](https://github.com/base0010) and [Andrew](https://github.com/AndrewCLu) for contributing ideas and helping build this technology, and to [EF PSE](https://pse.dev/) for supporting this work through grants!
Thanks [Rémi](https://github.com/remicolin), [Youssef](https://github.com/yssf-io), [Aayush](https://twitter.com/yush_g), [Andy](https://twitter.com/AndyGuzmanEth), [Vivek](https://twitter.com/viv_boop) and [Andrew](https://github.com/AndrewCLu) for contributing ideas and helping build this technology, and [PSE](https://pse.dev/) for supporting this work through grants!

0 comments on commit db45ffe

Please sign in to comment.