Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Social Cipher] Profile.io proof personal information with NFT (age-verification) #17

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Profile.io
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please remove this change from the PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

test

# Alpha Build 2

Tracking issues and projects for Alpha Build 2 grants program.
Expand Down
55 changes: 55 additions & 0 deletions profile.io/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Profile.io: privacy preserving identity, nationality and age verification

Using a profile.io user's indentity verification KYC results to prove user's adult verification and/or nationality without revealing personal data by using ~~Aztec Connect~~ Noir circuit ZKP. Scoping service for third parties to verify such information privately, either through profile.io/verify or their own user flows (eg. exploring potentially using Frames.js).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it just using the Noir DSL (Domain Specific Language) and tooling, or also the aztec.network?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for end-users who interact with UI that uses aztec tech behind scene.



## Challenge Selection

- [ ] ZKEmail Guardian
- [x] Social Cipher

**Note**: You can change which challenges you've selected during the competition if you'd like. You are not bound by your choices or descriptions entered during the one week check-in.

## Team information

[Profile.io](https://www.profile.io/)

## Technical Approach

We'd like to use Aztec ZKP for proving adult verification (or any other user info) on our app.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be worth understand where the assumptions begin. Eg, are you assuming a public NFT has a verified age indication, and you want to use that? That is, proof of possession of that NFT, without revealing which NFT?
Or maybe the assumptions start somewhere else

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea is user has a private NFT that contains user's personal info such as age, nationalities, eye colour, etc as a note.
So only the user can see the note by default.

When a verifier (another user) requests user's info (ex: isEuropean? isAdult? isFemale?), the NFT holder sends to the verifier by encrypting with verifier's address without revealing other sensitive info.

The verifier is the only one who can open and see the info.

But that's my theory and I am on the way to figuring out how to implement with Aztec tech.

~~We have already smart contract that mints NFTs on Polygon mainnet~~

The plan is to use ZKP and Aztec Note when user inputs his/her identity including age then the user can use it when the age verification is required without revealing details.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be worth digging a little deeper into what you want to be public/private in terms of inputs and state.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I discovered that using Aztec Connect is not recommended. Therefore, I had to change the plan. I will update the readme.


Here is the user flow:
1. In FE (frontend), a user inputs his birthdate on FE (ex: 20/04/1995)
1. The FE calls Aztec contract to mint a NFT with the Note which has his birthdate (at this step, PXE creates ZKP when a private function is called on the Aztec contract if I am understood properly)
1. Now the user owns the age-NFT
1. Another user (verifier) wants to verify if the user is an adult or not.
1. The user doesn't want to reveal his exact age but can prove whether he is adult or not by using ZKP (or Note?)
1. The FE has a "verify" button and when verifier clicks that button -> Calling Aztec contract to process target user's age verification -> FE shows whether the user is an adult or not on the UI.


## Some technical questions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For (a) and (b) below, you should be able to find relevant information in the docs. For (a), I think you could even just "Ask Aztec AI" (appears in the bottom right corner of the docs).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could find the answers although I have many other questions still. I will update the readme.

a. At above step 2, the created Note is an actual ZKP? I am confused the relation between Note and ZKP?

b. At above step 6, can Aztec contract retrieve age-NFT data without the NFT owner's permission? Do I need the "Witness"?

c. At above step 6, if Aztec contract can retrieve age-NFT data (birthdate), can the Aztec contract process calculation of the Note data? For example, `isUserAdult(note)`, `isUserOver50(note)`, `isUserOver70(note)`.

## Expected Outcomes
Providing a quick age verification feature.

## Lessons Learned (For Submission)

- What are the most important takeaways from your project?
- Are there any patterns or best practices that you've learned that would be useful for other projects?
- Highlight reusable code patterns, key code snippets, and best practices - what are some of the ‘lego bricks’ you’ve built, and how could someone else best use them?

## Project Links (For Submission)

Please provide links to any relevant documentation, code, or other resources that you've used in your project.

## Video Demo (For Submission)

Please provide a link to a video demo of your project. The demo should be no longer than 5 minutes and should include a brief intro to your team and your project.