Encode x Worldcoin Educate Series: ZKML & MPC Uniqueness Checks
Encode x Worldcoin Educate Series 2024 · 3 Sept 2024 · 1:05:04
A two-part session on protecting biometric data in World ID. Daniel and Ryan of Modulus Labs explain zero-knowledge machine learning, which would let a phone prove that an iris code was computed honestly without sending the raw image anywhere, and the proving cost and memory limits involved. Lucas of TACEO then introduces multi-party computation, secret sharing and the challenges of running global iris uniqueness checks across several servers, followed by audience questions.
Topics
From Encode x Worldcoin Educate Series 2024, hosted by Encode.
Transcript
hi everybody welcome back to Workshop number three in the world coin educate Series today we have a different session we have a Duo session with two talks the first one is on zkl and the second one is on MPC uh unique CL checks so we're going to start off with modulus Labs with Janel and Ryan alrighty thank you Rebecca um hi everybody it's good to be with all of y'all uh so Ryan and I are the co-founders of a little company called modulus labs and uh we had a great pleasure working with the worldcoin team on some uh new features new upgrades to the protocol and in particular on the Privacy side um I'll
do like a quick maybe 10- minute uh crash course high level and then Ryan will wibo out kind of some of the some of the fun details uh for us to s parant proverbially yeah yeah excellent all right well as you can see the title of the presentation is zml hands off my eyeballs um which is a little bit uh intense but hopefully you know it captures your attention at least here in the in San Francisco it's it's really early in the morning so uh with that said the subtitle maybe more appropriately is how we're going to try to make worldcoin after one of the world's most privacy preserving identity servers Serv which would be very cool awesome okay so this very quick
crash Force high level is organized around problems uh here are all the problems uh you know we we got privacy trust ZK and of course uh Ryan and I and our personal problems um but we're gonna start with the Privacy stuff uh and I think what we're going to do is save questions maybe to the end in part because I can't see your chat uh but Ryan if there's anything really urgent or pressing you're just gonna let me know yeah yeah I'm on it awesome okay um I'm very sophisticated so I have some really cool graphics and some really cool animations ready for you so stick with me through this on one side you have the user that's us and our eyeballs specifically the data concerning our iris images right so those are the raw images of our Iris very sensitive that's
why it's in red on the other side I have a building representing a server or a massive computer and a little robot here which repres represents an algorithm so in very brief this is actually meant to kind of depict the current flow or the current uh uh strategy for how worldcoin basically verifies uh a new user right that you are a unique human and that there's no duplicates in the existing database very straightforward the orb takes an image of your eyes it does some analysis um you know it then sends that you know Iris code to the server where an algorithm verifies that you know everything looks good you are a unique human this IRS code doesn't match any of the existing entries in the database uh
everyone's happy except not everybody's Happ right um and I'm just going to skip straight to kind of what youall already know which is the problem with this situation you know there's headlines about this at tldr uh folks are understandably very sensitive about biometric information in particular Iris data uh the government uh users in general even worldcoin doesn't really want to hold this information right it's very sensitive again um and we want to find a way to basically reduce maximally the footprint of these biometric uh kind of pieces of information uh within the kind of worldcoin Corpus right this is both obviously for privacy reasons privacy is
a good but also uh from a compliance standpoint uh as well as just uh the virtues of kind of decentralization and like having a robust service that is uh you know defensible against that actors so let's talk about Solutions uh this is kind of maybe a little bit obvious to a lot of you but maybe a first step we can take is basically to just have the data the biometric information stay with the user right so you know the in the parlance of uh the the industry we occupy it's called self- custody so the user holds on to the data say in their mobile phone right so that raw image of your iris where the RS code doesn't get transmitted to a centralized server somewhere that would be an awesome start
okay so that's the first problem solve we just fixed privacy congrats to all of us high is all around uh we keep the data with the user the problem that this AR or gives rise to however uh is around trust and we're going to get to exactly how in just one moment all right so now the data is with the user um uh the algorithm the verifying servers they're on the other side um and what we're actually going to do we sorry excuse me the problem with this is that of course uh the user uh who ho self- hosts the data uh can do the analysis maybe on their local device and just send the result hey you know worldcoin I've checked that my Iris code that raw image gives me the uh uh the right results uh
you can take my word for it I'm a unique human right and the problem with this situation again super obvious is that when you do this you you open yourself up to these like incredible attack vectors where the user can you know now that they host their own data and they have the their hands on the algorithm uh they can craft pretty sophisticated and sometimes not even that sophisticated attacks so in this case you can actually see uh this is something that's created by one of the folks on our team uh we're kind of adversar trying to attack the worldcoin algorithm to basically generate unique identities based off of the same raw Iris image by just perturbing the image in very specific ways this took Ben probably like less than an hour and suddenly we break the
whole simple promise of the world coin protocol which is pretty devastate so that's a problem as well yeah okay so the solution to that problem uh is hopefully uh relatively obvious if you've been in the the space anyways uh it's ZK snarks uh basically we are going to uh protect that computation right the analysis of the raw image even though it's happening on an untrusted device such as the user's uh mobile phone right so we're going to get into exactly how that works in just one moment all right third problem ZK versus so in part because I can't see yall's faces I'm not sure what the general background of the folks here is um I'm not super confident how well folks know
xer cryptography which is zkps um but the good news is that I think DC Builder from worldcoin Foundation actually has a specific section about zps later in the series so for the sake of our work on zkl we're just going to give you the again super high level um and then we can leave the the protein for DC next week I think okay so to radically simplify all that a zero knowledge proof basically says is that a specific computation happened and it got a specific result um which I know sounds probably not very convincing but we can add a little more kind of specificity to it right so especially in our case this particular
AI model right uh in this case the iris code algorithm uh inference or kind of mated termination of without tampering meaning without any manipulation from user or from an attacker and resulted in this specific output right uh so in other words it's a promise that a very specific process took place uh without outside influence cool oh and and this is really key this is uh especially relevant to the zero knowledge aspect uh basically you don't actually have to learn anything about the input data on the verifier side right so the server does actually learn a ton about the input image the iris image despite the fact that it's now convinced to a really high
degree of confidence that the process by which the iris post was derived uh did not have any manipulation awesome cool so just to Mush it together one last time all those small complications zero knowledge machine learning zml on the edge the edge in this case being the user's uh mobile devices means that a particular algorithm was run over the Iris image and resulted in a particular Iris code and most importantly all while guaranteeing that there was no manipulation by the end user and without leaking the users's raw Iris image right their sensitive Biometrics so that is the you know in I guess a sentence and a half promise that zml is hoping to make on behalf uh of the
user cool so just go through again uh your raw Iris image never gets transmitted over a network of any kind the algorithm which analyzes that raw Iris image now comes to your phone and we prove in ZK this entire process on the user's device uh to basically guarantee to the uh you know the service providing Authority World coin in this case that in fact the user has not attacked this Pipeline and that they are hopefully a unique human uh that's worthy of the the you know the world coin protocol right so uh winners all around right this is a win obviously for user data privacy it's a win for continuing to ensure a really high
degree of Integrity for worldcoin in terms of uh authenticating the identity and and finally it's great ux in that hopefully this whole process is invisible to the user it's just happening in the background somewhere um and you know everyone gets better security uh while uh uh uh maintaining privacy all right one last thing to kind of add here before we dive into the pro team Daniel oryan versus AI here's Daniel Ryan uh we're folks building this stuff along with the rest of our team of course um what's our problem of course uh with this whole situation this sounds wonderful why is it that there is an issue here well it basically comes down to um kind of the traditional setting for running uh zero knowledge
cryptography right which is you get a really powerful computer which generate these like very sophisticated zero knowledge proofs and then you can send it somewhere to be verified very easily uh as you may have noticed in the very sophisticated PCT tal diagram uh in this case the device which is generating this sophisticated zero knowledge proof are often times 32bit Android phones and develing economies right so not big chunky powerful AWS server uh which is tricky um because ZK is again a very ex expensive computational process right so the kind of TLD D here is that we need a step change Improvement in ZK performance to actually be able to
provide zkl uh you know at scale so really really quickly just to put some numbers to it uh kind of the uh generic you know overhead that you can expect right so if you wanted to prove any AI kind of result using some of the ZK uh software that's out there in the open source world uh the overhead you should expect is probably on the order of 100 300,000 x right so let's say that it takes one second for us to prove that um uh you know uh or or to derive your iris code from that raw Iris image on your phone well it's going to take 300,000 seconds approximately uh to prove that operation um I don't know how
much time you all have on your hands but 300,000 seconds is too many SEC probably uh despite that you know we can already build kind of some prototype things at this range which is some of the some of the things we've done in the past U and you can you know go to modulus labs XYZ and you can check those out um the good news is uh by specializing uh which is what we do right ZK specifically for AI operations like the iris code algorithm uh this specialization helps us go a lot faster right so these numbers are actually outdated we're even faster than this by now uh right so that 1 second uh Iris code algorithm now takes maybe 180 seconds and again we're even faster than that now um and that starts to bring us
into the regime where actually we can do this worldcoin Iris Cod upgrade on the user's device um and you know that would be again that win-win win we mentioned before so here are some of the specs that you know we're targeting for this very specific Iris code proving uh uh you know library that we're working on it needs to be less than 5 megabytes it has to have less than you know 30 seconds of proving time and turns out this is the most important bottleneck we can uh go no further than one gigabyte of peak memory consumption so if you look at the installed base of the world app a lot of these devices uh you know top out maybe at one maybe 1.5 gigabytes
of memory uh some of them too um so that gives us basically the footprint that we actually have to run this again very intensive proving process uh so that we can again still reach as many users as possible and get them that really good data privacy and get them that really good ux so are we there yet um we're almost there yet and I think we'll have a lot more to say on this very soon um but maybe just to again illustrate the whole point here by specializing ZK right uh it's like a a bullet train versus a school bus right train only runs on a track it goes in one of two directions while a train is much more flexible or sorry while a bus is much more flexible but in our case uh the trained remainder
the name of our proving system is a lot more efficient and that's how uh we think uh we're going to be able to deliver zml on millions of mobile devices all around the world okay that was a whiz fast crash course in the high level motivation of this very complicated project uh we have simplified uh some things uh maybe to the point of absolute inaccuracy but the Hope here is to give you a a general sense of intuition around exactly uh how we're thinking about tackling this problem why it's worth tackling in the first place uh and why we think it's going to be uh part of the portfolio of advancements which makes World coin protocol one of the most privacy
preserving identity services on the planet um cool okay that's the that's the start I don't know Ryan uh the sounding sense to you uh is is anything I just said new information to you uh and if not um would you be willing to help us syn our teeth into some protein uh no no no I think that was pretty awwesome I wish I seen so many slides beforehand look I worked really hard on those animations and to be fair to you I also hadn't seen those slides until very recently but so fair we're doing good we're doing good you got no that's fair uh I I guess I did want to ask the chatthe audience real quick um I guess
before we get to the whiteboarding iadd session um what questions do you all have for I guess Daniel SL like for us um based on the stuff that you just heard as in this background context is going to be extremely important um it's very important to kind of conceptually understand like why basically this project is happening um so okay I'm take some take some time for take some time for questions okay let's see um so agu asked guidance oh I see um So currently at the moment uh I don't think we have too many external opportunities I think we're working very hard on basically the pro of Technology internally um and uh
yeah but but well I I think we have uh plans to basically in the future like open source and do some educational stuff um yeah but nothing concrete right now um and then I guess Daniel do you want to look at the other questions of course I'm unfortunately gonna skip y'all's names because uh I'm not as worldly as I might appear um I'll just say your initials so da asks uh what could happen in the future if fake irisa becomes available and is used in AI systems great question um so synthetic irisa is a concern because uh under the current construction of the world que protocol all that the service is basically checking is that the iris image which has been scan uh basically has no existing match in their database right
so it's not a very satisfying maybe cryptographic uh answer but the pragmatic answer is the orb itself and I think there's been a hardware where there will be checks for a lot of other things to try to make sure that it's a real living human being in front of it you know temperature uh the consistency between the eyes uh you know they're trying to get you know age verification uh with the local operator with the orb things like that so not a very um again cryptographic uh solution but maybe a very functional one uh Ryan do you want to take two absolutely uh so if World ID were to be hacked and implemented into robots in the future what solutions could address this issue I see okay okay I I please
correct me if I'm wrong but um it sounds like the idea is that um effectively you could have like high agents or robots that are able to receive World IDs um so I think the whole point of the orbb and all of the kind of sophisticated um I guess like stuff that they have on the orb so I think they have have like liveness detection for example um they even test against like various I think like animals if I'm not mistaken um make sure that people aren't putting like their cats up for example also they scan both of your eyeballs and they do the match I'm pretty sure so that you can't for example do your left eye with your friend's right eye with your friend's
left eye with your right eye with your like that way you can't do all those like different permutations like it's got to be like one right um and so uh I think basically it all relies on the hardware as in like as long as the hardware is trusted as Daniel was saying then everything is good right then the system can't break but I think definitely if there were an attack Vector where you could issue uh World IDs basically with authentication biometric authentication to robots oh yeah that wouldd be pretty bad like uh yeah definitely uh definitely would be pre- bad to address that from within the protocol um all maybe let's do two more questions rapid round um but but just to wrap up with da this is a good question
on three how does your knowledge proof work compared to proof of ownership um you know I guess we would say that they're complimentary right proof of ownership is like um maybe maybe it's a feature right like oh I want to prove that um I guess you know either I I own some asset or maybe like I I have a US passport where I'm a certain age uh but maybe uh those attributes that you want to show are kind of sensitive right and particular in terms of their association with your identity uh maybe you don't want to prove uh that you specifically are 22 years old or 33 you just want to show that you're over 18 you know there's kind of like an information abstraction layer uh that is most friendly to both uh privacy your
personal privacy and still uh maximally expressive for the services you want to access so zero knowledge prove uh proves are basically a a bundle of techniques that hopefully can get you that right level of abstra action right convincing the person who needs convincing that you're of age that you own a specific asset um that you know you're from a specific Nation but without actually showing your passport uh image or showing your ID information or showing your like onchain address you know things like that so uh we think of them as complimentary Technologies or or features and Technologies um and I think bcoin ought to be one of the most kind of uh one of the largest projects that's actively advancing this form of um kind
of like privacy T yeah yeahh okay and then uh yeah we can just try and speed around these so uh D asks what if the phone doesn't have the capability deal with ir stud that a really good question uh tldr the probably the uh user will have to go back to an orb basically um to perform basically an upgrade um and then Paul asks uh when ZK snarks get more efficient be R phones was that mean no orb required uh so there is an orb uh the orb is always required as in the orb needs to be there to take a picture um and people can verify themselves in the sense that uh for example if you want to recompute the iris code algorithm in the case of an upgrade um then you can do
that directly on your phone without having to go back to an so that is kind of like the superpower of like keeping basically the data on your phone while still proving that you're running the correct process um cool cool cool and then uh so I think R asks about uh Anis course and unequal people um I think we're not qualified to answer that but I think Tangi who's doing aetric session later might be better qualified to answer this um and then what are the organs aspects of humans uh yeah this is also a Tony question for from from you uh we we definitely do not didn't claim to know anything about Biometrics or biometric identification um but thank you all for the questions and yeah please save those
for tongi um okay cool cool cool so uh with that being said um let's dive into uh maybe a couple of the uh maybe just like interesting sort of little challenges that we've run into um as well as a quick um basically just transition into especially the secret sharing um and why the whole secret sharing NPC stuff um is uh sort of like necessary and and uh thank you Ric uh okay cool so let's just talk about basically the basic setup real quick so um as Daniel kind of showed in the slides there is going to be the orb and in this case I'm just going to draw the orb out this little eyeball looking
thing there is the world clean protocol which I'm going to draw as basically this big b server um to be decentralized obviously but at least for now let's assume that it's just kind of running on a server somewhere and then finally there is the user's mobile device which I'm going to den notey this so in this process um basically when a user signs up for I guess a world ID there is an initial basically assemblage of data so in other words uh you you take a photo of your iris I guess and in this case I'm going to call that Iris image X so X is something which is produced by the orb and X is going to be sent directly to your mobile device so in the case of privacy preserving obviously we don't want to
send uh your iris to the servers right uh and so worldcoin chooses instead to just send it to your mobile device however the orb obviously can also do computation so it's also going to compute what I'm going to call Y 2 and Y2 is going to equal something called X of F2 or sorry sorry sorry sorry F2 of X um and the idea here is that F2 is basically what we call the iris code V2 algorithm so in other words this is the second iteration of basically the RS code algorithm um and the result Y2 is basically this binary looking diagram so Y2 in other words looks like basically an image with all ones and zeros and
this is is kind of your unique sort of quote unquote hash for your iris code so in particular Y2 is going to be the thing which gets sent to the servers while X is going to be the thing which gets sent to the mobile okay um so this is what happens in the kind of initial quote unquote signup process and obviously this is a much simplified version obviously there's a ton of other things happening registration so on and so forth um but this is kind of what's happening with the biometric so now let's say that we have a new Iris code algorithm and this is exactly kind of like the one of the key use cases for zml here but let's say that suddenly uh World coins Biometrics team comes up with an F3 so in other words there's a new algorithm on the Block and in
particular instead of having Y2 stored here so Y2 is currently stored on the surface we instead want Y2 to be X out and we instead want Y3 the new Iris code uh where Y3 is calculated via basically F3 of x where F3 is basically a new Iris code algorithm okay so if we want to do this how are we going to do it uh well I mean the obvious thing right since uh the user is the only person that actually has access to their Biometrics is to say as D was showing in the slides hey user please compute Y3 right please do this computation Y3 equal F3 of X and then
please go ahead and send Y3 to basically the world coin servers um now uh okay so obviously R is in red which means that we don't trust Y3 right um because clearly the user could mess up either the algorithm or the input as in they're under no obligation currently to either run the correct algorithm I.E to have f3b the actual Iris code V3 or to have the input data to that basically algorithm be the correct input data as was given by so these are two pretty fundamental issues right if the user is able to send any Iris code that they want well suddenly the whole system is broken every time the iris code algorithm gets updated you can
effectively create a new world so obviously we don't want this and we're going to have to find ways to kind of like uh constrain the user to only do the right thing um what questions do you all have so far sorry I know this is a lot of notation wa a couple of seconds oh whoops I just realized I'm my whole screen oh D are there any questions I should address not that I've seen and everyone's riveted Ryan keep going you got oh okay that's good okay cool cool so as Daniel was saying and uh this is exactly just kind of like review from the slides uh the first thing that we're going to do is we're going to force the user to provide basically aof so we're
going to force the user to give basically a pi 2 and this is what I'm going to call the zkl proof and basically given Pi 2 as well as what I'm going to call box X which is a commitment to X so so another words uh a commitment to X basically says here is something uh it's not going to reveal anything about the data inside however I can use it to verify that the basically operation that I computed on X was computed on the thing that is inside the box so there's a really good question from Paul here about the directionality of things so
Paul question here is sending Y2 to the servers means World coin can reverse engineer our X question mark ah okay that is an extremely extremely good question um and actually that is precisely the segue into the secret sharing plus MPC stuff but we might fold that question for now if that's okay that is literally the Instinct that I think spawned this entire kind of like uh process for secret tring them um okay cool cool cool so with that being said the tldr is that the user sends over now a ziml proof as well as a commitment to the input of this basically processor function and so when
the server receives Y3 Pi 2 oh sorry this should be Pi 3 my bad my bad so when the server receives Y3 pi3 and X basically it will just verify that Pi 3 is correct with respect to this commitment and now the picture is going to look like the following now the picture looks like Y3 equals and there the reason that I'm putting that in red equals F3 of X so after verifying the zql proof effectively what we know now is that the computation was done correctly so F3 is now in green however there's still one more problem which is that even though the old sent over X which was the user
actual Iris image unfortunately we have no way to verify currently that the x that the user put here or the x that the user put in the Box basically is that X that came from the orb and so this is that because now you can uh basically just take a picture of for example your friend's eyeball and say oh yeah this is definitely my eyeball let me let me basically uh compute the B3 Iris code of this and send this to the servers uh so obviously we don't want this and that is where part two of kind of like this whole challenge comes in which is how do you authenticate the input right like what do you do um I guess actually can folks type in chat any ideas they might have for this I'll give it a sec Al I can't see the chat so yeah I'm going to need your
help again I think folks are are thinking right now but in the meantime Brian I think um I think the the videos are recorded I'm seeing a lot of like live recording flashing ion so um you know I think they will be available later okay um a asks can you repeat the question yes so currently uh basically with the zkl proof pi3 we know that the computation F3 was being done correctly however we don't know that the input that the user fed which is basically
this x thing is indeed the actual Iris image which was uh which was basically taken by the orb as in the user could have put any Iris image that they want to or just any image frankly that they want to there so the question is how can we kind of get rid of this problem folks are thinking probably give it like 15 more seconds uh so a the reason this is a problem is uh basically you know we are asking the users to self- custody right so they're holding on to their own raw IRS images in the future uh whenever they uh worldcoin updates the algorithm users
right now would need to go back to an orbit and redo the whole process right uh what we'd like uh for that upgrade to look like is for it to be invisible for the users right so uh they have the data on their phone already uh for them to just run the algorithm again the new algorithm rather and send the IRS Cod and kind of update the IRS Cod the issue is that if the user is allowed to basically intercept that process let's say they run the app in an an emulator right and they change the data file that the app references to grab that raw Iris image for a slightly different Iris image or an attacked Iris image they can now generate a new identity on the world protocol um so that that's uh you know
it it's existential in fact it breaks the entire promise of the service um but Ryan I wonder if maybe uh did the orb sign something as you know in the beginning can we maybe use that oh wait wait wait just kidding K says X can be signed by the orb and can be sent to the user uh and a says they should have some key to some sort of inverse algorithm which is computationally hard for someone who doesn't have the key that only the user knows and not everybody yeah yep that's it wow yeah yeah hey you must be a cryptographer because yeah that's that's exactly it um yeah absolutely um okay so uh just to recap then uh effectively as a was saying we need a basically guarantee of
authenticity right from X itself or rather from the orb itself and so not only should the orb send the original Iris code which is Y2 over to the servers it should also send s of X comma SK where SK is the secret key of the orb um and and and once it sends the signature over to the servers the second thing uh that basically the servers are going to do when the user sends over basically this commitment sorry I'm actually going to make one small correction the orb is not going to send over sign of xsk it's going to send over sign of box ssk um because the server merely needs to basically verify that the commitment
to X was computed correctly and again all this box stuff is just there for privacy reasons right as in like the Box X does need to be sent to the servers so that the ckl proof can be verified um but in particular we need to sign that thing as opposed to X so uh just a recap um all the server is going to do is it's going to uh basically call verify sign on the box X that the user is sending over the signature from earlier so I'm going to call this sin x and then finally the PK where this is the public key of the orb so uh yeah so for folks who are I guess
less familiar with like signature schemes um the tldr is that in these like asymmetric key quote unquote signature schemes um users have or rather individual parties have a secret key that they can use to sign or to basically create a digital signature um you can almost think of it as like a handwritten signature in some sense um on a piece of data and then uh your associating public key which is something that everyone else knows um is something which can be used to always verify signature if and only if it came from you uh and the nice part about signatures as a was saying is that they're very hard to forge so in other words if for example I have uh my Ryan secret key and Daniel does not have the Ryan secret key it is very very difficult for Daniel to basically Ford a
signature without my secret key such that my public key would actually verify um okay so lots of Jar Jon J Jon lot of lot of words uh TVR is that basically after we verifi the signature now we know that X actually came from more so in other words this process now looks like and finally Y3 can be green so Y3 indeed equals and in this case F3 which was verified by the ZL proof of X where X had its signature verified uh basically via the orb sending over the signature earlier okay so this is kind of like the whole process currently of uh basically how the RS is
generated and in fact the reason that this was kind of interesting in first place I think is because uh if we look at what happened here it meant that uh we had to basically load code on the orb that would literally create this cryptographic commitment to the iris image a and then would sign it um and then also to basically create code to verify the signature later um okay pretty cool stuff so this is kind of like the part one tldr um and then I guess very very quickly or I uh sorry uh yeah very quickly what questions do folks have so uh chess C asks in regards to data custody why is it that when a user
doesn't enable data custody their RS codes get deleted once we have an update to the orb and I think if I'm understanding you correctly um the reason is actually relative with straightforward it's basically this attack Vector where you know you can imagine as soon as the uh orb updates right uh so presumably orb was being updated with like a new algorithm to um translate that raw image into an iris code a suddenly all these raw images that previously used a prior version of the um Iris code algorithm uh would give you a different result uh than what the new algorithm would give you right and so you have this like um you you have this consolidation issue right where you
have to like match old Iris codes to the new Iris codes of the same images would generate it's basically a massive version control issue and you throw in there the issue where uh the user if they have data custody so they're holding on to their images um can now potentially uh mutate that image right and literally create a new identity um so the whole point of having ZK here the whole point having the orb signed that image initially which the servers now check against the upgrade process happening on the users's end device is to make sure that all the vergins line up you don't get duplicate identities uh and you know as an upgrade going forward this just isn't a problem anymore right it's all invisible abstracted away from the user the whole thing just works the
way it's supposed to with zero compromises to privacy um so it's a it's a it's a really good question it's it's very nuanced um but it's also again ex essential right does the service work or not it's very binary yeah um okay cool in interest of time I might just do the last thing very very quickly um okay so earlier uh someone in chat I forget I forget your name I'm so sorry but had basically this uh very very key Insight which is that hey Y2 equals F2 ofx in other words we the orb is Computing that initial Iris code basically um from the iris right and then we're sending this currently at least based on this diagram in the clear
to the world coin servers uh sure it's binary but can't someone kind of like invert and say well okay why don't we just compute x equals question mark F2 inverse of Y2 so uh luckily this is not quite possible um as in there are many many many many different iris images um that can actually correspond to very similar Iris codes and so it's not quite possible to directly invert this function however it is true that Y2 leaks quite a bit of data about your iris code and when it comes to B metrics obviously we want to leak uh truly as little information if not non as possible and so basically uh there will be a new setup in which there's still
the orb and there's still the user's mobile device but now rather than having a single server there are now three or more servers all of which are kind of connected to each other and Each of which are operated by uh basically independent parties and so now uh the orb of course is still going to take the iris image X and it's still going to take Y2 which equals f2x however instead of just directly sending Y2 to everyone instead it's going to create what we call secret shares of Y2 so in other words it's going to generate y21 y22 and y23 such that in the simplest case and this is not literally what happens but in the
simplest case you have that y21 plus y22 plus y23 equals Y2 so in other words if and only if the parties all collaborate and get together and kind of merge all their shares can you recover the original thing so the way it's going to work is that y21 goes to one server y22 goes to another server and then y23 goes to the last server um technically the way that this is actually done um is using something called Shamir secret sharing um I'm sure Lucas can talk about this a lot more um but the very very short tldr is that you have some uh you basically generate some random polinomial I'm going to call it P P of X such that P of Y uh sorry P of zero rather uh for example equals Y2 so the
secret is hidden in kind of like the quote unquote uh like Y intercept or the root of the sorry technically that wouldn't be the RO but it's hidden in its valuation at zero so the constant term of the polinomial and then P at one equals for example y21 so the first share P at 2 equals y22 and then p 3al y 23 and so the idea is that if p is a degree 2 polom in this case then you can use these three shares uh to basically interpolate the original polinomial and therefore to derive what these zero or what constant term of the polinomial should be um so that is a tldr um behind like what is quote unquote actually going on also there's
some like ring stuff that's that's happening but again this is definitely out of the scope of here um but yeah uh basically y21 y22 and y23 independently on their own do not reveal any information about Y2 whatsoever and that is because they are effectively randomly generated it is only when you put all three together can you recompose the original thing and in fact you actually want to do computations in this quote unquote secret share space to only compute all the Hamming distances between the share or between the iris code which is coming in and all the iris codes which are located in the quote unquote like databases which which are here also the databases themselves are secret shared okay so uh long story short um when it
comes to what needs to happen on the mobile phone um yes now we have X and now we can also compute Y3 equals F3 of X and importantly we also need the phone to generate the same kind of secr shares of Y3 so from Y3 we need to derive y31 y32 and y33 and importantly send each of these as well sorry this diagram is getting very messy but DVR we also send these to each of the servers and so each of these processes is also going to require basically a ZK proof um that happens so that we show that basically the user is sending over the correctly generated
secret shares um but again this is just kind of the segue into the actual kind of like secret share MPC process um I will stop screen sharing and see if there are any final questions okay sorry the last part was a little rushed um cool cool cool um so thank you for that really really interesting um talk if you guys are interested in this stuff there is another ZK um cryptography Workshop
coming up by DC Builder um I think next week possibly the week after um so do come along for that because there's another hour for this to to to go into this because obviously it's not something you can cover in in 45 minutes but anyway thank you Ryan and Daniel for joining us for part one of this ZK ML and NPC Workshop also thank you Danielle and Ryan for the perfect sackway into secret sharing and DC I hope you can now all see the presentation and yeah this is the very TR title of NPC uniqueness check but in the other words if you watch the talk before it maybe should have the title as the first talk was hands off my eyeballs
this talk should be called hands off my Iris cod as in the end of the last sing you were hinted like the Irish code doesn't really let you reverse engineer your iris image but it still leak some information in what we want to get rid of it and before we diving into directly depart that Ryan left with the secret sharing I just want to give you a short reminder uh where we are at the world current torye and even before that uh who are we so we are T and I'm a co-founder of T and we focus on NPC encrypted for the web free now to the world Conta Tre so last
week we had DC Builder on this encode indication Series where he talked also about the overview about the tech tree and now let's zoom in where we are with this talk so we are at the world verif ID verification stage and specifically at the uniqueness service so where where we want to verify is this Iris code a new unique unit and we have a similar picture drawn by Ryan with fors so let's shortly walk through before we dig into the details of NPC and secret sharing so we have this orb and we already saw that the orb check the liveness that makes the Irish image and
does uh find version of the image and returns it to the user and then the ckl magic happens on the device of on the mobile device we saw that before and in addition to this uh Magic to transforming the iris code or the iris image to this Iris code with a SE knowledge group attached this also have to prove that the secret shares so the three parts that we saw before are computed correctly and then once this is done they will be shared with three different parties here sh named BC party one two and three and the actual check if this Irish code is unique then have
happens on encrypted data so no information leakage about the new Irish code and also about all the Irish codes that already in the system because they are also secret shied between those three parties and this computation happens cryptographically secure which is uh the field of multiparty computation which is a similar subfield than knowledge interrup you Lucas yeah sure we can still see slide one we supposed to yeah is that you should be slide free I think you might be sharing the PowerPoint window instead of the actual slide okay let
me just reshare up let's just share the whole screen can it's easier May let's do it just like here here it works can you see now slide three yeah we can see slide three so let's do a short recap of slide two where we see where this is located in the wel contct
tree I just highlighted that it is here the world ID verification specifically at the unique service if you want to get an idea about the more broader Tech free I recommend you to watch last week's episode from DC Builder and on the first slide we have a similar setup like R draw in the end of this session where you have the orb and the orb generates this image checks for liveness get you assign image to the user and then here the user device the whole CML magic happens which means transforming this Irish image to an iris code and also producing the proof that you computed on the right algorithm on
the right data and then also producing the right secret shares so splitting up this Irish code into information that do not Le any bit of information this then can safely be uh distributed to this three independent MBC parties where which will take care about storing the iris codes in a secret shared fashion so that they do not learn any bit of information about this Iris codes but still with the magic of MPC which is a similar sub Shield than CK in cryptography you're able to compute the necessary check which technically is a hemming distance check
of the new Irish code to each of the Irish codes that are already in the database by performing an interactive protocol between these three parties once this is done and you get a go the result is back to the user and the user can then now submit it to the a Rec system for a sequencer and then uh you will get the world ID in the end now we have seen Ryan a bit motivating how secret sharing works and why it is secure he did it with Pol noals I tried to do a bit more graphic uh so it's not your secret sharing although we use it in our protocol we also use something which is
called additive secret sharing and it's a bit I guess more intuitive how it works if you're not having a very strong back Mass background but this very simple case or let's back up if you want to compute something it was shown that very early on that this is enough computer function if you have additions and multiplications if you can arit stick them together you can compute any program that is out there or in new programs now so if we manage to do these two buildings blocks multiplication and addition we know that we can do any program so that's why we focus on this very simple
Primitives and here as an example we want to add two numbers 33 and 14 in a secret shared way so how does this work let's take the first number 33 and you pretty as hinted also with the pooms up into three different parts so you randomly choose re numbers with the one condition that if you add them up they should again be equal to 30 and I think you can already imagine that this doesn't leak any information if you would receive a 10 you cannot guess what the original number was like 34 but if you combine all those secet CH
you it is still the old original number now in this case it's exactly what happens on the user device this happens locally Cent s side this Iris code that got produced by the CML code is then secet shared into three pieces where each one is randomly but together if you add them they uh in the original Irish code now exactly as in this image the secret Shares are transmitted to the MPC parties that's what here called Distributing the secret shares so each party receives one
share and the next step let's do the same with the number Forin here down there and each party receive also an share of this number number now what do they have to do these free parties if they want to compute the addition of these two numbers and because it's an eddied secret sharing scheme they can just literally add those two secret shares that they receiv received each locally on their own and here is important to note that those numbers that result here this uh um intermediary results like 18 13 and 15 do not Le any information about the
final result but if they got combined together like with the user uh the user's device it results in 46 which is obvious the right number so for secret share for doing additions it this very elegant scheme here we see at the end the result gets shed to the user so the user can assemble the numbers again now maybe it's even that easy if you're doing multiplication so Computing on secret shares but now the multiplication like something like 34 * 13 which is if you even just approximately definitely above
300 and if it would do it naively like we did it with the addition you would get 45 for the first party you would get 40 for the second party because the shear is eight times 5 and 50 for the third party and now let's add those numbers together and it would result in 135 which is obviously wrong so for the case of multiplication it is more difficult and involved uh to do this in this distributed set thing on secret shares what you have to do here is now an interactive protocol and this is what we called an APC protocols and run was already mentioned there are two very
canonical uh MP schemes that we're using like Shamir secret sharing and EDI of signature if you're more familiar with CK you can maybe think a bit of it like different proof systems that you can leverage for doing some certain task now the theory about multiparty computation is as old as CK so it's in the 1980s but also as we have seen um from Daniel the overhead sometimes is very large and let's look at the problem or at least the performance Target that we want to have um in the case of the first
truck we have the very uh restriction that and the issue that we have to do everything on the mobile device here we don't have to do uh the stuff on the mobile device except the secret sharing which is very cheap but what we have to do we have to compute on the whole database So currently I think about six million users so it's even without privacy it's quite a huge task and the goal for the performance was at the beginning of the project that we achieve like 10 to 20 verifications per second which just literally means that 10 to 20 people each second on the world can go visit at work and get
verified and for just one verification we need over 300 million Iris Cod comparison so just checking this Heming distance to an existing Iris code why is this number so huge It's like because we have 6 million humans already in the database we have two eyes and there are 31 rotations you have to check so for the details why this is necessary um I think the tldr here is just otherwise it wouldn't be jur if we wouldn't do this two Isis and 31 rotations but um the best way is to tune into the biometric session I think they we go into very detail here why uh you have to design the system in this
way to make it secure now at the beginning we started where with the literature so academic papers and academic papers could do like 2K Iris codes per second and this is really I made it in bold because you can just do less than one verification per day so we're so far away of our goal it's like uh we've seen with this 300,000 x overhead of CK virtual machines we're so far away that we might even not think about even starting this test but we did and our first prototype using techniques inspired from machine learning so
multi-party commutation machine learning got us to 50 verifications per day which is still far far away from anoc practical we know we had some room uh with optimizations and so we started switching between different MPC protocols on the fly so this can be maybe imagined like in the first talk we had you had designated proof systems for machine learning now we had designated NPC protocol for this Irish and a lot of lowlevel engineering optimization which brought us to 200 verifications per day so like orx Improvement uh still far away what our
Target is like over 10 verifications per second and again machine learning or at least the ideas of machine learning saf to day here so we explored this area which was heavily under research like graphic cards and NPC and like writing the code dedicated for the GPU and extremely powerful hardware setup now allows us to do 13 verifications per second so just above the threshold we want have that everything is running smoothly and a lot
of uses can be on board to long now for those cure this setup is each note each NPC node consists of eight uh h100 so this very powerful graphic cards that mostly used for a a train uh six million users sounds a lot but the goal of worldcon is way more ambitious and for growing to one billion users this solution won't Ki because the performance of this solution sces only linear in the number of humans so if the database grows this gives a lot of
overhead so we cannot simply even without NPC so without privacy we cannot do a linear scan search so easily for one billion users so we have to do something like sub linear scan search uh which is if you're familiar maybe with Vector databases it goes into this dire but with MPC it's again very underexplored because extremely hard that you do not leak information uh if you're using approaches like from Vector databases so this is the current ongoing research where the world crank team can see you and several other companies are trying
to push the boundaries and applied research here so this was a very quick walk through about the MPC uniqueness check uh if you going to go into any more detail I would recommend you to use the blog for example uh from the wel Foundation where there's also some nice animations and some longer video explanations and if you're already quite familiar with MPC you should check out uh the paper that we have written together with the world conf Foundation which is publicly available and it's called the last scale MPC uh you can find it ePrint and download it uh but yeah here it is really necessary to have
some background in cryptography in NPC thank you very much Lucas we've actually got I think seven questions from Brian He's listed them for us so okay are you able to see the chat or do you want me to read them out to you I can now see the chat okay um it's okay from 6:20 oh I don't know what time it is about 10 minutes ago there a lot yeah if you rescan your iris uh at the or uh will this result in duplicated Iris data
um again I think this is more of the biometric talk about uh I guess the whole purpose of the project is that it doesn't result in duplicated Irish data so you want to have uniqueness otherwise you would break the uniqueness property um exactly proof of membership how could you proof of membership help Advance the work for users with the world of um I think this is maybe best explained by DC binder um how the proof of membership helps the world Community I guess you can read a lot about the homage there how you can leverage the world ID now and also about ideas how it can be leveraged in the
future thank you very much Lucas for that uh mini Workshop alongside Daniel and Ryan earlier um I'm sure everyone has really enjoyed this twoin one um on a on a Monday um coming up on Wednesday is the Biometrics talk so lots of your questions can be asked then as well and I'm sure you'll learn um you you'll have some of your questions answered before you've had the chance to answer them anyway ask them rather anyway um other than that unless anyone has some MPC related questions for Lucas we'll end the session there for today Brian has added me but
than I can also share my Twitter handle in case anybody wants to reach out afterwards that would be great and I'll leave the link to the book that you put in the chat um in the video recording which by the way is on the inco Club YouTube channel from tomorrow for everyone who's asked okay so we'll end it there for today then thank you very much everyone for joining us um lots of thanks in the chat any guided research projects possibly as
well Ana is asking do you know anything about research projects in um the world's qu ecosystem Lucas I'm not sure this probably isn't your field of um there's this uh grant program so there was a wave zero and wave one where a lot of great reachs have happened I think you can read it in the W page and yeah job to DC build also who has a major force in the grants program there yeah that is true and DC Builder is running the last three workshops of the series so you can have a chance to ask your questions to him then okay thank you very much I will see everyone on Wednesday for the biometrix talk thank
you for joining us everyone [Music]
Related talks
- Zero-Knowledge Proofs Panel
- Verifiable Inference: Don't Trust, Verify
- ZKMPCML: From Memes to Reality
- Keynote: Programmable Cryptography and Ethereum
- ZK12: Towards Verifiable FHE in Practice - Michael Walter
- A security-in-depth approach to verifiable off-chain computations
- ZK14 - Making verifiable FHE practical - Daniele Cozzo (IMDEA Software Institute)
- Programmable Cryptography and Smart Contract by Shouki Tsuda | Devcon SEA
- Verifiable Computation and Multi-Party Workflows | Fernando Castillo - Dober
