Encode x Worldcoin Educate Series: ZK Cryptography
Encode x Worldcoin Educate Series 2024 · 12 Sept 2024 · 1:05:40
DC Builder of the Worldcoin Foundation explains zero-knowledge cryptography from probabilistically checkable proofs and a colour-blindness analogy to SNARKs and their soundness, completeness, succinctness and zero-knowledge properties. The session then shows how World ID uses the Semaphore protocol, Merkle trees and nullifier hashes for private proof of membership, how validity proofs batch insertions, and where research is heading, including client-side proving, proof aggregation, ZKML and composable digital identity, with questions.
Speakers
Topics
From Encode x Worldcoin Educate Series 2024, hosted by Encode.
Transcript
hello everyone welcome to ZK cryptography part of the world coin educate series uh today we have the special DC Builder same as the first Workshop I'm going to invite him onto the stage now hello everyone so welcome again everyone so today I'll be talking about zour cryptography as part of the the world Co educate series as you've heard like the previous weeks you've been seeing a bunch of different things right so I started with the introduction to worldcoin then Dan talked about the orb hardware and software tongi talked about Biometrics
and also one which is fairly relevant to the one that I'm going to be discussing here is the zkl and NPC discussion that was led together by Daniel and Ryan from modulus and Lucas from the tasio team we'll be talking about ZK right so in the first word you say Z zkl right so there's ZK there also so I I'll be expanding a bit of that topic and what are we doing within that topic within World coin and expand what we're doing right now so to start I think that it's good to just start with a generic explanation of what ZK is all about it's a fairly loaded concept fairly loaded topic very popular especially if
you consider things like Zer knowledge rollups or privacy applications right so if you've seen things like you have different zkm uh rollups or scalability Solutions right maybe you've heard of ZK sync or starnet or scroll Linea there's a few other different companies building ZK products in the blockchain space and there is constantly more popping up and it's one of the most Hott like one of the hottest topics in the entire space so I think it's good to just have a general understanding of of where this comes from and why is it useful and why people are so obsessed with it nowadays and why people are building with it and why we at World Quin are also using this technology to
build a part of our technology stack right so to start I explain what ZK is conceptually um the easiest way that I've seen this being explained um is with the notion of a probabilistically checkable proof or PCP so in the sort of Literature Like The cryptography literature of where zero knowledge proofs first come about um is this notion of a probabilistically checkable proof so essentially there's this like easy example that I often use to explain what what ZK is right so if you see this diagram over the bottom left of what a PCP is essentially you have two parties
one is called theover the capital P over the left and the other party is called the verifier and essentially the general Paradigm here is that the prover knows some information that wants to con wants to convince the verifier of knowing right so I want to prove to the verifier as a prover that I know something um it can be a piece of data it can be some computation um and there's this interactive protocol where is the prover communicate with uh the verifier over a few rounds uh to convince them of the statement and if they're convinced of the statement they'll say true otherwise they'll reject it and say false um one one specific example or one actual example
of what a PCP might look like is um the example of proving to a blind person that colors exist there's this like really nice example where if you imagine that uh there is a color blind person so they're not able to tell call apart and a non-color blind person the color blind person might not believe uh the person who sees colors that colors actually truly exist so how would we prove to the blind to the blind person to the color blind person that they that the colors exist so the the way you can start or you can actually do this sort of protocol is that you create three pieces of paper and each of them have a different color right so the normal the
person who sees colors is able to is able to tell tell them apart right I have a red one a green one and a blue one and I'm able to tell them apart to the color blind P person they all look the same but they can label it one two three and as long as the color blind person doesn't reveal which papers they've labeled one two three in their own head now they're able to shuffle them around right so I as the verifier or as the color blind person I'm able to shuffle the the papers around and then every time I shuffle them I show one piece of paper to the prover and the prover will be able to tell me like hey I think this one is red I think this one is blue this one is green and so the likelihood that they guess correctly
after the first round is one one in three assuming that we have only three pieces of paper right so the the chance that they guess correctly is 33% okay so I take back my pieces of paper I shuffle them again I show another one and now the the Prov guesses like green or says green if they're correct the likelihood that they have guessed correctly twice in row is 1 over 3 * 2 right or 1 over 3 * 1 over 3 which is 1 nth right so the probability each round keeps diminishing meaning that for every single round that I do the likelihood that they're guessing correctly is really low and so you can imagine that intuitively the more rounds we do the the lower the likelihood is that they're guessing
correctly so let's say if we do a th rounds it's nearly impossible statistically or probabilistically that they're guessing correctly a thousand times in a row because they they always have one and three chance of guessing correctly so this is like the notion of knowing something or knowing an argument in this case which we're getting to in the next concept so essentially they they know some information the Prov knows some information that the verifier doesn't and the verifier can be convinced after some amount of rounds that the approver actually knows that colors exist so they can be convinced so this is the notion of a probabilistically checkable proof and it's like how this field generally emerged in
literature there is some cool tricks that allowed you to create the next construction which is called the snark which is the sort of meat of what we're going to be talking about today so snarks stands for succinct non-interactive arguments of knowledge so knowledge is this sort of thing that I discussed earlier right the prover knows something that the verifier doesn't and that they're making some argument about the knowledge right so they're making a statement about the knowledge they have and the verifier can be convinced so we saw that the first protocol when I'm showing these pieces of paper is very much interactive there is a few rounds where the approver and the verifier are
interacting and they're essentially communicating with one another right they're interactive protocols and the snark or sexing non- interactive argument of knowledge frame of thought it's not an it's a by definition non-interactive protocol so the prover is able to create a computational proof called Pi you can just label it pi and the verifier will just verify that proof pi and they will be convinced the way that this is actually constructed is beyond the scope of the this presentation but for those who might be interested you can Google the concept Fiat Shamir transform which I can briefly just message in the chat if you're curious or you can ask
an llm or your favorite AI to explain what it is there is Pat Shamir sorry give me one second there we go Pat Shamir transform so there's this cool protocol in cryptography that essentially allows you to turn any interactive protocol to a non-interactive one using Randomness so that's a pretty neat thing let me go back cool so essentially we're able to tell turn protocols that are probabilistically checkable for interactive protocols into non-interactive protocols using this cool thing also let me probably pull up the questions to another slide so I can see
them while I'm explaining just in case I I lose some of you cool great okay awesome that way I can also see when I'm streaming great sorry about that and so essentially with this snark aover can prove to a verifier with just one one piece of data like a proof can vary in size but the the concept is that with just one interaction the proof can prove to a verifier that they know some knowledge or they know some data they know some computation happened correctly um so that gives that gets me to the next uh concept so the first word in snark stands for succinct that is essentially talking about sort of the computational
intensity or or like how complex it is to create and verify such a proof right so snc means short or small or easy to verify in this case um what succinctness is defined as is that in order to verify a computation it's a lot cheaper to just verify the computation than performing it myself or to for example verify some knowledge without having me to prove it myself so you can think of any sorts of kinds of things that we can make proofs about I can for example prove that I know a private key to a public key without revealing it and this is a thing that calculating it requires you to do a signature right so it might be complex it might be like
complicated to to do these sorts of things and so a succinct proof just means that it's something that it's a lot simpler or a lot easier to verify than to compute in of its own uh so this is the notion of sy synness so the general properties that we care about uh I have them listed on the bottom right so um enumerating them there are soundness completeness synness and zero knowledge so I mentioned succinctness which is just means that there's a small proof in size like it's a lot less bits to represent the proof than the computation and there's a fast verification time for that proof uh and in in computational science notation there's this like big go of something
notation where it it talks about the computational complexity of the program so it's usually a polog of n or constant size a constant time also of one um so soundness what it means is that a prover cannot um craft a invalid proof that the verifier would accept with a very small probability right so essentially there it's unlikely or extremely unlikely like probabilistically unlikely is like one in a very large number meaning that it's like extremely unlikely for the prover to be able to craft a proof that is not valid so the only way they can so that the verifier would accept the proof if it's it will the verifier
will only accept the proof if it's a correct proof completeness that essentially means that in order for the prover to create a valid proof they need to know all the information that they're making a proof about here I introduced the concept of witness Omega and constraints C that is more of a technicality but essentially what I'm doing is I have some data that I want to prove some structure of right so I want to prove for example that I have a private number or a hidden number that if I add some number to that number it's equal to 10 and these are constraints meaning that I'm constraining what the data that I'm Pro making proofs about looks like and then I can prove to the
verifier that my data or my witness or my computation satisfies these sorts of constraints to go into depth into what these things actually mean takes a long more time but I'm happy to share some resources towards the end or answer some questions about this um so yeah that that is the second property so essentially the pro not needs to know the thing that they're making the proof about they're not able to just invent it and then the last property zero knowledge is essentially the thing that we're talking about today or like what the almost the topic is named after ZK stands for zero knowledge and zero knowledge essentially means that the prover can hide parts of the information
they're making proofs about but their information always needs to satisfy some constraints or some sort of rules that we've put in place so that the verifier is convinced right I can prove to the verifier that I know some number that added with another number they're equal to 10 but I don't have to reveal which numbers I'm adding I just I can just prove to the verify that I know such numbers and the the good property of this is that I can hide this data or hide this computation without losing this sort of computational correctness or this proof notion yeah I can share the slides we can do that for sure yeah no problem with that or actually maybe yeah
I'll share it towards the end so yeah so this is like the notion of a snark so snarks is the difference between a snark and a zero knowledge snark is is fairly small a snark is a a proof where none of the witness or none of the data or none of the computation is being hidden there's nothing being hidden everything is public to the verifier and the verifier just verifies the proof and that's it uh a zero knowledge snark is a snark where some of the data is being hidden from the verifier but the verifier still knows some structure or some constraints that are satisfied by the data that I'm making a proof about and then there's a slightly uh different sort of construction called the Stark
the actual reasoning for why it's called different is mostly about the mathematics of How It's constructed but you can think of it as like the same thing pretty much like it's something that allows you to create a proof of computation that has the same properties that we have with the right but it just uses a different set of constructions cryptographically for those who are math Savvy snarks use elliptic curve cryptography and they're based off of usually elliptic curve pairings and these sorts of mathematical operations that's how they get their security properties but for Starks they use hash functions and other constructions so yeah so those are like some initial Concepts we're going to work with for the rest of the discussion so on the very first talk that I gave
introducing worldcoin I got a I had a slide that looked like this I don't know if I can zoom while probably not so let me just quickly Zoom let me see because I can see what I'm streaming so you can see this diagram cool right so uh on the first slides uh that I presented on the introduction I I showed this diagram right so this diagram essentially explains like what our architecture looks like and what it does more or less and so I want to explain where we are using zero knowledge cryptography or why so when you're a user and you download the world app which is over
here I'm able to interface with the world coin ecosystem so does what does that mean with the world app I can go to an orb and get my world ID verified so when my world ID is verified by the orb it will be inserted into like my public key will be inserted into the set of verified users and that is something that I will explain a little bit later I have a next slide which will explain how that works but essentially once I have a set of verified users I'm a able to verify that I am a a member of the verified users without revealing which member I am using zero knowledge cryptography the zero knowledge property is the thing
that allows me to hide the thing that I'm proving in this case I I'm able to prove I'm creating a zero knowledge proof on my phone as a user that I'm a verified user without revealing who I am so this is like why ZK is generally useful right I'm able to hide information without losing trust right it's scrip graphic trust because I can just verify a piece of math and if that math holds then I know that I'm not lying or like somebody else knows that I'm not lying to them so I'm proving that I'm a world ID verified person without revealing which World ID verified public ke I am this is like where generally ZK is useful and so if we move on to the next diagram let me unzoom probably let me make it fit and
probably present again so I see some questions over here ago like isogenes I don't know what you mean by by that if you give more context I'm able to answer that one uh and the the next one's Brian what is the primary go goal of worldcoin so if you watch the first presentation I gave that one will give you a much much more in-depth explanation I think like it's be besides the point because like it's it takes a while to explain so if you can just rewatch the first one I think that that would be useful how does worldcoin Ensure a unique digital identity for each user so the orb this Hardware device I have it
with me I can maybe show it a bit later but it's essentially this Hardware device that is able to verify two things that there's a real person in front of it and the second thing is that using Biometrics which we also had a presentation on from tongi you're able to verify that the person is a unique person and so with those two things you're able to D duplicate the set of public kees that are verified on chain so what role does your know proofs play in the world coin ecosystem okay so that's what this talk is about I'll get into that a bit later how does worldcoin address privacy concerns associated with biometric data this is a good question we have a lot of block posts about that in the white paper itself it goes into quite a bit more in depth but essentially It's a combination
of multi party computation and Zer knowledge cryptography so the iris codes which is the thing that we talked about in the Biometrics presentation are stored in a so so-called multiparty computation fashion so they're stored in encrypted fashion there no there's no plain text of the iris codes and then using Z know cryptography you're able to prove inclusion in a set of verified users without revealing who you are so those are like the two main privacy components there's of course a few others like on the orbit itself there's privacy uh embedded into it and a few other places but the white paper has more details on that and I I recommend you watch the previous talks which which talk about MPC and how that works and also how the Biometrics uh work as well so you have a notion of what that is ago in snarks you
said elliptic curves are used and in Stark hash functions about the former what about elliptic curves are used is it isogenes yes so for that I'm not sure if I'm able to explain that in a short amount of time I we can follow off after this is just it will just take too much time to to explain these sorts of things but yeah uh I'm happy to get into that later maybe you can DM me on my telegram after this cool so moving on so what I wanted to explain when it comes to verifying that you're a unique person without revealing who you are we use this protocol called semaphor so semaphor is a protocol that was built by the E theorum foundation and there's a
specific theme within the E theorum foundation called privacy scaling and Explorations group so this group has a specific team which is called semaphor that's like the it's a circular definition but essentially this team built this protocol and what this protocol allows you to do is it allows you to prove that I am a member of a set without revealing which member I am right so if I have a group of 10 people I can prove that I belong to that group without revealing which member I am so you as someone like who is not in the group I can prove to you that I'm member of this group without revealing which one it is is and I have which one I am and I can do that without revealing anything about myself so that is like
the property of semaphor that allows you to to do that so how does semaphor actually work there is this data structure called The Miracle tree I pulled a diagram from Wikipedia over on the right essentially the way that aerle tree is constructed is that you have some set of elements these are like these l l items in the bottom L1 L2 L3 L4 and if you hash each element and then hash The Sibling of um each element together you're able to create this tree like structure all the way to a a top hash and with that essentially what you're able to do the good property of a Merkle tree is that you're able to verify inclusion in constant time right so if I get the hash
of my specific let's say that all of these nodes at the very end are public keys right so it can be my public key it can be Brian's public key ano's private key Emma's private key so all of our private keys are in this merot tree and we're able to Hash them to create the merot tree and the good thing is that let's say that I want to prove that my public key is in the merot tree what I do is I hash my public key and then I hash everybody else's like The Sibling of each of my structures so like The Sibling would be like if this is mine then the sibling is the one sorry I think the mouse is not shown while I doing full screen okay let me do this now you can see my mouse so if I have
this one so this one is my public key if I hash my publicly The Sibling would be the one next to me if I hash this one and I hash this one I get this parent hash and then if I also get the hash of The Sibling to my parent hash I'm able to reconstruct the top hash and so this is if if I get all of the sibling hashes I'm able to reconstruct the top hash and if I'm able to successfully uh reconstruct the top hash using my own public key that means that I can prove to anybody else that I'm part of the tree however in this miracle proof as it's called uh I'm revealing which Leaf I am I need to share which public key I am in the tree uh in order to prove to somebody else that this is how it works
uh that that I in the tree so the innovation of semaphor is that you're able to prove that you own a specific node or a specific public key in the tree without revealing which one it is but you can prove to someone decisively using zal cryptography that you actually have that um so this is like the main property of semaphor that we're using within World ID our proof of personhood protocol to allow you to prove that you're a unique person without revealing who you are so this is the the step number one um so now you can prove inclusion this is like the main property of ZK that we're using here um priv privacy preserving proof of inclusion in a set of verified humans uh and then the second part is that there is this construction called the nullifier hash
and what a nullifier is I describe it here over here so a nullifier is a hash of a private key an action ID and an app ID so maybe you've heard of uh Ian's presentation maybe you listen to Ian's presentation uh about world ID use cases uh I think it was yesterday if I'm not mistaken so in the in the use cases one you're able to see what world ID can be generally used for right so that essentially means anything where you want C resistance or one person one action type protocols so you can think of voting mechanisms right so one person one vote like Democratic voting so the way that you're able to prove that only a person is voted only once is using this sort of nullifier structure and
this is just done with the hash of the users's private key uh an action ID and an app ID so the action ID and app ID are tied to whatever the integration is so it can be like this governance vote like this Democratic vote and the hash of the private key is like just the hash of the user so the property of the Notifier is that is deterministic so for every single action and for every single user I'm only able to generate one type of hash essentially if the protocol keeps track of these hashes and not hashes are completely random pieces of information like they're they don't reveal anything about you it's completely privacy preserving with these deterministic hashes I'm able to keep track of who has voted and who has not voted without
knowing who that person is I'm able to just say Okay this has been a unique human because they have a world ID proof like a semap for proof and and I have a nullifier so together with this inclusion proof in the tree and with this nullifier I know that there is a unique human being that has not voted before that is now voting for something and once they vote we is lock the hash of the vote of the nullifier and they're not able to vote again because when you're checking for a vote again their nullifier will be will collide against one that I've already seen before so I know it's the same person voting I don't know which person it is but I know it's the same person so this is like the main use case of semor and Main use case of ZK in World ID as it is right now
there's another use case for ZK as well and note this is there is one one foot note or one side note is that in the blockchain industry people use the term ZK for an incorrect thing so if we go back to the previous slide there zero knowledge properties that I'm concealing some data or some witness data from the verifier so I'm hiding something but you don't have to a lot of the ZK use cases in the space for example like rollups they're proving some computation in this case like an evm transaction or a block of transactions on the evm but they're
not hiding anything so they're not zero knowledge right they're not hiding anything so we cannot use the term zero knowledge for that because we're everything is public to the verifier so in the industry you might hear people saying that there's a ZK rollup what they really mean is that there's a it's a snark rollup or it's a validity rollup that is proving that the computation happened correctly but they're not hiding anything this is just like a footnote if you're confused sometimes that people are like saying oh this is a ZK thing but in reality it's not a ZK thing it's just because the word ZK is like quite like rolls off the tongue and it's like good branding good marketing so people use it and overload overload the term beyond the mathematical definition of what it actually means so in this case we actually using ZK
because we're hiding the private key we're we're proving that it's in the tree of but in the Second Use case for ZKA this should just be like a validity proof because in this specific case we're not hiding anything insertion and deletion validity proofs what these mean is that the Merle tree essentially whenever there's a new user so let's say that you download the world app uh you just get verified at the orb like right now you need to get inserted into this set of verified users right so the way that we do this is that instead of inserting one user per transaction we batch them offchain and then we create a zero knowledge proof or
in this case just a validity proof we're not hiding anything so we just create a validity proof or a snark or Stark right so let me just make That explicit it here snark for Stark that we're we're inserting new new public Keys into the tree so new nodes into the tree and this will create a new state of the tree like new root hash in the end so we're using Zer knowledge proofs or validity proofs in this case for creating proofs of insertion and deletion so if you let's say want to delete your world ID you can also request deletion or if you let's say want to rotate your public key and get a new one you can also do that using World reset so this is like why we also use snarks or Starks in SEMA for like in our
deployment of sema4 traditional sema4 doesn't have this but World ID since we have so many transactions like we have 6.6 million users I believe right now or over that so there's a lot of users that are getting signed up so if you do one transaction one User it's too much it's too expensive so we badge them in batches of 1,200 users at a time currently also using valeters for that right and so this merco tree as I'm showing here it's deployed on ethereum I can also share you links to the documentation if you actually want to look at the actual smart contract after I finish I just want to make sure that we get to the end Before Time runs out so this merco tree lives in ethereum and the root of the tree is the only
state only public state that you need in order to verify a Zer knowledge inclusion proof so if I have a a semap for smart contract or a world ID smart contract as long as I have a semaphor contract that works the same but I have the latest root of the tree I can always in create inclusion proofs against the latest state of the tree right so if let's say Brian just gets a world ID uh and he is just now inserted into the tree he's not able to create an inclusion proof until I update the state of the tree with a leaf which contains his public key which now he'll be able to create a semaphor inclusion proof against the latest state um so as long as I have the latest root of the tree on any network so it doesn't
have to be just ethereum I'm able to verify World ID proofs so for example the way that world ID is mostly used right now is for claiming grants like worldcoin token grants and this is like where you're using zk4 right you're proving that you're a unique user and that you've not claimed this bi-weekly or now it's monthly Grant so you're creating a semafor proof and this semafor proof is currently verified on optimism and soon it will be deployed on world chain which I just see that ago also asked the question before I missed are you guys working on your own L2 so yes we are and the next presentation is going to be about that it's going to be about world chain and the op stack and what that is so that is going to be the
next topic I forget which date but it's gonna be soon I think it's Monday maybe I'm not sure I have to double check cool hopefully all of this is clear sorry if I'm going a little bit fast but we're racing against against time here so if you have any questions feel free to leave it in the chat I'm always available even after this so if you have any like specific things you don't understand or you want to go deeper or you want to get a specific fact just let me know and I can answer that for you a bit later right so we can go back to slideshow mode so it's more full screen cool so when it comes to Identity protocols or projects worldcoin is one of them but when it comes to
Identity protocols there's a lot of new innovations that have been happening that are purely enabled by Technologies like zero knowledge cryptography um so I want to introduce some of the concepts here uh this is a distillation of one of my articles I wrote uh let me just post the article right here if you want to learn more about that specifically um which goes in depth into like modern digital identity schemes this is just a small slide that is distilled from that and it's part of what we do at worldcoin um so yeah so to introduce this concept um there is a notion of in order to make a proof about some
identity right like I want to like right now in worldcoin in World ID you're proving that you're a unique human right so you're making a proof about yourself in some capacity but essentially you have some Providence right like how are you improving inclusion where the Providence is that world coin and tools for Humanity and the foundation and eventually many other parties are creating or curating this miracle tree of verified humans by using the orb right so this is the origin of Providence like the origin of Truth the orb this Hardware device is the thing that provides the truth of what a human is and what a human is not right in this case like if you're not in the world ID tree then you can not use the fact that
you're in the tree right like you just cannot make a proof about that you're just not in the tree so if the orb is the Arbiter is like the source of Truth in this case of what a human is in the world ID protocol so this is the data origin or Providence so there's many different types of data in the world like you have a lot of different data like Digital Data about you and it lives in different places right you may have interacted with ethereum you've done a transaction some sometime you may have swapped a token for another token you may have done I don't know bought an nft like all of that in the end turns into data on the ethereum database right so every single ethereum node will store that
data and so now you're able to create a miracle proof that your specific data is included in the theor miracle tree and you can prove to anyone that you've done this transaction because you can also sign a message and you can prove that you own address for example so this is like the notion of Providence in this case there there's other data besides onchain data and World ID of course right there's kyc data for example there's things like passports right so there's information that storing your passport your identity card there's things like your web data right so maybe you have the Facebook account maybe you have a Google account maybe you've interacted with YouTube or with the video game or or whatever uh there's some data that you've created maybe if you're playing a game the state of the
game is some data also right maybe you have some credentials right so maybe you've completed University right like you've graduated from Stanford from computer science that is a credential that is issued to you it can be issued by virtually anyone right like my doctor can issue that I'm sick so that I can go to work and with that credential if I send this credential from my doctor I can stay home and I can get my sick benefits or I can just have a day off or whatever there's email data I receive an email all of these things are data that I that has some Providence and in mod using modern day cryptography you're able to prove the Providence of that data so I'm able to prove that this
comes from a website this comes from the chain like the ethereum this comes from a credential those was issued by Stanford whatever the way that this is constructed is using digital signatures and the sort of trust that I'm putting is the Trust on the issuer right so if let's say that Stanford has their private key compromised then someone else and attacker can create invalid proofs of having completed Stanford and then somebody else like a company can be fooled by this signature because it's a valid signature from the V valid registry but is somehow slipped through right so your the root of trust or the Providence root is a digital signature or root of or or like chain of signatures right like a signature can
sign a hash of a of some data and then like you have some root right you can keep verifying these chains of signatures all the way to some issuing authority the end and this is how a lot of the internet works also with things like DNS records like uber.com is tied to some IP address and there's some root Authority that has some credentials that are signed and this is a really important critical infrastructure of the internet uh and also there's things like Merle tree inclusion proofs that we've seen before right for example semop for this is a Merle tree inclusion proof it's just private because it uses Jour cryptography so now that we have this notion of what data is and how you can prove Providence you can start making statements about it right you can start
making these so-called attestations or verifiable attestations because now that we have things like zero knowledge cryptography or maybe you've heard MPC for from a previous talk or maybe you've heard of trusted execution environments or tees from the orb side for example there's essentially a lot of different technologies that allow you to make statements about the data I can do a zero knowledge proof like I did with semaphor that I'm part of the tree without revealing who I am that is an attestation I I have some data the semaphor tree and I'm proving that I'm part of the tree without revealing who I am that's like programmable cryptography tool that I can do it's an attestation I'm a unique human and I've not done this action before it's an attestation
and so now that we have lots of different data and lots of different ways of verifying that the data comes from somewhere we're able to do these more elaborate attestations right so I can prove that I'm a unique human then I can maybe take my my my passport and I can create a zero knowledge proof of my passport I can create a proof that I'm over 18 and that I maybe I'm a citizen of some country like in my case is the Czech Republic and then I'm a unique verified Human by World ID and maybe I don't know my score on chess.com my ELO is over something I have a profile on Twitter or X that has more than x followers you can start making these outstations and combining them together and this is what I believe that like modern identity
rails will be built upon because they're just much much better than current systems the reason why current systems don't work the way they do is that everyone has siloed data and not only is it siloed but it's custody by the the third party it's not custody by the user right like my data is owned by Google meta like all these companies Amazon whatever and they own my data for me and then they're able to reason about the data themselves so they're able to tell that I'm unique human because I I'm I'm paying for five different service services and I've had the account for nine years and has been active for n years whatever so these things are what create your digital identity today and that's why they're able to reason about it today and the root of trust is the
fact that you've interacted with a system in a way that looks human but this really breaks down in modern day and age because you have ai right AI is able to act like a human write things that a human would write do things and act interact with applications the way a human would and so this is like what is breaking the internet right now and why World ID is important for one but it's not just about world ID just in general about creating digital identity tooling that is privacy preserving it's composable and it's much much better and Trust minimizing right I'm just creating mathematical statements about data in a way that anybody can verify and it's secure and safe because of the mathematical properties of these cryptographical constructions and I don't have to trust
some Google party or some third party that is verifying some data or whatever and they're also having a really hard time because of AI so this is like why I believe these things are important why I think you should believe that these things are important and why it's even worthwhile learning about these things so yeah now that we have this notion of identity attestations data Providence and all sorts of different things as I mentioned they can be composed like they can be combined I use this analogy of Legos and defi maybe you've thought of money Legos I can borrow from a and put some provide some like collateral to some other lending protocol and then I can B against that and I can provide liquidity on Unis Swap
and then I can put that into a yield aggregator whatever there's these Legos that you can compose because it's ethereum right everything is in the same thing in the same system and it inter interact with one another so the same thing happens here I can use my world ID and then I can use my ethereum atation service or my gitcoin passport I can combine that with some other product like whatever and I can make statements about all sorts of different things and this is the thing that is cool about this or what what I believe that modern or if we fast forward one or two years what digital identity systems will look like um uh assuming that we continue at a similar Pace that we are right now um just to mention some names of some teams that are building some of
these things uh for for web proofs there's te like the ones I mentioned same for proof of passport storage proofs uh proof proofs of email and various others U teams that are building programmable cryptography tooling besides worldcoin yeah and a lot of them are grantees for example from the world coin Foundation we gave a grant to raro to open passport to axium Herodotus zkl in the works and we've worked to some extent with some of the others here yeah so this gets me into what are the current challenges that worldcoin is experiencing right like now that you see what Zer knowledge cryptography is more or less now that you see what we do with Zer knowledge
cryptography with semor and some of the other things like zkl with modulus or NPC with tcio or a few other things that we've been doing I want to introduce to you like what are the problems that we work on like why is this even a thing like we can just be done with it and move on right there's something else you can do we can work on but yeah there's a few constraints that world quein has also Brian I'll I'll get to your questions in a little bit um there's a few problems that worldcoin has that are unique to the problems that we have we're like these problems are unique to worldcoin because of the scale and the solutions that we have so for one uh the zero knowledge CS that we create are
created on users phones or by users because the users have their private key right and since users have the private key right the private key meaning the private key that belongs to a public key in the semop for tree and since I mentioned before the prover needs to have completeness meaning the prover needs to know the witness and if the witness has a private key the prover needs to be the phone of the user because only the phone of the user has the knowledge of the private key so the only way that we can create a Zer knowledge proof in this case is if we create a Zer knowledge proof on users phones so this this has a a set of um like not so great outcomes mostly because um these un knowledge
proofs are very intensive it's a lot more computationally intensive to create a proof than to just do the computation right so as I mentioned before there's this notion of sness so sness means that it's a lot easier to verify a proof than to just do the computation right so the verifier just verifies a proof and they're done it's quite cheap and easy and the thing that is hard is creating the proof right so creating the proof is the opposite of suin it's a lot harder to create a Zer knowledge proof about some statements or some computation than just doing the computation right so you're essentially the property of Zer knowledge proofs is that you're offloading work onto the
prover so that the verifier doesn't have to do barely any work and this is really useful because you can then create these systems in blockchains for example instead of having everyone have to verify the same computation just one computer in the blockchain does it and then everybody else just verifies this is like the good property and distributed systems for example that make zero knowledge proes really appealing same for us but this problem is that now you're having to do something that is really expensive on a device that is not performant at all it's a phone and since we have like millions and millions of users in different markets around the world phones are unevenly distributed right if you go to the Bay Area everyone has the latest iPhone in San Francisco in the US
everyone has the latest iPhone they have neuro engine cores with gpus and fast GPU state-of-the-art CPU lots of gigs of RAM 12 16 gigs of RAM to work with so it's really performing really fast but if you go to some other places then you can maybe have a phone that only has two gigs of RAM right or maybe it has only a CPU that only has two cores so you cannot paralyze computation across multiple cores or even they're running on Old architecture so some of the libraries break and other things right so essentially this means that there's a lot of client side proving client side just means that it's happening on the phone as opposed to on a server you cannot do it on a
server because otherwise you'd leak private information from the user like the private key which you don't want if you want privacy you have to do client side proving and so this is like why we're working on things like client side proving then there is another concept which I mentioned right after which is delegated proving uh delegated proving is essentially us using multi-party computation which is the thing that Lucas talked about briefly in the NPC talk you're able to delegate work from the client to a server without losing this privacy but then there are some other types of overhead like networking overhead right you now how now have to talk over the network and this might create some bottle NE because if the user wants to delegate a proof to a
server they might still have to have a good internet connection and some people don't even not only don't they have a a bad phone but they also have a bad internet connection so delegate approving might also not be an option so there's just a lot of different constraints that directly stem from the fact that we have lots of users that are uh distributed across the world and some of them have different devices that they're working with and so if you want to be inclusive and support as many users as possible you have to directly work on these things to make them better and it's not even about this right let's say that sema4 is fairly cheap to do it's a really small Z knowledge proof the size of the the thing that you're making proof s is fairly small this is called a Zer circuit the circuit of
semap for is quite small U but if you want to do things like proof of passport or proof of uh whatever like a storage proof or anything else like web proofs these other circuits other applications that use zge cryptography are much much bigger so it will take a lot longer and it's much more computationally intensive to do those so even if you have a good phone it's some of some things on good phones are in feasible so let alone on bad phones so this is like one of the things that we're working on another thing is that we're creating millions and millions of proofs and these proofs have to be verified somewhere and in our case we're verifying them on optimism in soon World chain and so these proofs create so much demand but that at one point we were about like 60% of optimism
main net so 60% of a blockchain means that you're consuming 60% of the traffic or of the capacity of the network so even if you had more proofs if you had more users the network would be literally unable to process those transaction actions because it's full like it's not able to process more not able to verify more proofs so we're working with other teams like nebra axium and sator through World quein Foundation grants to do proof aggregation so essentially instead of verifying one proof you verify like 10 in one or 100 in one or 200 in one uh and so that reduces the onchain footprint by by a lot very substantially or you can do the opposite instead of um submitting less proofs to the chain you can just make the chain bigger right so
you can verify more proofs and this is like the the thing that I'm going to be talking about next with World chain and the op stack and yeah there's all the things I mentioned like zkl with modulus also really computationally intensive a really hard computation to do and as Daniel and Ryan mentioned we have less than one gigabyte to work with for the Target Benchmark and so it's a hard problem and yeah like all of these things that we're building whether it's the MPC stuff the ZK stuff all these things are creating new problems that are pushing the boundaries of what is possible today with the technology that is out there right with the existing phones that are out there with the existing zero knowledge proving libraries and toolkits with the existing Hardware with everything that we have some of the things that we're
trying to do are not possible they're literally not possible so they create challenges and you need to solve these challenges so this is briefly I wanted to touch upon I will go through my last slide and try and answer all your questions if I can so yeah just to summarize everything some most of these things have already discussed in previous slides but I just want to reiterate some of the current R&D directions that we're thinking about currently so that people that are maybe watching later or maybe in the future if maybe you guys are watching it right now on live but if somebody else wants to watch the video later just so that they can have some easy way to just coming back to this so they can think of what
we're doing at this time so they can maybe talk to us about maybe working on some of these things so current R&D directions we are working as I mentioned on better client side proving so that you're able to do bigger proofs on the same device or at least make proofs that were infeasible in some really bad device bad phone old phone I'll make them feasible right so there is two main research directions these are like technical namings but essentially there's a proving system called Spartan which was quite promising right now we're benchmarking how promising that and there's potentially better options than this but so this is like one side Direction within client and improving
and the other one is based F by plus fry so for those of you who are not versed in ZK literature which I assume is most of you or everyone these are just names of different ZK constructions so you can ignore but it's like things that we're working on uh another one is research on delegated proving so as I mentioned you can do ZK proving instead of on the client on the server but using MPC so you don't lose privacy however you have some like networking overhead and some communication overhead uh and some other problems that you need to solve so we're working on that with Firma um there's also work on proof agregation so that we reduce the onent footprint of all the Zer proofs we create using nebra axim and story all three of them are grantees
from the world foundation so they've already delivered like nebra and aium have delivered their Grant auor is still working on it there's like a bunch of different things that will come out of it hopefully some of them will get to production in the coming months and yeah I mentioned also all the identity stuff that exists outside of world ID outside of proof of personhood right there's proof of passport we gave a grant to open passport to work on this there's zkl which is done by the ZK email team or proof that email Team web proofs storage proofs zkm essentially a lot of these different identity exploration routes that we're just exploring ourselves to see what makes sense what is feasible today technologically what can you turn into a product because like
once something is feasible to be done for lots of people you can make a product out of it right you can do something useful and actually distribute and make something that impacts the lives of people out there then we're working on the zkl stuff with modulus and the MPC stuff with tasio and inverse Tex so for the last two you can watch the previous talk from them and for the ones I mentioned above I've talked to them to some extent in the previous slides as well so hopefully that is enough context all right so that should be most of what I wanted to cover uh today I will answer questions from Brian because there are several of them and there's there's also some questions in the
question tab on the right okay okay I see I see I see cool so I'll answer first in the chat and then I'll go to the questions tab really quickly so what do what cryptographic methods do semap for and worldcoin employ how do they compare so semaphor let me stop streaming this um let me go over here so I I'll just type them out in the chat really quickly so semaphor uses a toolkit called circom to write circuits or circuits uh the type of cryptography that is using underneath it's a proving system called graph
16 and so if you want to look at how that actually all works is there is a good video on YouTube um that I created with a podcast team called the bite code so I'll send you the episode to that I just do a technical walkthrough of all of the technology that that we have an actual code so if you're curious more about the details of how sema4 is implemented and things that we do you can watch this video I just shared you can just search on DC Builder worldcoin the bite code on YouTube for those who are listening yeah so so it uses grass 16 and circom for semor and for the Merkel tree batch uh inserts and deletions we
use gnark uh a different toolkit but also grass 16 is the same thing how could semaphor be used to enable an anonymous transaction with the world ecosystem it will it will not it just won't seor is not designed to do that there's been existing systems who do that most notably is tornado cache however that one was labeled by ofac as something not to interact with so it's a very complex legal topic you can search about it it's quite interesting to learn about there's other systems that are trying to build uh ZK privacy for transactions you can use things like penumbra or py
pay there's bunch of other tools there's rail gun essentially there's a bunch of other tools is not ZK privacy for transactions is not a problem we're trying to solve there's a lot of other teams that are specifically dedicated to solving these problems what real world applications could benefit from the integration of semop for and world queen Technologies how does semop for and worlden address user privacy and data security independently use cases you can watch the previous video uh about world IDE use cases with Ian how do semaphor and World Canin address user privacy and data security independently for the cryptography part you see how we address it here like with the SEMA for ZK proof you're not
revealing who you are in the trade uh that is one part if you want to see the biometric side what is the biometric talk if you want to see how the orb Works watch the orb talk so yeah those are like those address privacy in their own specific connotations and if you connect them together you achieve essentially the state-of-the-art of privacy when it comes to digital ID using World ID is the most secure I'm I'm very confident about this is the most secure more scalable uh most privacy preserving digital identity protocol that I've seen out there by far uh it's really ambitious and I'm really proud of what we've built nine what potential vulnerabilities could com could could arise from combining semor and worldcoin systems so semor and worldcoin World ID
is using sema4 so it's one and the same in this case Al I'll just break it down to that the problems with sema4 I guess the only problem with semaphor is that is using a hash function called posidon if you're like doing the security analysis if anyone is able to break elliptic curve cryptography which people are speculating because you have quantum computers whatnot um this might be a potential vulnerability but it's inconclusive if this is realistically feasible because of how hard it is to make quantum computers but other than that there's no other real vulnerabilities um unless there's a bug in the implement mentation of it like that's like logic bug more than a cryptography or system design bug then there is
potentially if someone leaks their private key then you can see the nullifier hashes that private key is ever created so you can de anonymize someone if you extract their private key somehow so that is more of like a device security if someone steals your phone and extracts the private key they're able to De anonymize some World ID actions that are on chain so that's another one but it's not real vulnerability it's just if someone misuses the system or if someone does something wrong um I want to know about this too please what are the key advantages and potential drawbox using joural proof for verification supposed to traditional so drawbox is that is less performant right it's computationally
intensive and the benefits is privacy preserving right self- Sovereign you own your own data your private you have your privacy it's inclusive so anybody can use it it's not gated it's mostly benefits it's just I would say it's all benefits to use EK in modern digital systems the problem why everybody doesn't use it today because all first of all all economic models for how these startups are sustained like why do you think Google makes any money why do you think maida makes any money why do you think Amazon makes any money because they have your data it's literally that 60% of Google revenue is ADD placement so if they know data about you they can do better ads therefore they make more money that's the reason why they're not using
ZK can I get your email I don't really use email that much besides for work so if you want to DM me just send me a t message I just sent you my link cool and yeah that's like the drawbox let me go to the questions tab really quickly how is it possible to use ZK to prove someone is not within a sanction list or a politically sensitive person for the purpose of KL great question this is actually something that exists there is a fork of semor sorry a fork of for example tornado cach which allows you to do this I forget the name of it but let me actually search for it really quickly privacy pools so for example
privacy pools let me write it out privacy pools so this protocol is a fork of TR cache which at the end of TR cache when you're withdrawing a note or claiming note part of the withdra with drawing a note proof is the fact that you have to prove that you're not in the ofac sanction list uh and that whatever like you're not a person that is sanctioned by the US you can still interact with the protocol whatever so this is like a version of this protocol that might for example make it more compliant in practice currently it's not but these are sort of things that you can use ekk4 like you're proving exclusion instead of proving inclusion you're proving
exclusion so you're proving that you're not part of the set of of sanctioned people or politically sensitive or whatever it's virtually as simple as doing inclusion you're just proving you're not in the set as you just negate inclusion so it's it's fairly straightforward how does world could Implement Pro membership how is semor used in this context I think I addressed that one quite extensively if you want to see more details about semaphore you can go to this link semap for. pc. Dev let me just check yeah it still works great they still using that domain otherwise I think I explained it fly at length during this talk how many RS codes is a person supposed to generate using the orb so only two one per one per Iris right or one per I if
you will and what is the timeline for this process so you go to the orb you like the orb verifies that you're unique person then it states a high resolution image of both irc's it's able to compute the IRS code within the orb and then deletes the original images and it just sends the IRS codes to this MPC setup and with that you're able to do uniqueness checks against all the other IRS codes in a completely private fashion privacy preserving because the MPC setup doesn't reveal the actual IRS codes it just does these linear secret share scheme of checks you should watch the MPC I'll talk for that how many hour could a person as the same question I asked this in relation to understanding proof of concept okay addresses it I
think what is the purpose of orb rescanning how does your know proof enable users through self cust updat without need to return VI or users can update their data locally so that is something that is mostly in the works for the second thing that you've updated you mentioned orb rescanning is a thing that if let's say you lose your phone you lose access to your world ID you can still go to the orb again the orb will create an IRS code which will match an IRS code that is already in the database so what you can do is you can just delete the public key that is associated with that linear secret shared Iris code and insert a new one for that Iris code so that's how you're able to do like reset you're able
to reset completely from losing your world ID as a feature that is in the works it's not yet yeah this is something you could do it's part of like World ID 2.0 road map for that yeah and the self custody part so once you have zkl you would be able to do self custody because you could instead of the or having to do this Iris code generation in the orb you can just store the image of your Biometrics on your phone encrypt it and then just locally create a Zer knowledge proof of the creation of the IRS code and permissionless insert yourself into the MPC set of verified users after undergoing the uniqueness check so that is something that we're also working on it's it's mostly dependent on zkl
becoming feasible and some improvements on the MPC stuff it's it's a current R&D direction as well cool I think that does it unless there's another oh last question and formal question everyone asks for phone numbers these days whatever how do I find a ZK proof for it without ring phone number without using ecash whatever pay with phone number 222 yeah that's a simple thing to do the way that people do it right nowadays for example for Signal you no longer need your phone number you can just have a username so you can just share a random username it can be whatever and people can discover your contact is fairly good for that uh for payments the way that current payment
systems work uh you really need the card number or whatever when it comes to these ZK Solutions like pay or whatever as long as you have a public address you can send money to that public address without anyone seeing it or you don't know where it came from you don't know who you're sending it to but yeah you can use ZK for that like all these Solutions I mentioned about like pay penumbra real gun have some way of out skating pay payments however in the real world you really do need some form of compliance if there is a business sending $100 million to another business it's not something that regulars will like if it's private and they don't have any visibility for it because of accounting because of taxes because of other things so these systems might still need to be engineered so
that you're still complying with the legal system even you still have privacy the ideal is you have privacy for every virtual use you want but you can at least uh still be compliant and z enables both things you can selectively disclose things to proof for example I can say the money I'm sending has been taxed uh and if you create a proof of that then you can send it to whomever in a private way and nobody cares right or maybe you have to also send it to someone who is not sanctioned right so that you also prove that you're not sending it to someone who you can send it to legally yeah these are like all sorts of things that are up up to debate for people to to explain and to build on but like in the next one two three years you'll see this
awesome cool so I think that's that's it and I'll get ready for the next presentation on op stack and World chain coming I think next week great sounds good thank you for this amazing presentation thank you everyone for being so active in the chat um and see you next week see you thereat take care guys bye bye bye bye [Music]
Related talks
- Beyond the Johnson Bound: A Path to Smaller Post-Quantum SNARKs
- Zcash
- Zero knowledge протоколы и решаемые ими задачи • Сергей Прилуцкий
- Fundamentals of Zero-Knowledge Proofs Full Course
- Современные системы доказательств: STARKs, SHARKs и другие • Александр Власов
- Metadata Kills People
- Эволюция рекурсивных снарков
- We Built the Wrong Internet
- Intro to MPC, Garbled Circuit and mpz -- ZK Jumpstart Series #1
