Skip to content

A private dating experiment built with real cryptography, using MPC and ZK proofs

Notifications You must be signed in to change notification settings

teddav/co-match.noir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

45 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CoMatch ๐Ÿ‘๐ŸŒถ๏ธ Dating

A private dating experiment built with real cryptography, using MPC and ZK proofs.

๐Ÿง  What is this?

Co-Match is a privacy-preserving dating prototype with:

๐Ÿ” End-to-end encrypted preferences

๐Ÿค Match discovery via secure MPC (thanks to co-snarks)

โœ… Mutual match proof with ZK-SNARKs (thanks to Noir)

๐Ÿ™ˆ No swiping. No profile. No public data.

Built during #NoirHack as a fun experiment to combine MPC and ZK.

Live Demo (might be slow โ€” ping me if it is!): https://co-match.vercel.app/

๐Ÿงช How it works

You enter your preferences and your Twitter handle, so your matches can contact you ๐ŸŒถ๏ธ.
Since I have your Twitter, it's not completely private... ๐Ÿ˜ Next step: build an in-app chat.

Preferences are encrypted in your browser.
Ok, I'm lying here... ๐Ÿ™Š co-noir cannot yet run in the browser (not possible to compile to wasm), so I'm actually encrypting your preferences on the server. But this will soon be changed!

They're sent to multiple MPC servers that check for mutual matches.
Third time you caught me lying... I didn't want to pay for 3 servers for this PoC, so I'm actually running everything on 1 server, but it's spinning 3 local listeners, so it's kind of the same... ๐Ÿ˜‚

If a match is found: A ZK proof is generated (with Noir) that confirms the match without revealing your preferences.
If there's no match: no one ever knows.

Run

Noir circuit

The Noir circuit is really simple, in order to make proving faster. Compiled with nargo 1.0.0-beta.3, it has 188 gates.

MPC server

You'll need a powerful server to compute the proofs fast. I'm renting an Hetzner's CCX33 (8 vcpus, 32GB) and each proof takes about 450ms to generate.

Run the config.sh file to generate the certificates and keys for each server.

You'll need to add an env variable for the JWT token: JWT_SECRET

Tip

If you want to run the server but you're struggling to set it up, message me on Twitter and i'll help you

Front

Edit the config with the address of the API

About

A private dating experiment built with real cryptography, using MPC and ZK proofs

Topics

Resources

Stars

Watchers

Forks