[NCR#1 Proposal] DataMask: a CYC browser extension based on ZK Email programmable provenance #5812
Replies: 2 comments 1 reply
-
Hi @achab, thanks for submitting the proposal! A few early questions and thoughts: Methodology
Would be great if you could elaborate, perhaps with example, how CYC could be achieved with zkEmail proofs / how the information is accessible through emails.
Lovely if additional information on how the backend component is expected to operate could be supplemented. (E.g. is it a part of the browser extension, something that the user runs separately, something that runs on a server, etc.) Deliverables
Is the intention here to utilize the Circom implementation of ZK Email? If yes, best to elaborate how Noir is intended to be leveraged. |
Beta Was this translation helpful? Give feedback.
-
Selected proposals for NCR#1 are announced: https://github.com/orgs/noir-lang/discussions/5932 Thank you for your support on the initiative. NCR is just one of the many ways to start your explorations with Noir, check the announcement for more potential ways to collaborate. Let's bring the world ZK! |
Beta Was this translation helpful? Give feedback.
-
Summary
In regulated industries, websites need to restrict access for specific users. For instance, web3 trading platforms might block U.S. residents, betting sites only allow adult, etc. These sites don’t need to know users' identities; they just need to verify that users meet legal requirements. In that case, the usual process of KYC (Know Your Customer) where the user is asked to provide its real data asks too much of the users. Websites just need to check that users are allowed, not to know them. We’ll talk about CYC (Check Your Customer) in the rest of the document for this reason.
Recent cryptography advances, especially zero-knowledge proofs (ZKP), enable providing a technical answer here. The user can create a cryptographic proof showing that he’s allowed to access the content instead of sharing its personal data. The website will then receive the proof, check its validity and - if the proof is valid - let the user access the content. Such a process is relevant as long as the data used to generate the proof comes from a trusted data source - named TDS in the rest of the document. This is where ZK Email can be useful.
ZK Email, which is an audited and production-ready ZKP-based project, crowdfunded by Gitcoin and recently mentioned by Vitalik, is a zk-based project that enables programmable provenance via server-free email verification. It can be seen as a data provenance framework. This trusted data can then be used to generate cryptographic proof that the user is allowed to access the content (country != US, age > 18, etc.). To enable users to generate such proofs and inject them to websites, we propose to build DataMask: a CYC browser extension based on ZK Email programmable provenance. Such browser extension will rely on an extensive list of circuits - written using Noir - and on NoirJS to generate proofs in the browser. We’ll also implement a React component - based on NoirJS as well - to let the website verify those proofs.
Methodology
This project contains two layers of ZKPs:
We will build a product that has three parts:
Note that ZK Email proofs can be generated either in the backend - in a few seconds - or in the user's browser extension - so emails data stay on the user's side.
We describe the interactions between all parts in the diagram below.
Backend
The role of the backend is to store ZK Email circuits - that represent data we want to extract from emails - and CYC circuits - that represent constraints websites want to check.
We will start by creating a ZK Email circuit that parses a template email that provides the user’s data, and an extensive list of CYC circuits using Noir programs (check age, country, salaries, inclusion in standard data structures, possibly zkML use-cases, etc.) that aims at being a reference for other CYC projects.
When the full project is working for such an email template, we’ll create ZK Email circuits of real TDS: social networks, government identity systems, banks, etc.
The backend should also store CYC circuits for a given website. Sport betting websites and crypto trading websites won’t require the same checks from their users.
Browser extension
The browser extension is used by users: (a) to retrieve their trusted data by verifying ZK Email proofs, (b) retrieve the CYC circuits of the website they want to access and (c) to generate CYC proofs to be sent to the website. In practice, users have to generate ZK Email proofs beforehand, those proofs being stored in their browser storage. We might also consider a separate database in case of technical limitations.
React component
The goal of this component is to enable websites to verify proofs sent by the user via its browser extension. In practice, the component will be built with NoirJS and will be a kind of wallet connect button to let users connect their DataMask extension. When connected, the component will receive CYC circuits and CYC proofs, and will be able to verify CYC proofs.
Once the proofs are verified, the website can safely let the user access the gated content.
Timeline and Deliverables
[6 - 20 Sep] Backend: implement the logic for a template email
Scope:
[21 Sep - 4 Oct] Backend: support email templates from TDSs (social networks, banks, etc.)
Scope:
[5 - 18 Oct] Browser extension
Scope:
[19 Oct - 6 Nov] React component + Testing + Documentation
Scope:
Team
Team members
Massil
Rami
Abdessamad
lakonema2000
Start Date
6 September 2024
Beta Was this translation helpful? Give feedback.
All reactions