[BUIDL Asia 2024] Private Verification of User Data with ZK by Evan Shapiro
Kryptoplanet Talks · 9 Apr 2024 · 26:11
Evan Shapiro, chairman of the board and co-founder of Mina Foundation and Mina Protocol, presents private verification of user data with zero-knowledge proofs at BUIDL Asia 2024 in Seoul. The talk covers how ZK lets an application check facts about a user without exposing the underlying data.
Speakers
Topics
From Kryptoplanet Talks, hosted by Kryptoplanet.
Transcript
[Music] hello everyone hey I'm Evan um I'm a co-founder of mina protocol and we are a layer one that is working on zero knowledge proofs and one of the main ways you can apply zero knowledge proofs is for privacy and I want to talk a little bit today about what that unlocks for web 3 um I think a lot of the time web 3 has talked about privacy for Private Financial transactions or making things kind of more private but it actually I think just like is very necessary for a lot of use cases we might just want to do and I wanted to talk about that because I think it's important for where
Web Two where web 3 can go next in doing more than it does today so yeah so I'll talk a little bit about why private usual data is important then a little bit about uh why ZK is good for enabling this and then we'll talk about some examples in practice using this on Mina that hopefully will give a good sense of how you might actually deploy this as a developer or end up interacting with it as a user yeah so why private user data so when I say private user data I really mean any data that you wouldn't want to share publicly so this isn't um just making things um you know Private Financial transactions or whatever this is you know all the things we're already
used to being private on web 2 like we don't expect our Healthcare data to be leaked everywhere we send private messages expecting they will stay private uh we you know use apps for location and we don't expect to be known where we're going all the time and some of these unfortunately are semiu if you um you know people are tracking them but at least it's hard to get to it as an individual I can't just like get this information for someone random that I know in in the crowd or whatever um so we're used to this in web to this is like a thing that we use all the time when we're interacting with these applications and you can imagine if we're waning to build a web 3 application it would be nice to be able to interact with some of this data without it suddenly becoming all uh you
know public and this is super easy to do in web 2 we just trust a centralized server with our data uh you send your data to the centralized server the centralized server stores your data along with everyone else's data in some big database somewhere we hope the data doesn't get leaked and uh we can use our application we can use our you know our social media or like our you know ride sharing app or whatever we want to do and it's great uh unfortunately this doesn't really work quite as cleanly in web 3 today uh because we don't have trusted centralized servers to store this data which is actually awesome uh because we can build platforms that are open that don't have uh centralized providers uh
so that's all really great but it has also meant that everything so far has to be public and and when you put your data on the Chain everyone's looking at it everyone's running that computation that's how it kind of works and this works for some things like dii nfts we've seen these use cases come up they work they're very large now great uh but there's still a lot of use cases that involve private data that we would like to be able to do that we cannot do in this Paradigm I wanted to like talk about like a semi- real world example I don't know if this is like how realistic it really is uh but I think like it gives a good sense of maybe why you might start wanting to think really seriously about
privacy when you start building something that starts interacting with the real world uh let's say we want to build just like a simple ride sharing application uh we want users and drivers to review each other uh we don't want to just leak everywhere we've been forever uh you could figure out where someone lives for example that way especially this is web 3 uh you might be able to uh see who has a lot of crypto and then see everywhere they've gone and that's probably not something that you want to do if you have a lot of crypto and you want to use an app like this um so here's like a naive solution um uh you could store reviews on chain but not the actual trips unfortunately so you think like okay we're not putting
the trips on chain should be fine this still has the issue that um I can ask drivers to um uh offline share trip data and they can provably connect that with the onchain reviews and so you can offchain then connect everything back together and make everything public where you've traveled and everything in fact if there's like someone who has a lot of crypto maybe I can even put a bounty up saying if they use this app send me their trip data they won't know that you sent it to me I will pay you for that um suddenly this is like very bad from a privacy perspective if we did this naively this way so so just an example keep in mind we'll come back to talking about how ZK
can help with it so yeah so zero knowledge is like this very cool primitive that can help with things like this uh I think one way to think about it is if you know about like hash functions public cryptography this is kind of like another crypto primitive excuse me alongside those so it's very you know it's very cryptography um crypto and uh it's very powerful as well it's like this very General new primitive and what it does precisely is it lets um users construct proofs about information and share those proofs with other parties um in ways that both make the proof uh very efficient to check so I can have a very
huge computation I can like have a computation that runs on you know my my supercomputer for like you know a year or whatever and it's still very cheap to check the proof afterwards and also you can do this in a way where you hide the inputs and you only share constraints on the the inputs so I can say for example there is some data source that says that I am 31 or whatever and here's a proof though that I am over 18 but I'm not going to share my actual age so you can share these constraints about the inputs without sharing the inputs themselves so you keep privacy over over those uh and this is really great because now we can use these to selectively disclose facts to verify things it's a very um powerful technique when you're thinking about the
kinds of uh trust applications you would want um on the internet and with blockchain just to give like a very simple example uh you could share a proof that you know of a number that when you square it equals 121 without sharing the actual number it's kind of a trivial example but for people that know more cryptography you could share for example here's a proof I know the pre-image to a hash but I'm not going to share what the pre-image is I'm just going to share I know the pre-image to the hash and if you can do that that's like a much more powerful operation that you wouldn't usually be able to do but you can do with zero analy proofs uh so very powerful for privacy for efficient proofs of things for Selective disclosure of data uh so here's how this would work in
practice uh we have our user we have a browser and we have inside the browser like a wallet the the little square in the corner is intended to be a wallet and we have some private data that is in the wallet and we would like that private data not to be leaked publicly and not to go after the whole world we want it to stay in our wallet and stay private to us what we can do is inside the wallet compute a proof about that data that proof can then go to the web page and then that proof can then be shared with the blockchain so from the users's perspective they have to trust their wallet same as we do today with our private keys but we don't have to trust the web page we don't have to trust the blockchain we've shared this data that we wanted to keep private um
well we've shared the fact about it but not the actual data itself um and yeah we've we've been able to to to do that sort of operation and there's a lot that goes into behind the scenes making this all possible but at a high level from like a user and developer perspective this is the kind of thing I think we should be thinking about when we're building these kinds of interactions um yes so going back to the uh private right share thing earlier the problem was that trips could be linked back to your onchain account and then from your onchain account could be linked to everything else you're doing on crypto all of your the assets you hold all the other applications you interact with everything is all linkable together not great um but instead what we can do with zero knowledge proofs is we can share
proofs about um your rating any of the proofs that are needed about your account but without sharing the account itself or the underlying data so I can say here's a proof that you know over all of my rides I have I have like you know a four four and a half five star review or whatever but I'm not going to share all the actual trips I've done I'm not going to sh my actual account data it's all staying private um and you can use the blockchain side of it to to make sure that you're actually updating your ratings so that even if you get a bad review you have to keep track of it you can't just like skip that one and uh you can make sure that the state is all kept up to date uh so between like zero knowledge proofs and blockchain we can
think about making platforms like this that are fully open that have privacy uh and uh because of that keep your sensitive information safe and unlock new applications that I think is is important and cool so some improvements here like you know no data leaks is which is a really good one compared to web 2 uh and allows for application just generally to be more private than was possible in web 2 so that's all really good but I think just in particular like never mind like more private which I think is good and important we can just unlock more use cases at all that use private data in some way use identity in ways use um uh keep keep information separate in particular ways you can just
do things with privacy which unlocks more applications uh we've been kind of encapsulating all this in this idea called HTP ZZ so similar to htps how like it makes sure that data is being sent securely between websites uh this is the idea of using zero knowledge proofs to build an Internet that has more guarantees and has um more privacy for your data and provides um more trustworthiness uh through zero knowledge proof s Mina so this is I think like kind of the the top level idea that we're hoping uh will be a thing is like you go around the internet and you are um interacting with websites that have integrated zer knowledge proofs for privacy and have integrated zero knowledge proofs to be able to prove things about the data that's moving around um on those
applications so uh yes this is this is a thing we're hoping to make happen uh I wanted to share some examples also in practice on Mina so um Mina is currently at a stage where um it is on mainnet and it offers like a um proof of its blockchain for payments but uh there's about to be a uh upgrade for mina that will unlock all these kinds of programmable applications as well basically zero knowledge smart contracts uh pretty soon for Min as mayette and there's been a bunch of teams that have been building things that are kind of in this ballpark of of privacy and uh zero knowledge proofs on Mina so uh to share
some that are actually happening right now uh one Punk pole which is also uh native to South Korea which is super cool is working on a private voting solution so so you can uh have communities initiate votes on things and um they can uh users can vote on those platforms or indicate how they feel about a topic without actually uh uh well keeping their vote private and uh this is really cool they've actually found a lot of uh really cool communities that want to use this one being I uh one of the political parties in South Korea which is like quite a cool integration uh for them to do I think uh so there's them there's another company tonic working on private identity so this is being able to
say uh here's a proof that I have been kyc and uh I'm not a bad actor with respect to like the current Financial system and you can let me use this application but otherwise keeping your data private to saying I have been kyc but otherwise I'm not going to tell you who I am in particular uh so that's really useful if you want to build any kind of like identity thing that uses kyc uh a team using this is called Lumina and they're building a private compliant defi solution so using these proofs of kyc to build like privacy pools uh where uh you know once you're in the pool you can transact privately uh and do defi privately but you also are keeping your identity private when
you're doing that which is really good for um companies that might want to uh do things on chain but want to make sure that they're not interacting with Bad actors when they're doing that uh another one is this team called bios snarks uh they're working on private proofs about scientific data uh so proving like I have a molecule that has these properties or other kinds of scientific data related things so that one's also pretty neat uh there's also a bunch of layer twos or not a bunch there's really like a few but protoid and Zeo are like the two biggest uh right now who are building like uh scalable like basically Z rollups for mina taking advantage of Mina's own like native zuro knowledge proof functionality uh there's a bunch of other ones but that's just like a summary of some things that are being
built using this kind of technology that can be built now that we we have access to zero knowledge proofs uh a couple things in development worth mentioning too are uh evm integration so we want to make it possible to use these zero knowledge proofs from ethereum as well as proof things about uh evm state from Mina as well so you could say here's a proof that I own an nft from this collection but I'm not going to tell you which particular one or here's here's some other proof about my activity so far on uh ethereum or any other evm chain and then also bringing that back over to ethereum so you can then use things with it over there too um and another one is this idea called ZK passport it turns out that passports have uh NFC uh in them most modern passports do so you can scan your
passport with your phone and get all the data about it and that data includes cryptographic uh signatures from like the nation issuing the passport so you can use this to do um both private identity as well as uh proofs of personhood being able to do things like one person one vote for example or this is a website where each user will you know had a real passport they're not like an AI or something uh but uh doing that in a way that's fully private and decentralized you know uh making it so you don't actually have to give that website you know your passport information for example which I've seen actually is like a thing that I think LinkedIn is doing now they want your passport information to do some stuff but it seems better if we can maybe keep some of that private uh I'll run through
a couple examples of how these work in practice it should be pretty clear from what we've seen before for eonic for example you go to tonic's website you complete their kyc they then put an identity on your wallet that says okay I've completed kyc the sensitive credential information goes in your wallet and then You' go to Lumina and lumina then says okay wallet I need a proof that you've been kyc and the underlying data never leaves the wallet so it's you're not exposing who you are to the browser or to the blockchain but what you are doing is you're sharing a proof that you do have a valid kyc credential with the browser and with the blockchain so you can use the application um if in a private way another example uh just using ZK
passport is like you know user scan passport upload passport data to wallet and then share a proof about that data to uh the browser and the blockchain uh and you can make for example like a website that doesn't allow um uh you know nonhuman actors with the the intent of not allowing non-human actors on the application uh it seems in particular like probably uh this is either already are going to be uh where the new AI stuff you probably can create a lot of fake identities and make them deploy them to websites and use that for misinformation or propaganda or other things so it seems very useful to be able to have some proof that you're not a Ai and you are a real person but doing
that in a private way is also important so you can build things like this also this is like something that is like you know we're working on the specs for and should be pretty cool um yeah so just like I just I think that's like it for like the main content I just wanted to share you know like so this some summary of like where to look for some of the stuff if you actually want to like dig into the code and start actually seeing what it's like to build with some of the stuff and these ideas um as I said before like there's going to be this upgrade that's going to happen pretty soon it's going to make all this stuff enabled on minus mainnet and that will be very soon currently it's in like testnet people have been building but soon it'll be in
production um there's a few things to know about as well uh one is there's this thing called 0js and that's like Mina's um zero knowledge native but also in typescript uh smart contract language uh so this is like equivalent to like solidity um if come from that world and uh there's two other programs worth knowing about ZK ignite it's an incubator for like zero knowledge applications so if you want to start building something if you have an idea for some kind of private application you want to build this runs quarter and gives funding gives mentorship gives support people that are want to builds with this new technology and there's another one called Navigators which is like you don't want to build a full project yet but you do want to start
digging in and building with zero knowledge and experimenting with it this is a program that helps you get started with that and offer some funding for it as well uh so there's going to be lot happening in the next few months with Mina with all this stuff there's like you know all these EK apps deploying on Mina that do all these new things there's the mainten upgrade itself there's uh the evm integration coming out and there's all this other stuff happening so encourage you to check out um our Twitter our Discord and our website to see more what's going on there and I think that's it so thanks everyone for listening um and I don't know if we do questions or something but I I know I'm a little short in time but we can also have a break take questions
yeah yeah okay so anyone has questions happy to answer any of those do you have any questions we're going to take impromptu questions if you have any we have some time left so any questions for Evan and for mina privacy ZK we can pick Evan's brain that's fine um oh okay sure yeah please do yeah but so at it's I uh yes well why so what would be what
would be your advice to Korean developers or like a even non-developers who are interested in ZK Stacks where they should start from yeah so I think there's like two halves to think about there's the underlying proof systems themselves and then there's like the um libraries that let you build um using those proof systems uh without having to dive into into the like specific cryptographic implementation details of them so I would say like probably it's good actually to get started with things like OJs where uh you can start playing with the like conceptual ideas with it abstracting away all the proof system stuff now on the proof system side I think that's where like uh it's it's a lot of it is like uh based in you know
uh cryptography you know you have to like have bit of a ma math background and I would recommend there like there's a bunch of blog posts that have been written on the I proof systems I would look for something that has been written in the last year or two because they've changed a fair bit since like some of like the earlier content was written like four you know four plus years ago um so proof systems I would say like blog posts like some math is needed for applications I think like stuff like OJs is cool because then you can just start playing with um implementing programs and not having to dive into the detailed math side of things as much thank you yeah other questions questions easy questions
anything's good we have plenty of time so I mean do you want to share anything else um maybe like I ask a question um is it your first time in Soul by the way it is my first time in Soul yeah I've been trying to invite you for such a long time but how do you find it do do you want to share kind of your you know Impressions on because you had a event as well right yeah yeah I mean I think it's it's been cool to just be in Soul like I like going to new cities and stuff and I have liked it so far it's only been like three days but it's been good um I think what's is cool is like it's very clear like um uh crypto has like um a lot of people thinking about it here like both kind of on the
developer and infrastructure side but also like I get the sense like you know uh people are already kind of used to it at least on like the the token side um generally in Korea which like is like super cool compared to like I think a lot of other places where like it feels like there's like maybe like a really uh small like U community of developers infrastructure Builders but the general population maybe hasn't thought about it as much so I think it's like super cool from that angle and like feels like things like like Punk pole for example there's like good opportunities for building applications because of it so I think yeah it's been it's good yeah I know that you have also met with like dsrv teams like that and uh what is your impression because like there's a lot of like validators um infrastructure
providers in South Korea as well surprisingly so um I hope you had a nice uh meeting as well no I mean yeah like I think like uh it was the first time meeting them in person like everyone in person but we working with dsb for like a super long time oh yeah right that's right since like one of our early yeah yeah so I mean yeah no it's it's yes yes uh Mina's always welcomed and and the Korean community and I think the issue like the Privacy the topic of privacy and the importance of privacy I think has been less um how should I say appreciated in South Korea like relatively because I think it's very new to us the concept of protecting our own privacy like private data you know information I think in terms of um yeah
so I just wanted to like ask you how we can kind of improve that awareness as well maybe as an education or something like that like I mean for one I I saw that like when you use apps here I think there is like a privacy Protection Law that exists like around like having to disclose details about what applications are doing with your data and stuff so I think there's some stuff there that I think like is super cool and like very different than like the US already for example um I'm not sure like I I think uh a lot of it I think is on like I think like one of the things is like yeah a lot of it's on the developer side were like there's things like that you just might not you just like applications that like you might not been able to build unless
you had privacy available um and I think on the user side like you should like when you're using these applications think like okay like am I disclosing like all the locations I've ever been to who am I disclosing it to um and you know like you're You're Building like this record over time but I think also like there's forces like AI that are going to make some of this stuff happen like more quickly so um it'll all kind of come together but you know it's things like that yeah I think the awareness is definitely getting um better and better um Kate oh there's two more two questions we'll take two and then oh there's three quickly Kate want to go ahead this just like quickly shout out oh mic could yeah so I'm sure there are a lot
of Founders and uh project leaders here at the events wondering what kind of Partnerships you guys are looking for in 2024 yeah I think um really like I think teams that want to start using some of this privacy stuff is like a really big one like and it's not just like on Mina like we're working like it's pretty close at this point like UVM integration which is like basically bridging Mina's tiny proof into other into evm smart contracts um so really it's like teams that want to bring privacy things um to their application is something we want to help make happen yeah last question uh in the back she's been waiting for some time thank you thank you for the presentation um
quick question perhaps I missed it earlier um is Mina opinionated on a proving system or are you able to swap that out just simply because the pace of ZK research it seems like every five days there's a new paper yeah we have a particular um proof system it's actually coincidentally called kimchi uh we went with like uh pickle themes for our crew systems um So currently it's on the the kimchi iteration of it perfect name for soul sry oh oh m it's not working you want to come here thank you thank you um I I think we're opinionated about like a set of
features we want to have in our proof system but one of the things we're working on doing is uh making sure that you can write um verifiers for other proof systems in our proof system so like Groth 16 for example and um I don't like there's some I think like there's a gr graic scene but uh I think there's like some opinions about like like supporting recursion supporting like uh some set of features in Mina's main proof system but then we want to connect that into other ones as well basically