Make a ZK App Together
NoirCon 1 at ETHDenver 2025 · February 2025 · 56:19
Aayush Gupta, steward of ZK Email, hosts a hands-on workshop at NoirCon 1 during ETHDenver 2025 in which participants build a zero-knowledge app together. The session works through writing and proving Noir circuits step by step with the audience, with ZK Email as the starting point.
Speakers
Topics
From NoirCon 1 at ETHDenver 2025, hosted by Aztec Network.
Transcript
sweet um okay so before we start maybe I'll like just pull the room to see what people want to talk about think about focus on where people are at uh maybe I'll just do like a razor hand if you've like heard of ZK email or seen a presentation before okay uh maybe like half people okay maybe raise your hand if you've like uh heard of like the zkl registry or built with like ZK Noir before at all uh okay basically the people who built it and that's it okay okay so we'll we'll go over that um maybe what else um raise your hand if you like have your laptop and you want
to hack on something like have some something by the end okay like three or four people okay cool um okay so maybe what we might do then is we'll probably do a talk go from the basics um yeah cool thank you um we'll go from the basics up until uh oh maybe also raise your hand if you've like built with Noir before okay so we'll maybe cut some of the Noir details because I don't know how much time we'll have to go into that um but okay so so what we'll do is we'll probably go over like what is zekk Emil then we'll briefly go over like why is useful and like some of the benchmarks there and like what we found um and then we will explain how to make your own
proof and why that's like interesting or relevant we'll explain some like interesting use cases of ZK email and then we can I guess that'll be like the official end and then for people who want to stay on for longer and work uh on like making their own proof we can have like a much more intimate like Workshop session where people we just like get people making their own proof in like five or 10 minutes um sweet okay so right so that's that's going to be our Our rough road map so we'll probably do something like you know introduce what is going on what is Noir how is that useful and then like how does the dev tooling look um okay then maybe like raise your hand if you like what like identify as like a builder like you you like enjoy building stuff you like want
to understand the dev tooling and like the internals of of things okay that's like most people sweet okay so so we'll focus on that aspect of stuff um okay so so what is ZK email this is like review for for most of you but um new for for some of you so the idea is that um if you want to make like a proof of some email that's been sent or received uh the way that this is normally works for like anti-spam or anti-spoofing mechanisms is this thing called the Deon protocol um the idea is that uh every email that's sent has an RSA signature from the sending domain of the shot6 of all the information in the email so that would include like the from the two the subject the hash of the body um whatever
it is you want to prove um that's signed with you know some private key assoc associated with that specific domain um now the problem is you could prove the signature directly and that's what's used for spam prevention but if you prove the signature directly on chain or to a third party you have to reveal all this information to prove the signature is valid um so how do you get around this well you can wrap this entire verification inside of a ZK proof and you can hide stuff you don't want to reveal so the idea is that you know the point of zkm is we built all these tool stacks and tooling and useful utilities to be able to do this really really easily um now you can prove any email within a proof and redact all the information you don't want to reveal um okay so why is this interesting um well
okay one you get privacy you can you know anonymously prove things by redacting your own identity all throughout the email um and you can redact you know sensitive information maybe you want to reveal that you have an account with some bank but not what your balance is so you hide you know the balance and you reveal the bank or whatever um and so it's kind of useful and you can think of like if you go through all the emails in your inbox you can prove oh I went to Noir because I have the Luma confirmation um and you can kind of think of really creative interesting emails that'll let you do interesting proofs um how do you like actually build these proofs well you use reject to parse these emails um and then you just prove the outputs of the Rex and you make everything else private um
and it's provent these proofs are self-contained you can prove them on chain you can prove them on other services you can give them to third parties and that's pretty interesting okay and then you know one like maybe the most basic example here is let's just like redact some information from an email and and expose it so we have like you know some whistleblowing examples where you want to prove you got some email and you just redact your own name from it that's kind of like level one um that's if you have the most basic kind of proof and you're just using string redaction um but the idea is that you can like extend this much further you can build like arbitrary kinds of proofs and um I'll introduce like a tool that we can use to like Define what these proofs look like um and and maybe like
stretch your imagination a little bit on on what this could be um so okay so I guess um so so why might you want some like abstracted system like the registry to make these kind of proofs for you like a kind of a higher level on top of something like Noir or circum or all these other ZK languages um well the idea is that these all have different benefits and disadvantages like for instance Noir is extremely fast in the browser on the client side for client side privacy so every time you want client side we basically default to Noir um circom is very valuable if you want you know battle tested this language existed for five years secures billions of dollars tornado cash you know you're going to use it for like super high value onchain transactions so then you want to use maybe something like a
little more battle tested um maybe you want to prove really large emails on a server so then you'll use something like sp1 or RIS zero where you have like a zkm running on a server where you know it's not really possible to do client side but if you have the benefits of a bunch of gpus you can you can make that proof and the idea is that it shouldn't matter you just Define your schema this is the kind of email I want to par this is the kind of information I want to get out of it and you define oh do I want client side or server side and we just automatically choose the fastest one for you behind the scenes um okay so so maybe like one useful exercise to jog the imagination um is kind of thinking about things we can build and and what those
systems look like so um okay so let me let me kind of give like actually I can just do a a live demo of this probably um the Wi-Fi is fast enough okay it is fast enough great um cool so you can imagine that these are all emails we've taken from this might be maybe I'll zoom in a couple times um these are all emails we've someone has taken from their inbox and defined a proof of that thing so for instance you know at the top somebody took a Twitter email what they did is they just extracted the Twitter Handle from the email so you prove you own a Twitter handle you can prove that on chain you can make a ZK proof and you hide your own email address and everything else about your identity um or you can prove you got accepted to a conference or
rejected from a conference um you can prove you have a Netflix account um and that kind of is like oh I've had a Netflix account for this long and so you know I've probably been watching TV for this long I'm subscribed um it's kind of interesting you can prove you merge like a GitHub commit that's kind of interesting if you want to like this is uh something that Jack know also worked on where you can automatically get reimbursed for for merging in uh some commit um you can prove you're invited to certain events uh you can prove you know your email domain only and not reveal your identity but prove you're part of some company um you can prove you hacked or won some hackathon um you can prove you deleted your account I mean this kind of goes on forever and so and these are completely
composable right like I can I can do something like oh you know if I um deleted my account and I'm booked at noar con and I booked a hotel in Denver then automatically give me a 50% discount on something or the other and so it's kind of like you can compose these in very interesting ways um but but what actually is this registry and like what is going on here um so the idea is that um this to load I just talk while this loads um so the idea is that this registry gives you this nice abstracted way to automatically Define um to automatically Define new kinds of proofs and have them
automatically compile to all those backends that we saw um so okay concretely um Let me let me go back to this registry slide um great okay um so the idea is that we wanted to make it as easy as possible for somebody to define a new kind of pattern um so for instance they might say oh I want to prove I got you know accepted or rejected from some conference um they'll upload like some test email that they want to parse uh and then we'll automatically extract okay this is like the from domain this is like the the email header the body length Etc you don't have to think about that um and then we'll like the whole point of this is you want to use Rex to Define oh like was the person accepted
rejected Etc and so we have this like nice little CLA integration where it like takes your email is like okay like what is it if you want to extract like the date or whatever what is the Rex I might create for that and then we'll automatically select a Rex for you um and this is kind of what the final configuration looks like all the information it looks nicer in the UI but this at least gives you like the kind of programmer's view of what this is is like okay you want to talk out the proposal title so we have a rejects to parse that out um you have like the center domain you have the length you have like certain like uh whether it's in the body the header Etc and this kind of defines how you parse this email and this is substantially simpler than
writing an entire ZK circuit from scratch for all the different like ZK you know circuit compilers that I I showed in the beginning um and then it gives you like a GitHub style interface where you can see like the number of stars you can Fork things you can see the number of people that have done things on it kind of very good have inspired of like how do you do Version Control in these patterns when emails change or when you want to take somebody else's pattern Fork it Etc um and then we automatically deploy like kind of like velwood like an automatic front end for you anybody can go to it um upload their email and prove with your proof directly and it'll automatically search their email for emails that match Etc and so it's kind of like very simple because you just go through you upload
your email you define your VES and all this infrastructure is already deployed for you um which is super convenient um version history Forks already talked about this um cool so maybe before we go to the registry um if you guys want to do like a brief overview of like what the no like what is interesting about the Noir version like what are all the kind of components to go into that what are the rough benchmarks how long will you expect to proof to take um I can pull up those slides for you um yeah what's up let's we can do questions um I just want to understand you got this like really cool experience for emails but this could be us for any blob of text right like you don't actually like an email is just blob of text if I use the proof of death con acceptance I
could have just faked and like WR my own thing is that is that right so so so the email is not just a blob of text the important thing about the emails is a blob of text with an RSA signature and so that's thing where you actually get the Providence from because only you know whatever uh devon. org is going to send you an email from devc con.org and they're going to have some public private key and it's very easy to verify once you have a signature you know you can easily fetch their their public key and verify was this actually signature generated by them so yes if it was a blob of text this would be trivial we would just be doing you know normal such extractions that wouldn't be very interesting the interesting thing here is you combine it with the Providence from the signature and that allows you
to do all of these like attachment to saying this is the real thing that you can't afford unless you have their private key um yeah it's a good question like how do you get security yeah if I were building like an application that integrated this yeah um would I need to go fetch uh the corresponding publicy for the specific thing that I'm verifying and do you guys kind of manage like a a registry for yep so so basically um the Wi-Fi is not very fast but if you go to archive. zk. um we manage a like basically like centralized Archive of all of the like public keys that we've seen and we know and there's kind of this interesting algorithm that we've run also um where basically uh if you have any two old
emails from some public key you can reverse engineer what the public key should have been um and so we automatically do that for you and we'll kind of handle getting these like what you might imagine are like lost public Keys um and I think I actually have um maybe slides um I have a screenshot of that archive here somewhere no yeah okay so like here for instance like this graph is basically like all of Hillary Clinton's email leak and like the like whether or not we could verify the emails and we put red if we couldn't verify it meaning the public key is gone and green if we could verify it meaning the public key is still there and so like the whole point is
you want to be able to to verify these inboxes and these emails are valid so somebody doesn't just you know spoof whatever information they want and so to get these old Keys exactly you kind of want exactly this archive so if you go to like you know archive. Z email you can search any domain in this case iso.com and then we'll just show all the public keys that we have or we reverse engineered over time and you can use those we also maintain like an onchain registry in which like a kind of group of computers like 30 computers kind of does like a delegated multi-state kind of thing where they all fetch the public key themselves they all verify themselves and they send on chain so that's how we do like the higher security stuff um okay right so good question though um back to the Noir stuff um if you guys
want to quickly just talk about what like why is Noah relevant to this how does performance characteristics look like um there's also it says to do ZK Rex but we recently got some benchmarks from ZK Rex which are pretty cool um which let us do all of this super fast client side um so I'll give it to you guys for a couple of minutes and then we can kind of go into like um understanding uh how to kind of build your own app and other cool things the came has been used for sweet sure is the mic yes does that work oh it's for the camera okay um is okay that's how Okay so this going to be uh slightly informal um I feel
like it's better just to go to uh here I'll just pop open are you going to the GitHub yeah let going to go to the GitHub there this one okay so this is ZK regx I was going to start with the bench and then that's here I'll come back to this okay so a long time to load it does take a long time to load yeah so Noir uh very fun uh if if you've written circom uh I mean circom is great state-ofthe-art at the time uh it's also like really sucks to right um if you compare like what a ZK circom circuit looks like and what this will pop up in the next 45 minutes with um it's it's
much more ergonomic I think that's like the the first thing um there a screenshot in the SL maybe that's is there start ah yeah just oh there is a screenshot your like one of these yeah okay so yeah this is pretty much an entire ZK Emil circuit and uh a lot of this stuff is abstracted away but um the the core part is like you know you're going to have a header you want to uh take a a dkim signature and verify it over uh the header so it's just that there's a bunch of stuff going on under the hood here you could like click into it if it was GitHub or you add it in vs
code or something uh you know it's going to do a shot 256 hash it's going to do an RSA signature verification all you have to do is call this though to do that which uh like step one so this this is an old version uh now we actually have the regex um and we'll do like the same thing that circom would do API more or less the same though uh you want to get the sign body hash uh you're basically going to give it the header um it's going to check that this is actually a valid spot for the body hash to be in uh it's going to base 64 to code it for you do all of that uh again abstract it away um in this case we're not partial hashing don't need to talk about that we're just
going to compare like if you wanted to do operations over the body uh you want to just ensure that what you're asserting the body is is actually what was signed in the header do it like that and that and then you're going to want to Output things like um The Pub Key itself if you wanted to hook into the registry you don't want to Output like 18 different field elements it's easier to Hash it into one uh as well as you want some way to nullify the email which um you know there's different pros and cons but the easiest thing that you can do is just hash the signature as well uh and that like there's more you can do there's a lot you can do with zkl but this is like the full end to end functionality for a basic verification um so the first thing is yeah it's super
easy to use um second off uh would be of course now it's loaded um talk about the benches uh we can just pull out the benches from this actually um these are actually a little out of date too I mean do you want to talk about the benches or okay uh yeah so this is a little out of date um this is on an M1 as well we like seconds ago benched it uh on an M4 uh I think we got like two seconds for this circuit um and that was in the browser with honk with multi-threading enabled you should be able to do this in about 5 Seconds witness generation should be
this should be like 4.25 uh. 755 seconds so it's it's really quick and like if you compare that to circom um like you can do like a verification over the header before you run out of memory right more or less more or less small bodies okay I me this is like maybe like factor of five at least last yeah so um really like like circom with icicle um you put that on the back end it's probably going to be faster so like in certain situations it does make sense to use circom or uh any of the ZK VMS um but if you're priority is client side proving uh Noir is is
basically the Clear Choice here um it's and with regex now um we'll get to the point where it's it's feature parody but essentially if you have any sort of Reliance on uh kind of anything on the client side uh this is probably the best way to do it um what else I think that might be uh and then there's regex which I'll just pull that up and you guys can look at it but actually I will show this off really quickly actually um so yeah this is the only difference like you saw the previous one uh it was get body hash now it's this so again all that stuff's abstract um you have to generate regx if it's like non-standard um there should
be uh uh of course well there's a bunch of the common ones in there already um oh yeah here they are um bunch of the common ones in here already so like if you needed any of these you can go get them uh but there's also the CLI for generating stuff so yeah um ergonomic private quick those are those are kind of the bullet points all right um great yeah okay so now that we have like a sense of like what the abstraction looks like what's under the a little bit um we can go towards um kind of understanding um I guess um maybe we can do like a couple
of like other applications to just draw your mind on like what is possible and then we can move towards people making all of your own proofs um and kind of just going through what that could look like um okay so cool application people have done um one is like the exact same code we have works not just on email but on like General logins to things and there's already a group that did our JWT proofs um we have those also in circom and you can do those with exactly the same kind of projects matching and you can prove you did certain log in certain websites um wherever you want um so that's pretty cool um you can use like the whistleblowing thing to say like post confessions from your email domain you say oh I own like a at you know I don't know like berkeley. edu domain and
now I'm going to say like something about uh something at the school that I maybe don't want to reval my main identity for and you can use like te for moderation or now you can actually use claude's new uh Claude 37's new like signature to do llm moderation directly which is quite cool um you can do like email trigger transactions on chain so you can use like uh an email proof to like send or receive you know in money basically directly to or from emails you can have emails approve on Multi you can have emails directly log to websites like crypto websites just fully with email but you don't have to trust like some like you know person to MPC your keys for you and and hold them it's just kind of your email domain server only trusted party here and you can do account recovery maybe you have like
some wallet and you want to uh make sure it stays safe even if you lose your phone um well then you could just add email addresses to your Guardians they confirm and then they can recover your assets when they want to and this all happens via these like zkl proofs on chain um cool okay so I guess the most compelling thing I think now is we can briefly do question then we can move to doing like a very interactive thing where we like Define our own proofs hopefully in like 5 or 10 minutes with the registry um but before we do that I'll just take questions so that people who just wanted to come for the talk section um get the talk section yeah do people have any like questions yeah are BS on the complexity of the xes like can use yes there are bounds the complexity
of the redx so um this will again take um three years to open but uh let's uh while that loads I'll talk about it briefly so the idea is is that um if you're doing Rex and the ZK VMS you have a little bit more latitude and flexibility because it can do the parsing via direct op code so you can do like a couple more things um but if you want to do Rex um in like client side with Noir you have to be a little bit more choosy about how you're going to do it and so the main restriction here is that you you have to deterministically move through the string you cannot really like go backward so for instance you'll Define like this DFA that represents the Rex right so maybe your Rex wants to match you know the letter M
then number 01 then Dash then A or B then a semicolon then you'd imagine that each character you're going to match okay is this an M if it's an M I move to the next state it's a 01 I move to the next state while it's still a 01 I stay in this state Etc until you reach the end um and this means you can't do things like look arounds or um I mean what else yeah like things that like rely on long range interactions in the Rex that require you to go backward aren't really allowed and things that are non-deterministic so imagine you match something like oh um match like maybe an A or a b and then later maybe it exists maybe it doesn't and then later you match again an a then and and they're kind of contiguous and you could your V
either match you know the a or the b or the a later um you can't do something like that so it has to be deterministic all the way through um in practice this is like mostly fine it just like you can usually construct a reject that that satisfies these thing and if you can't then we can like work with you to do it um the AI is still not quite learned it like we're not prompting it totally that great so it still sometimes puts invalid things in the Rex but you we'll hopefully throw an error when that happen and you'll see okay something's not working and then we can work with you hopefully to resolve that um yeah but uh yeah we had this blog post z. Emil blogz just like goes through like the nitty-gritty details of how we think about these like different
kinds of parsing in rexes and DFAS and then um if you kind of just replace um like the gates with lookups then you basically have like the Noir implementation um isn't there like a some computer science results like an NFA can always be converted to a d yeah so an N an NFA can always be converted to a DFA but the problem is um this means it doesn't via this like multi- set kind of expansion meaning that there are still uh like you end up tagging your DFA with like up to exponential number of states and it may not be directly a pass like of a single character of each character of your string three or reject so yes you can convert any NFA to a DFA but it may not
be the case that can for instance parse maybe you want to when you when you say oh only this part should be public and the rest of the part should be private that result kind of breaks down a bit because uh yes it's deterministic but now like someone could still manipulate what is public and what is private um and so it's a little bit it's a little you have to constraint it a little bit more than just that multi- expansion but it's a good question yes yeah okay cool um okay that's off the questions that's like the main talk thing if you you want to see um links or like read more um I'll I'll put up like um some QR codes um right this is going to take okay well
this actually loaded pretty quick um yeah so telegram on the left website next the docs is where we Define all the stuff um the right side I think is the slides yeah these are like yeah not all the slides but some of the slides so hopefully this can can help you yeah what's up you see you have multiple backs is there like like a that you is there chos that Noir uses yeah so so Noir will use like hon or plon um and then circom will use Gro 16 sp1 and R zero will use you know Starks and then we'll recursively uh aggregate it to a gr 16 Pro if you want to verify on chain
and it's kind of like uh the things we're like looking for it's kind of determined by like you define what you want like you say oh I want client or server and I want the fastest possible and we'll determine okay is your email long okay if it's long we'll use a ZK VMS okay is your email on the client side okay on the client side we'll do this we'll do Noir okay are you trying to verify on chain very cheaply like are you on an L1 or something okay maybe we'll off for GR 16 because maybe the size really matters um so it's kind of we'll sort of make this trade offs for you based on like the the functions you call in the SDK basically um and you can imagine that like the SDK interface um I can I can also pull up like a brief
screenshot of what that looks like um so the pro posted on chain yeah they can be posted on chain yeah um so so the when you actually want to do this like inside of your app um you basically like it's like a roughly like an eight line thing um okay well uh that's annoying um but you can kind of see the idea of like you'll import the SDK you'll call this is the blueprint I want to prove like I got rejected I want to prove Twitter whatever it is you'll like create the prover and define whether you want to be local or not and that'll automatically you you use noar orcom um and then uh let's see if I can okay well now it's reloading um you don't actually know
which you so so you you can manually overwrite it um so we do like give you an option to say Okay I want to use this specific one um but in general like we'll check okay like are you like and we'll let you give a function to you know generate your input generate your proof um and then verify on chain and based on whether or not you call verify on chain or whether or not your calling is local we'll just like make the choice for you but you can manually override it and say okay like I don't know like no R equals true or whatever we haven't added that functionality yet because we haven't yet upstreamed no R but no R should be upstreaming the next week or two at which point this will become relevant um and we'll let people manually choose yeah but it it like the point was
we wanted this to be like you actually integrated into a frontend in like 5 minutes and so like we really optimize like lines of code on the on the front end um for somebody to go from like zero to zero like nothing to like a zkl proof but if you're creating a system like where need perhaps like a verifier can verify all of your logic you have potentially multiple gr systems that are inferred from your logic it's not really like deterministic which system right so so so so the idea is that like is that the user should be able to choose right like if you want the
ability for people to post all kinds of proofs on chain you can say like yes P1 equals true no R equals true sir Comm equals true or you can just have the one by default which will deploy a single verifier based on your case for that single prover type on that single compiler um and that'll just be kind of what you use and so it's sort of like you can Define if you want to have multiple different verifiers on chain to support all these different kind of use cases or if you want to focus on one and you say okay you know we really want to minimize our attack surface we don't want people to to use all these different verifiers like we you know a bug in one verifier would then compromise the whole system and so we're just going to like select you know a
single one and say we're going to stick with that one and so people can kind of make their own decisions on what they want to do and yeah we'll make we'll give like a sensible default um but yeah correct you might have like different if you're you know doing some production system you might want a little bit more control um we again we don't have that stuff the specific choosing the specific provs right now in in the SDK but like presumably as soon as we've added Noir and that we should be we'll just add that choice yeah good question yeah do you have some defaults ons tost to ands for that yeah so so right now it it works on any like evm compatible chain so you can just when you select verify on chain you just set your RPC URL and it'll just send it to that RPC um and
you define like your we'll send you like the this is the contract where we deployed it Etc um currently like you can just par any RPC of any test net and we should be able to do that um I think right now it's on like base and like ZK sync and like optim ISM and arbitrum and maybe like one or two more but it's kind of like Andia and so it's kind of just like and then when you want to put it onto like a like a main net like a real L2 with like real money then you know then the cost of verifying public keys and stuff comes into play and we'll Poli work directly with you to be like okay like probably point to this verifier and like be careful about these things and then um again you can just set the main
at RPC and then be a little bit careful about gas but it's kind of the hope of get people on to test net as fast as possible and then we can worry about main net kind of more manually yeah it seems super chaotic to like auto system it is it is it's it's chaotic in the sense that like this is this SDK is built for people who like have no clue what ZK is right they just want to like verify something from your inbox and they like don't want to think about a ZK system and yes I agree anybody who knows like like if you if you're coming to noiron you should probably be specifying okay I want to use like this specific proof system because you probably have the background to be like okay I want like this kind of proof of these kind of
trade-offs but like our whole point was that like like I think that like ZK proofs can be useful outside of like the very narrow blockchain context we Define them in and if we want that to be the case then like we better not be having people choose between like whatever eight proof systems that like for which tradeoffs are like somewhat nebulous to them so it's kind of like our belief is kind of like have a sensible default but let people choose if they care um yeah and yet to see if it'll work like we've kind of like only seen circom proof so far um but I I'm hoping that as we add these more backends like it ends up happening and some of them we have to just make the choice for you like the email if your email is like contains a PDF or an image like sorry like you're
not using ccom or or Noir probably you just have to use a zkm um and so it's kind of like some things like our hand is a little bit forced but other things like we we can leave up to the user yeahor no no this is great questions are great I'm sure other folks are curious too um do you guys like have any resources on like complexity of email to like what you think the like the sensible defaults are and like how we should think about like if the PDF is this big go with this one or like you know you're putting an image with this that's a good point we should add a page in our docs for that right now it's mostly just in code but it's true that like I I could just Define the rules for for you right now like 30 seconds right
I can say like oh like if you're going to do client side do Noir if you're going to do like if you have a body longer than you know uh a thousand characters you should be using uh or maybe longer than like 2,000 characters uh okay if you have a body over 10,000 characters you have to use sp1 or you have to use a zkm if you have a body over you 2,000 characters you're kind of Towing the line it's similar but like ZK maybe be faster a little bit most attachments are going to take you over that like immediately um and then um yeah those are like the main rules of them if you have like more than 10 rexes like maybe you should be using uh not be using
circom uh those like the main rules of thumb yeah it's pretty simple is there a condition where you for C over one yeah so we C come over Noir when you are verifying onchain in a production setting um so for instance like Noir for instance is only like one third audited right so like we're kind of comfortable deploying stuff to to test Nets and we're deploying comfortable deploying stuff where you know there's less than like $1,000 going through it or something like that but the moment you're going to like go over that limit and you're at like a money limit where you can't replace all the money then like probably at least until Noir is fully audited probably should be using ccom and if you want to do fast serice side proofs on a GPU circom is still the state-ofthe-art so if you're kind of like small bodies
um s side proofs um still SAR will be like you know we have proofs with like five rexes and fairly long headers happening in like six seconds on a server in ccom and it's like that even in Noir would take like probably like double the time is my guess yeah and is the audit on the proof system level or the compiler L yes the audit we're waiting for is on uh so the proof system I think has already been reviewed because it's like published or something but uh the main thing we're looking for is like is there a bug in the compiler like the Noir compiler like that we we're pretty confident there are bugs in the Noir compiler so we're just like we just really want those to get ironed out before we let people kind of verify on Main net and and kind of lock a lot of
money in it like I would say if you're doing this for like identity proof or something it's fine yeah use Noir like it's no big deal but like if you're doing account recovery probably use ccom yeah okay so yeah you had a question as well yeah are these all the same they use like p p um more or less um yeah there's like some Nuance with fry being like a little bit different like kind of slightly different like like poops but like it's kind of like uh like if you want to verify all these onchain like you're you're going to end up with a like snark at the end and it's going to likely be R 16 no matter what you choose um although some of the like honk vire seem to be pretty optimized I
mean are competitive but still not quite as efficient um yeah love to see like the code like like how do you how do you choose is that open source yeah all of our code is open source everything is on our GitHub if you go to github.com DK you see everything um we like the the current state of the registry is basically we have all of the like provs working for sp1 for vzo for Noir for circom but the registry right now only supports circom and so we're hoping like over the next few weeks now that we've kind of finished all those MVPs to add them into the registry and like make that choice um but it's kind of like that's the hope is that we're like you know we're kind
of promising that if you make a proof on the registry um then we will automatically like within the next like month or two like be able to generate all of those for you um yeah it's pretty fun yeah no it's great no I'm yeah so is it that What's Happening Here is that somebody is writing the like a specific sort of thing that they want email anybody exactly so that's exactly what the point of the registry is it's like this kind of like public Version Control System um let me go back to the registry it's like public Version Control System where if you want to make a Twitter proof you don't have to think through oh I got to upload an email I got to define a Rex will it work will it not you can just be like oh yep that Twitter one
it's been started eight times probably works and you just go with it and it'll just probably work um and so the point is that like it's kind of like there's some like yeah you can avoid like some headache and just reuse other people's proofs and you know look at onch activity okay it's been used like 100 times okay it'll probably work um so yeah it's kind of like this nice Version Control System yeah you can see all the past version like if you go in uh again the internet's going to take forever but um if you kind of go into the proof um eventually a version control button will pop up and you'll see the whole history of all the time this Twitter proof has been modified which roughly correspond to either like bugs we had to update features we had to add or or the email template itself upd you
can see the history and you can say okay I only want to verify in version 4 so I want to be very sure that I'm doing this and it's not going to change you also like pin the specific version so yeah yeah yes we have a test we repositor of existing emails if you go to our um GitHub repo um and you just search like EML you'll see like we have I mean almost like maybe five to 10 of our repos have like pretty extensive test with EML files and you can just PLU those EML files and use them for testing yourself um you can also just download one from your own inbox um if you have like a very specific need um yeah we we try to provide like you know we have like a proton mail email we have like a Gmail
email we try to make sure that like we have pretty good coverage um yeah it's a good question yeah so like for instance you would just go here and then just do like whatever like file like EML is like probably good enough and then it'll come up um maybe file oh path okay there we go um take a second maybe okay we we'll debug this but you can kind of just search maybe we can just do email will this work um okay you can at least now see like roughly where the emls are and if you start
scrolling you'll start seeing like emls pop up um anyways yeah you can find it in in the GitHub um sweet okay so now what I was thinking is we have whatever 17 minutes left so we will folks who want to just come for the talk um feel free to stick around and ask questions but we'll probably try to do like a 15-minute thing where you know the folks who want to make proofs pull out your laptops we'll pull up register. zk. email we'll try to like actually find an email from our inbox actually try to define a new proof and hopefully at least one person by the end has something compiling um but we'll see um Okay cool so that's it for like the main talk section we're GNA move into the Workshop session sweet tools we need to install or um we can do this all in the web UI and then
when you want to like actually import into your app you can import the SDK yeah okay okay so um yes how's this going to work so you're going to go to registry. zk. email and then you're going to like log in on the top right um sorry I don't have like let me let me see if I can get a bigger QR code up uh uh is this I don't I don't know if this QR code goes to the right place but anyways you're on your laptop so you'll have to type it but um let's see yeah okay this Q code goes to the right place great um
yeah okay once you're on once you're logged into your GitHub let me know um okay we're going to move to the next step okay so basically now we want to to create a blueprint so on the top right we're going to hit create blueprint um okay and then we probably want to find like some interesting email in our inbox so we're going to go for inbox hopefully I don't have any super sketchy emails um and just like scroll through your inbox and see like is there something interesting you want to prove like maybe you know an event confirmation from E Denver that you recently got or maybe like some Flight confirmation or maybe something else and that's like well I'll show you how to download that email and we can kind of start making that proof together
um okay um let's see uh I mean here's like an Uber trip that I could take [Music] um okay why don't I take this Uber trip um this might take a second to load um anyways once this loads you'll have like three dots in the in the top right and there'll be a little like download original email button so once you download that email then you'll have the
EML file locally then they can upload that into the create blueprint on the registry um man is there a faster Wi-Fi here let me know what the startor okay great let's let's do that instead I don't I think my Hotspot is particularly effective here um okay great so now the email's popped up and I am going to so the three dots
on the top right and then you're going to see like download message we're just going to do that and that will let us get the EML all right great um cool okay so now it's downloaded I'm going to go back into this registry and I'm going to say um pattern name like uh you know Uber one membership or something like that we're going to use this proof to prove that you're subscribed to Uber one okay great um and then I am going to grab this drag it in okay sweet um yeah and you'll see that like this email body because it has a lot of images is like quite long like this email body is more than that 10,000
by 10,000 character cut off that I mentioned to you guys um and so we we'll have to basically skip like body hashing in in this scenario um curious could you do like a proof of an email transformation and then upload like a condensed email we could but at some point in time we have to prove the shot 56 and so yeah and so and so that kind of like Norm makes it a little bit faster sp1 res Z make it really fast uh and so it's kind of a yeah eventually this body hash resch will be lifted but for now let's you know if you have an email that's too ideally a more text Heavy email would be easier maybe we'll just say Uber trip Workshop okay um sweet so prove you took Uber trip on
Sunday okay great um cool and then now you'll see as we go to the next screen it's automatically fetched out like what these values should be um so like it's it'll it'll fetch out okay we're looking for from uber.com in your inbox Center domain is going to be uber.com the max header length is going to be you know this value it's figured out is in fact the max header length and we're going to skip body hash check because our email body is too long um okay I can like walk around and see like where people are kind of at um people kind of need need a hand um okay sweet okay we're there yeah so you saw it too long so then now if you go to optional details you'll see like yeah so we're skipping that body hashtag because it's too long um sweet okay cool
cool okay something else let's see any other okay I am the first St yeah you probably need to just put a pattern name in order to go to the next step yeah uh anything with no like just Alpha so no spaces and stuff like that just like a yeah should be good okay great was it um so we were just creating a blueprint in the top right yeah we just create a new one up here perfect yeah you should be at that screen um any any like um anything without spaces should work in the in that yeah awesome great perfect yeah you don't you also you don't have to do Uber you can do like whatever email you want it can be kind of up to you yeah I I should be done in should be
sweet okay um great okay so um okay so once you've on the previous screen uploaded your email and named it and you've gone to this screen um also not use an Uber email you can use like whatever you want it's more fun to do it with a weird kind of email um okay so now we're going to go to the next step okay so now we can like there's a bunch of like quick header extractions so we can like automatically parse out subject receiver Center name Center domain timestamp this case let's just Parts out the subject so um right so this first one's going to be empty so I'm going to delete this and you'll notice it's like added the subject in automatically and this is a Rex that will expose the subject and we'll automatically expose like the test outcome so you'll see that
like on this email we're exposing your Sunday afternoon trip with Uber and I can be a little bit more fancy like I can do stuff like you know just expose a day or whatever but let's just do like let's just stick to something easy like subject or recipient or something like that for now um and you can try the like AI fancy Thing by like uh hit or miss right now okay I will just check if people are kind of able to get there um okay great okay so so one thing is the first one is likely still empty so you could maybe yeah you should delete the first one we should oh no it's that the second one sorry we should put the delete at the
bottom okay you scroll up a bit H yeah that's a good ux okay so now you have whatever uh well now you deleted one of these but whatever you have whatever yeah uh okay cool um great yeah so you should be good to just if you just check the output looks good then you should be good to go like the kind of yeah exactly great okay um perfect um yeah you have to delete the first one okay so you have subject yep okay cool did it simulate correctly yeah so delete yeah delete this empty one okay great um please add at least one re okay sorry just try try deleting from the top so so yeah just delete this one and so I just select subject again so just unselect and
select it again okay that works too we have this weird system where this should really be a plus but whatever anyways okay so okay now I think you have like four subjects but uh yeah okay oh yeah I see what you mean let me go yeah okay anyway yeah you figure it out um yeah so now when you submit we compil it into like a circum circuit basically and then added the registry and everything um yeah might be annoying I know Chrome has like a thing where you can drag it from the top but I don't know about Brave anyways yeah should be good um sweet yes okay great yeah perfect that looks like a subject brilliant yeah so now um Okay
cool so uh decent number of you seem to have kind of gotten at least one of these outputs to work um if it isn't I can help manually deug afterwards but then you just hit submit blueprint um so yeah so there's an option to save your email so people will so so you can send if you consent you can send your email to us to help debug sometimes people remotely will do this we can help them to bug but by default we obviously don't share we don't save any of your emails because that would defeat the whole purpose of this entire application okay um um okay so yeah so now if you kind of search your own GitHub handle you'll be able to see the status of uh that pattern um I obviously have a lot of patterns but okay uh I just passed it
somewhere uh let me do like whatever what I call like shop maybe yeah okay so you can see that mine is now in progress and in maybe like a few hours you can come back and all the stuff I said will be deployed for you right now just with ccom but hopefully we can work with Jack and in the next few weeks we can get Noir up um and it'll be super cool yeah so does the backend system generate the verify Keys yes back generates all that stuff um for you um and it'll Auto like we want to add an like an automatic like trusted setup link for people doing like 16 circuits basically um but for the nicer transparent things like Noir or sp1 order you don't need that so do youy yes so if you go to a generated
proof um so let me get rid of these let me go to Twitter uh so now here if I click download then I can download all the app assets involved with that including the proving key verific keys so like here the keys. zip that has exactly what you're saying solidity contracts the circuits um yeah everything is is available so you can kind of manually take this and then build your own project yeah sweet um okay we have five minutes left so I can I can keep answering questions going around helping people um what's what's next on the horizon what's the hard problems that you guys are thinking about yeah there's a couple of hard problems um um so one is um how do we like sometimes people want to Hash
outputs like oh I want to Hash my email address and we're like well wait a second if you hash your email address as an output you're not really hiding it because if I knew if I had a good guess as what the email address could be I could just kind of reverse that hash right I can say oh probably hash Ian's email I know Ian's email let me try it and see if it works and if it works well then now your hash has leaked your anonymity so how do you get these like hashes that don't leak anonymity well one way to do this is like a verifiably verifi oblivious distributed s random function and it's like this thing where you like you have this big network of computers and um it basically takes like some input like an email generates more Randomness that you can use to insult a
hash and and that way only somebody with like specific key that is rate limited like that is like sending to this these computers these computers have like can verify the person at least a little bit is like not trying to spam a bunch of emails only then calculates the hash for you Etc that's one thing we're like actively like researching and building another set of things is just like um making like faster and better and supporting more things like here like we want to ideally parse like images out of PDFs and like all this crazy stuff but it requires us having a PDF parser and then having an image parser and then maybe running like zkl on top of it with like Ezekiel and then maybe running like you know like other weird interesting things but it requires us having like really good fast parsing and so a lot of these
problems are around like well PDF parsing is pretty non-trivial uh so like how do you get that in a circuit and like with sp1 Z it's a little bit easier but it's still super expensive so like okay building pre-compiled for that stuff um making the workflows here just like easier making um like the really security critical stuff really good so like account recovery like compatible with 772 7579 deploying onto like real Wallets on mainnet like uh generic verifiers Noir sorom Etc um keeping in touch with the latest in like ZK VM space um defining new kinds of proof like just as we Define more and more proof you just run into like weird things like oh this email didn't verify because of this weird Edge case and I have to go in and fix out the circuits cuz it's like weird Edge case um so it's
kind of like some amount of that as well but yeah I would say it's like a healthy mix of like research product uh yeah Dev tooling yeah yeah I feel like the space is like you're just drinking out of the fire it's huge it's enormous [Music] yeah decision and we have like eight if statements it's like it's like not a it's not a complicated thing it's like very like like if this proof would fail on that system then just don't compile on that system kind of thing um and so yeah it's yeah it would be cool if we had some like nice automated decision
algorithm but it's more of like a we have like a very vague cost model and like we just like do this very dumb calculation and just like select the right one and like in reality what this going to look like we'll probably just compile it for all the proof systems and then some of them will just fail and they'll just be like all right you're just not getting that proof system and then you know we'll log it in our our notes okay sp1 failed on like a email from Uber okay we'll like go look at it um and then yeah so it's kind of like it's uh it's a very dumb we've admittedly like not implemented that specific decision algorithm even though I can like explain to you what exactly that code would look like if you ask me to write it down right now um but yeah
it should be hopefully live soon you can yeah I mean we should really like have the docs page and put some pseudo code um but the bigger issue is just right now the registry only supports Socom so we're just like once we add those proofs then we'll have this problem and then we can do it yeah if you want to be part of helping with that like I'm down to jistic algorithm or something I think that would be fun there's like system C to right specif exactly yeah yeah um like something that just way fast like shot6 is way faster than ZK VMS RSA is way slower than ZK VMS like you just kind of get trade-offs on on different things grx is like way faster in Noir because you're directly hitting a lookup table
uh and so you're just like yeah it would be cool if we had like a very accurate cost model we just choose um but we we just do herur istics and it's so far like basically correct um the that I you have specif problem one person may have a slightly expect a simar problem get a be able to ver yeah so so this is part of why like probably in the front end we'll have or in the proof generation set once we add more backends we'll probably have some check boxes of you know which ones do you want to generate and maybe some
warning of like by the way we don't expect this proof Sy to compile just a heads up you can still try but it likely will fail and maybe that way people can reproducibly build it yeah it's a good point yeah we we should add we we'll probably I mean we just haven't really we're sort of just getting into this problem problem but um yeah reducible reproducible bills are important I agree yeah I mean allowing people to rules yeah that's true and and and the reality is like the probably just like you know we could do all these hero Stakes but like the most likely thing we just compile all of them and let you choose based on which one succeeded um and then it's like pretty reproducible okay cool we're at 3M if you want to keep asking
questions um I'll be outside for like another half hour whatever we can keep jamming um yeah and then you you saw all of our links you on emails or everything is linked um sweet thank you for coming