Identity in the Age of AI: the ZK Side of Sam Altman
Aztec Network Talks · March 2025 · 1:10:06
José Pedro Sousa of Aztec Network shares his insights on how zero-knowledge technology can reshape the future of privacy and identity. The session considers proving personhood in an age of AI, with the identity work around Sam Altman as a point of reference.
Speakers
Topics
From Aztec Network Talks, hosted by Aztec Network.
Transcript
Okay cool so hello uh it's a I guess a first event on uh my kind of more of a local setting and I hope you enjoy uh which means that there's a ton of space for asking questions we also all left quite some time for everything uh and so like I want you to uh not have any any questions or any uh doubts and I want you to uh really leave the room with u more than zero knowledge so so yeah I I talked about this with identity in the age of AI because looking at some some
alurn um it seems like there is um a more than obvious connection between the two so uh because I mean if you're living if you been living under the rock you you probably don't know who Sam Alman is uh Sam Alman is known as being the the owner of um open AI uh he was outed then he came back um and so like you're wondering like why why why do I care like why do I care about some Al why should you care you don't have to care and like I actually I I don't have any particular feelings about billionaires I don't know I don't
know them but I do care about what they do and what they do with their resources uh and this is interesting in the case of some some and that's why I bring it here because there are like two antagonists in the aih you have open AI uh I guess would be the first one bringing like the generative AI into the masses whatever which are gbt it was here already but not um like for the common uh public and then there's this weird Pet Project called World um and so it
comes into this if someone thinks why why do it has these two projects and it has more actually but he's not definitely not stupid like knows and this is an example of uh kind of a full vision and I actually think most billionaires have this full vision Vision on they invest in different things because they believe in their own plan sometimes it's sometimes is uh is a plan they know sometimes it's not uh but um in this case like you clearly can see where he goes like he goes into this Pet Project World coin world uh whatever you want to call it uh that um kind of
prevents the AI to um taking over the world and uh everything uh which uh but AI also consumes a ton of energy so you're like you just can't use natural gas like what most billionaires are doing these days just buying natural gas because they want to they want to have uh they want to power the gpus and stuff so he is investing in in a Fusion Energy um research uh and also opening up and actually you can go more than this like you can go into other other things especially other things where things can actually go wrong yes you can have uh ai ai for good AI good AI safe AI but if it goes wrong then yes we can probably have
an environmental catastrophe because there is no way of sustaining that without clean energy uh the same with AI research everyone is worried about oh will they take our jobs I mean yeah if they do then at least they is this idea of universal basic income which is part of the world idea I mean if it doesn't happen then yes Skynet will come and we'll all die or whatever you want to uh so there's there's things there's problems where it can uh go wrong and I guess someone with this Vision will um try to invest in their projects so focusing specifically on two of them um like yeah it's just not just not not only you like everyone is is concerned
about yeah leaders are talking about this is not a conspir conspiracy theory there's many problems with AI talking about this project world because I don't have to present to you chat GPT everyone probably has used it but world uh also known as the crypto YB the cryp YB which you've probably seen if from Portuguese you probably seen this like in the malls and shopping centers and everything where we have this very creepy orb and like people scanning their irises I was with Theo hacking on a hackathon and that kind of sold my I sold my Aries because of an API key uh I remember that because we wanted to hack
with with worldcoin but we didn't have the key that so I was like scanning my or um my ARS so it's it's definitely some creepy thing if you've seen it um so yeah at this point I was not happy because like he's he's here and I'm talking about or ID uh but the truth is that there are different things uh there are different ways of approaching the identity problem what world tries to do is to scan everyone's or so everyone Aries and have some kind of hash some kind of signature over everyone's uh everyone's iries and be able to prove that they are real real people and then you can basically uh do some kind of client side proof uh on
that whatever that whether that's true where they get there or not you don't know whereas ZK passport that that t will show in a in a bit it's more like about using your existent IDs and he'll show you so yeah it's not really the same thing it's just like do two different ways of approaching the same problem so yeah you can you can either just use the Aries as proof of humanity or you can use already existent that depend definitely they are risk because they depend on government issued IDs and everything that's not even clear sometimes governments could not even like give you a an ID or a passport that that's a risk
right um so in regardless of the means like the human has to prove its Humanity if it doesn't happen then it's done right because AI I mean AI can simulate your image it can simulate your voice it can simulate your work it can simulate your code it can simulate could basically just pretend to be human and more and more that's going to be true so you need to prove your Humanity but don't freak out because again people very very uh let's say resourceful people like some and others are working on uh Solutions at the same time as they accelerate um AI so one way of doing it is the Merkel tree is using
the Merkel tree so for those who don't know what the Merkle tree is it could be something like this so there's of root that should be like some kind of hash some kind of encrypted value um and then this would be the hash of two hashes oh doesn't can see it very well right yeah too bad this is supposed to be a hash here and those are a hash of some some IDs that are also not seen and then your ID is just one of them okay so the way that you do just add a ton of um IDs here and you know this one but you don't know the other ones and so if you're looking at what you're looking at um yeah you basically
you can using this technology called zero knowledge proofs you can basically prove that you know what this is without knowing all the other IDs without yeah so that's why it's called zero knowledge because you don't know you don't know anything about you don't know part of the inputs of your program and that's what we'll be doing next in a in a workshop part so this value is encrypted this Val is encrypted this Val is encrypted everything is encrypted except my ID which is also encrypted but I know what it is so you can prove that this is Le uh this is in inside this
tree so yeah the the dark magic is is that is like you prove that you know um your ID uh that it belongs for root root is just I mean it's just a hash so it's it's kind of like you can't actually get anything from that you can so it's a hash it's like one way one way encrypted so you can't actually know anything about it just looking at it so it's it's actually public that's fine but you the dark magic is proving that you know that uh without knowing the encrypted vales in the middle pretty cool right um so at this point you're like like how right and I can tell you that actually
it's not big deal like magic is easy right uh people think that oh I need the PHD in math um but that's fine because you're going to become a PhD in one minute I don't know if you're ready I I'll I'll you're going to one minute and you're going to be a PhD okay just pay attention for one minute so we can start with the basics and here's a little equation so I think you can follow this that's fine everyone can right it's a little equation just um and now so if you're following like okay you all good like I'm I'm I'm getting it now it's easy now the the worst part is done because now you can just observe this like this is
obviously true right uh and you're like proa like this because the problem with ZK is exactly this like it is very complex math and especially everyone tries to make it like this is the easiest thing ever it's not right um and so why am I doing it why I putting in this position it's like this is kind of a taste of how people feel like when I started working with ZK when they started working with ZK which is not long ago like how do we feel trying to understand it and so you can definitely do it Bare Bones like Aztec has done like seven years ago six years or
something just writing the math like dip like just writing C++ math that's fine we did it once but it's it's clunky then people came came up with this kind of idea of circuits where you like have this circum or Halo to circuits uh which kind of look they look like like actual Hardware circuits U but then it's it's a mess because I mean it's just logic gates and you don't know where logic gates are it's very complex uh syntax and so that's why we be we started working on this program program programming language called Noir so Noir is um Z knowledge domain domain specific language so if you're like here for
business you're like why do I care like uh I'm I I want to I want to know how can I sell this and I don't care about how can I about engineering details but uh I'll still convince you because first of all it's cool like ZK is really cool you can prove statements and computation without revealing some of the inputs like you can prove that you are uh one of your identity is one of one of many identities without revealing who the identities are you don't even know them um but it's it's also hard as i' as I've showed you uh it's nice but if you want to use it then it's it's kind of another problem yeah we did have this circuit idea but as I as I've said
before it's not not really not really interesting so we couldn't actually build anything interesting um and especially these days where our attention span if people can spend 10 seconds without looking at Twitter that's that that's not going to fly right you need to need need to be fast right it's it's a price of privacy like yeah people were like going into the malls and S selling their Ires for coins three World coins whatever so people don't necessarily care about um but now you can like and this is why I'm here like you can actually uh try DK passport as SE will show you and and
yeah I mean world is also built with Noir as well Noir is kind of the de facto zero knowledge language these days um so even if you're here for business you want privacy but you want fast privacy right uh you want privacy but you want powerful privacy and you want privacy but also usable and uh some years ago You' go and say oh just read this book Moon math manual or the ther book and just like no no no no way but if you try Noir because it's a normal zero knowledge language that I'll show you that you can will we'll build something uh with it very easily you'll see how powerful it is
because it abstracts away all the all the mathematical stuff if you need to understand math to use Noir then we fail basically that's it so you're like okay I'm here for business I never heard this on on the news first thing is like we don't care like if why why would you want like we're very well funded right we've been doing this for a long time we we are yeah Prett pretty much no problem in terms of like yeah we don't need the publicity we need to we need to spend our res resources in building things that people can use more than actually going and paying to be on the news or something like that it's not our it's
not our thing um we also don't build products so people are like okay do you have a team that can help me build this no we can't do we don't right uh we build we build the we build the technology uh it's it's more about research development um and you are the ones building the products um so if you're as clever as there which is hard but like some people are as clever as there you learn for him uh as you will in a minutes and build products using this technology and I will be here because I in the end like Noir is not difficult uh as I'll as I'll show you and so yeah
I'll definitely code your unicorn in 10 lines of code as long as you do the everything else uh because the easy I would say this days the easy part is actually the the the zero knowledge part then it's how do you Market how do you how do you build a product how do you ship how do you get investment that's that's the biggest problem that you maybe know more than me about that but I'll call the Unicorn for you no problem so the agenda for today is like this learn Mar in an afternoon that's where we'll you'll be able to follow along with um the non technical Workshop technical non-technical whatever however
you feel comfortable and then uh Theo going to present the true private identity verification so it's using um ZK passport passport IDs he will explain it um I I didn't know if this is intermediate or beginner I don't know so I just like just stick around you're going to find out if it's for you or not uh but yeah I'm pretty sure it is cool so uh things that you may want if especially if you are um if you are um planning on following the workshop this is the Discord you may want to have this link if you plan to
continue building with Noir then it's a good thing to have around this is the documentation um website nor.org and that is my link tree um the thing about link tree is that at the top there's um there are two links that we're going to be using on the workshop one is the code space and another one is a is a shet so both for me and for you if you if you want to follow along you missed some step there's all the commands that I'm going to be using so you can you can go back and and uh reproduce it locally uh the codespace is useful if you don't if you don't have a Linux or a Mac for
example or if you don't want to install things uh in your um local machine you can use the code space and it comes with uh two of the tools already okay so so yeah cool all good any I think this is a a point to questions if you have any questions yeah what's the relationship between atic clabs Noir and the TK privacy Focus l21 ethereum yes that's a good it's a good question the relationship is um Aztec contracts so Aztec is a is a a layer two on ethereum
it's a it's a network and the smart contracts can be either private or public so their functions can be either private or public and in any case they are written in Noir so Noir is the language that powers the smart contract if it's public then it's the node side that will execute that and will update public State and everything but if it's private it's on client side because we we think so our our our first principles is that everything that leaves your machine is not private anymore regardless where where you do it if it's not local then it's not private you can't consider it private so um private functions so
private trans C private State it's all maintained by you it's done by you so for that you need zero knowledge proofs and that's why we are using Noir so that's the relationship between the two but you can write programs with Noir just plain Noir like and this is interesting especially for people that don't work with web3 they want to I mean you could do a plugin for off zero or a plugin for uh passportjs or something that uses zero knowledge proof proes for authentication instead of standard hashing on the server side uh thing for example that that is totally possible we just Noir you don't need Astic for anything so that's why we we are not
putting them together we they are different products that we but they are there's this very clear relationship between them yeah what these smart contracts what do they offer and what's the difference between just having my program running locally so how can I create a product yeah good question like uh one if you do uh Noir program and you want to have something some state that is shared uh or even public it public is not too bad but especially if it's private if you want to store something encrypted you're going to face some issues with doing it you can use blockchains you can use like
solidity or evm or something you you you can but you're always going to be uh docked by the message sender and stuff like that so there's again ways around it people have people have done it um but it's it's not it's not it's not easy right the big advantage of a is that that comes built in so uh you just like the the network is aware of this and so the network is kind of uh um allows it's already doesn't do You by default uh so a common question people have is like oh can I do everything that a does on ethereum and after thinking for a while
I would say probably yes probably you could do almost everything uh it just will be so complicated so clanky that you may as well just use atic so but compared to no our programs the biggest thing is like to store something in public that is encrypted it's very annoying to use just Noir um so yeah thanks cool any any more questions yeah you said before but the world coin are they in which way are they using Noir or a yeah they are using just Noir for all I know and they actually use a
different back end so I'm going to explain what the back end is uh but they are using they use Noir and then they use a different proving system on the side but they are it's mostly aren yet exp point and their goal is that when you scan your um like your um Iris you could do it locally like you can actually like buy the this the orb and do it yourself but then all the inference that will be done to prove that you are part of the the membership uh you are me you are a member of the group could be done locally like on phone there was this uh primitive called semaphor that is just a proof of membership uh and they want it to be
local and fast so that's that's why they use Noir yeah but it's not in uh that I know of I think it's not in production like the the currently it's everything it's s aside but it's it's cool because we know that they are kind of in the in the nice path they are not keeping our data uh that's not the end goal so that's good if everything on server s how are they not keeping our data yeah yeah yeah right now they they have at some point they have your data yeah okay yeah yeah right now but again what their research is exactly to not have it so so it's good like it's a good step forward uh yeah more more
questions Okay cool so to follow along yeah you just uh go to this link and you're going to find uh actually show you oh okay it's ZK ped [Music] sorry H sorry oh oh okay uh is this wrong then I I hope this works anyway but yeah you have here uh you have all my socials if you want to follow me or something uh
but most of all have like the sheet and the code space so when you click the code space codespace is just a it's a a machine like a Linux machine that it's running on code GitHub uh servers whatever so I'm going to choose a py kind of a more py machine so it's it's faster you can choose whatever uh and then just create a code space and so this is pre-built so it will still uh take a little bit of time but hopefully it will be fast to uh to create the code space and uh yeah if you're trying with your own machine while this starts I'm going to tell you how can you install
the two important dependencies um so here's the here so you go to that uh other link and here you have the commands so the first one is to install Noir web Noir web is like an updator it's like a yeah it's um it's a nice it's like rest app or uh Foundry app that will will allow you to install uh different versions of of nargo so nargo comes out of cargo in so this is just Ed to nargo because it's Noir um so nargo is like a nice way it's
like a a kind of an everything package for for Noir it compiles it builds it tests it's uh it's a comes with a um Ser uh language server um everything so yeah but if you use the Cod space you don't have to do it like it's already install it's just like if you're doing it you're your own machine that's where you want to run these commands you may actually have to um U like um start a new terminal once you've done this two actually and so and the second one you can also copy installs battenberg which is a weird name
everything in ASC is a very weird name we are famous for having we names for stuff brenberg is um The Proving back end so it's the actual thing that prove uh your zal proof so Noir will generate your uh what we call the witness which is like the solution for your for your program uh kind of solution for a system of equations in a way um and then batenburg is the one that will actually generate the zero knowledge proof so you need both so after you install these both you can run norab sln and I'm saying n because this is the nightly the reason why is
because BB has this latest version 18 0 that was released I think yesterday and it's so much better like in terms of everything so I would like you to use that one okay uh version 80 um so you go with NOAB sln and then BB app V8 and they are compatible so if you run nor alone and then BB up alone it will work as well I'm just I just want you to go and leave on the edge so do you have any anyone has any problem because we have enough time for me to go around and try to help that's that's for doing manually
you can use the space yes uh Zed yeah um here I think this is where did you put the the command did you put them on the read yeah it's on the you open link tree and then at the top you have the sheet and then the sheet opens the gist and here are the commands yeah so it's the best I could do for something that is seen but you are supposed to write it just go through this so you can it's link tree SL ZK
and yeah and the code space is um yeah for some reason it doesn't work or something you always have the code space enter the code space you click on opening get Hub get code spaces or I I think the link actually just immediately gives you the the thing so you can choose here um like whatever machine you want um so you I don't think you pay for this either either you don't pay because it's free it's like 60 hours free or something per month or iPay which is fine as well no problem actually it says the but I believe it
will be free yeah yeah it's it's free yeah yeah have certain amount of I think like the biggest machines obviously have less time but it's it's always like at least like 12 hours free so no problem um cool so when you when you you get basically an um You probably use this editor already like vs code so I'm gonna just increase the size so it's is it good enough I guess right can so oh another thing you may want to just check or at least be aware is the documentation so l.org and here you have
the documentation for why no no big deal um but I'm going to I'm going to give you an idea so good yeah just helping him out a bit sorry it's all good it's all set manually ising manual version cool so this again the code space already has nup so you can actually go and say nargo version for example and it will give you the version that it's installed right so if you have nup installed if you n install it should look like this and the same for bb bb version okay and all of them also have help commands so you go nargo
help and help command and BB help also right so any question just go on a help Command right so nargo has these commands you probably want n Go new so I'm going to draw naron new just call it uh Noir naron new Noir okay and it will start a project nor project it's not a JS project yet but it's it's just a Noir project okay so inside of you you have basically two files one is an Naro Tomo
so if you use rust you know cargo. Tomo this is nargo Tomo so again this uh because Noir is so similar to rust that it's actually we try to make funny names or funny uh I guess puns on on the names here so it's Naro Thal this is just a normal Thal file where you may want to use dependencies like ZK passport dependency for example um and then you have this file main.m okay language server is failing but yeah if you're running locally it actually should give you a nice syntax highlight and and stuff it's really cool and auto complete and so not exactly you have the extension for oh you need to install
link session yes but it should should have install uh nor L yeah so you you may yeah you may need to install the but I don't know why it's not working on the code space maybe I need to fix the uh where nargo oh which nargo yeah maybe I need to point this to the correct um place anyway but you should have some kind of syntax highlighting in the main.m so what what are you looking at you're looking at a very simple example uh it would be like kind of a guessing game say oh can you guess my name I'm
thinking of a I'm I'm I'm thinking of a number can you guess my number and so it's a very simple very simple example so you have X this will be your it will be a private input because it doesn't say that it's public so if it doesn't say that it's public then it's private only you know only client side only you in your machine know what is the value of x and the proof will say nothing about X the proof will only say something about y okay this is uh important so only the inputs that have P are public everything else is private you can even have a circuit that's all private that's fine okay it doesn't make much sense right a
circuit that everything is private um right I mean trying to find use case in my head but yeah yeah sorry we have question yeah foric typ yeah yeah I I'll explain field yeah yeah U yes yeah I think U we might need some I need to recall some basic concepts of DK MH uh it would be nice if you can go through simple example and maybe I have some experience with ccom can you can you EXP explain briefly what the difference oh it's the yes circum I'll maybe do it later because it's a it's just a different way of thinking about it like circum you you
kind of yeah circuit like this would you would have like a component that would check if they are equal thatal strin them to be equal uh it's a different way so maybe we can we can talk later about that but yeah it's just to answer the first question field what is the field it's a it's um an element of a field of um finite field so you can think of it as an integer and just go on with your life because it works for most cases it works like an integer you can you can you can sum it you can multiply it you can divide you can't divide it no well if you divide it you're going to have weird results I mean you should yeah if you divide it and it ends up with a with
the remainder remainder it's going to be messed up yeah yeah it's going to give you a we result yeah so probably want to don't want to divide it but anyway you can treat it as a kind of integer but you can also use integers you can you can use youru weight an integer with it bits that's fine uh so on on the ZK like Concepts it's basically that so this program will generate a zero knowledge proof that will prove that you know an X that is different from Y without revealing what x is so this could be just to give you an example this could be very naively it would be uh number I'm thinking my number uh my
number and this would be your guess and I'm I'm just asserting that my number is different from your guess so basically you are say my guess is that you thinking about number 20 and I can zero I can make a zero knowledge proof saying yeah my number is not 20 okay and you get to proof you verify the proof with the value 20 and you can prove that my number wasn't 20 okay so it's a so one of the classic examples is battleships game where I'm playing against you and you make your shot and I can prove that you have hit
the water without revealing obviously revealing if that's true or not like you just I can prove that within my I have plac my ships in that place they haven't moved and I can prove that you have hited the water you didn't hit one of my ships and similarly I wouldn't be able to prove that you hit uh that like that you hit uh yeah basically that's it like I I couldn't say that I always have to say the truth because you're the only thing you know is your shot I also know your shot uh but you don't know where my ships are pretty cool right but um in order to use like like this uh binary or this program
I wouldn't have to call main one and two maybe just main two right yeah so whoever is a prover that calls this so you prove that one is different from two um and then the verifier will only have two so the verifier doesn't run any program it just runs a verifier uh yeah so it's cool like it just runs a verifier could be a smart contract even so it doesn't even need to be something that is synchronous it can even be a smart contract that says uh yeah this proof is true given that uh the public value is too and where is the verifier in the in this program we'll we'll get there yeah yeah so just to
give you a more um a nice example a very simple example when I said I can code your unicorn in in 10 lines I can actually make it less than 10 lines because I can write right let's say that you are a member of um a Fight Club your bre pit okay your breath pit your that's nice uh beff person like beautiful everything and uh and you you're you want to be want to join this uh Fight Club you need to have a password but you don't want to you don't trust the person that is checking who who is able to join the club or not so you don't want to give them the
password right you want to you just want to prove to them that you know what the password is Right without saying it right it's crazy that you could do something like that so this is actually one line of code with so just to give you that example you could say use um the standard library and this would be hash and then this could be I think it's poson I don't know I have to check the do dentation to [Music] go uh I think standard Library just choose one hash could be hash message could be
shot6 Blake whatever hash you want I'm going to use the easiest one which I think is posidon two so yeah posidon two here just going to copy this this is a simple example of so I'm importing this this is one has I'm using posidon it's not very known if you've done some programming you know sha 256 you know U md5 you know but uh posidon is a kind of a it's a nice hash for zero knowledge proofs it's they just I think it's the fastest one but it it behaves just like any other hash so I'm importing this
hash uh I actually can import more than this I can say posad 2 hash I can import this to so uh here um so basically like what I can say is private information the password right and then public information everyone can know what is the hash of the password right there is no leak of information if I say the hash of the password to the guy to the bouncer of the fight Club is not he's never going to be able to tell what the hash is what the pre-image is it only knows what the
hash is so I can uh password hash can be public and So within my circuit what I am proving as a member of The Fight Club what I'm proving is that if you hash this password it will be equal to the hash that is public so if I hash the password I think I need to uh give it a one I think because it's it requires the number of inputs yeah yeah one input if I hash the password it will be equal to the password
hash and here is your unicorn right this is it like you can have you can make an oo you can kill you can make a better oo zero uh like o zero uh by doing this right because you know you're proving for a login Website login on a website you don't have to send your password anywhere like you usually do you just do it client side great right it's really cool yes so is it using the Mar tree as you were no no no Merle tree is about ZK passport but uh Merle Tre is uh it's actually very obstructed the way as well Merle
tree would be something that you add many values and then you can prove that you know one of them um but it's it's just a symbol it's very there was a library that makes it like two lines as well it's really really cool so you may want to test this before Pro uh just because you want to test things that test that should pass test that should fail that's just normal testing Behavior so first of all you want to know what what do you want to get from it right so what I'm going to be doing first is like just um just getting the value uh just getting the just
actually password would be I don't know what what is that password for the at MO movie uh the eyes white shut uh password is a Fidelio right Fidel yeah Fidelio yeah just gonna just to be oh no okay because it's yeah just GNA make zerox1 two three because it's because it's a field so I don't want to yeah C this is a password like what I want to know is how does the password hash look like first right I want to so I I can sure that be sure that the test will pass us with the correct value so um I can actually print I can go like print
line um so cool that you can just print things as you do it like you could print line hash of password and I hope this works because I I there's no uh there's no syntax highlight so like I'm missing here a semicolon and everything so let's see just going to go into R then n Go test and yeah it says oh yeah yeah it needs to be a needs to be um an array just going to pass an array all right cool oh it's show
outputs so it shows me okay so now I know how my hash of the password should know everyone knows this if the password for my Fight Club is 1 2 3 4 then the bouncer the guy that's standing at the door only needs to know this value which is very easy to memorize 2 5 3 2 a 1 Etc just kidding it could be anything um could be a seat phrase or something so this is Val look so I know like uh for my test I want the password hash to be or expected uh um expected will be um okay say the hash password
hash is this value we worry you don't have to put um you don't have to put in uh in double quotes it works this way so now I'm now if I want to test I'm just going to call make my call to main just going to say pass the main with the values I want which is password and password hash right so my test just to uh say it in English this test will make sure that if I run this if as a prover as a as a member of The Fight Club if I run this program this program
I can prove that I know a password such that when hashed it becomes this value which is publicly known and the bouncer will be able to input into his verifier this value and still prove still be sure that I know what this one is okay so there's a bit of um I say something to get your head around in terms of like proving verifying so my test should pass now I think I hope no failed constraint should it be the same equal oh yes that's it I always forget this thank
you okay nice yeah it should be the same of course uh and cool thing about Noir is that you can actually make tests that are supposed to fail so you go test should fail and I mean in this case I'm going to uh Main and then I mean whatever like uh 0 1 2 3 4 and then whatever password has also one 2 3 4 and this should faile I'm forgetting a ton of things right yeah I forget FN test file um so this one should fail I mean it actually passes because it should fail
okay you know so it's a what did you call the happy path this is a the unhappy path so it's cool like and you can check there's other things you can assort with the test so you can actually have a proper test suit test Suite in your your um program so yeah I don't know any questions are you following along are did you try good nice so at this point I'm going to get to your question like if I am a verifier actually I have zero proof so far right I I I haven't created any proof so let's do it let's I'm just going to clean uh this a little bit just leave
just one of the tests going to go with nargo check so uh just to show what Naro check does it says check a local package and all of of dependencies for errors okay and one thing it does is it will pop out this pro. tomal so this is where you put the actual values you you are looking for fine client side okay don't forget no one knows this only you so the values are ones that we just computed this will be 1 two 3 four and the password hash will be this one I think I need to put them in quotes here because it's a TL file
hey now that's you are good to generate what we call the witness okay it's a weird name but the witness is kind of the solution like it's you can think of it uh if it was some kind of Hardware circuit it would would be the signal that would definitely end up at the end of the labyrinth okay so you can imagine of you can imagine a Zer not proof has a big system of equations and the witness is the one value that actually solves all of them okay so it's kind of complex right but that's fine because you don't need to understand how it works you just go nargo
execute and it will generate the witness for you and that's it like it's in the Target folder and you have the Json which is like the ABI so ABI tells you what are all the inputs all the outputs so the verifier can know what it it's expecting and also the code for the circuit and the this is the witness okay so once you have this you can uninstall an Argo because it's the Noir part is done okay um and what I say it's done is because you have now generated the
witness and the circuit and you have compiled the circuit and now it's up to the prover to do uh its thing now there are different provs the one that we have developed the dtic is the batenburg that's why I told you to install and if you're using the code space you have it here like BB call BB and it's here okay it says your favorit yeah it's you because we are not sure if you're British or American but um yeah it's it's the it's the the pro the actual proof it I will prove your your thing so it will consume these values and generate the proof for you so no problem you can go BB proof and if you don't
know what to do you can call help it will tell you a ton of things which I actually will do because I don't remember so I can go prove and then point to the um circuit file so this target nor Json so my prover knows what to expect what which size is each of the inputs and everything it's just a serialization uh and also at the witness so I'm going to pass W and then pass the witness so Target n gz and oh I'm going to also uh write write the VK okay um VK verification key
okay so you you would think after a while you would think okay then how can I how can I know if the guy is verifying is proving the circuit I am verifying right like I could just uh give you a ZK passport proof but the actual proof is just one equals one you know so that's where verification the verification key comes from so e every circuit every program has its different it changes all the time it's a deterministic but it's it changes so when you are verifying you want to get the verification key so you're sure that you are verifying the same the same uh logic that I am proving right so here I'm just writing the VK to
a file because it's useful for what we're doing next and I'm putting also a Target folder say output Target right I think this is in the in the sheet sheet if you want to copy it so brenberg proof passing the bite code the circuit itself passing the witness the solution to my to my uh program I'm writing the verification key so the verifier can check my proof and then I'm passing the output targets so right VK I think it's underscore right
VK cool now we have like two new Pokémons showing up here the proof on the VK okay and they you can't really see much like it's just a different in coding I think it's binary stuff but that's fine because you don't need to understand it right and now let's imagine that you are The Bouncer and you don't have the actual values you want to I'm going to delete prov. toml okay so now I don't know anything about what is the password okay let's imagine I'm the
bouncer all I have is this right actually I can I'm going to delete the witness as well all I have is this I have the verification key that I created as a verifier I have the proof that I received from the guy trying to enter the club I have the the circuit I can know because I know what the circuit is so I can compile it on my side no problem it still doesn't reveal anything like this doesn't reveal anything if you remove the test doesn't reveal anything zero about what the actual password is but I can still verify that it's true I can go BB verify I'm going to point to the
proof Target proof I'm going to point to the view the verification key again that I created and that's it like I can verify my proof so in nowhere in my code code except on the test there is the actual password it's really cool right um and you're like you know what would be cool if this verifier doesn't have to be a real real person right because this is cool for uh to like two um two sides right but uh what if I want
it to be done in a like non-interactive way and there's where smart contracts can work on okay because you may want to send this proof to a to a blockchain and just use the blockchain to verify something and then you can just trust blockchain because you can trust blockchains yeah any questions so far no cool so now you want to now you want to um put this in a a smart contract fine easy because berenberg already does that for you
okay so for BB help you can go right Sol verifier so web write solidity verifier I don't remember what the so I'm going to ask for help as well and say solid verifier uh just need the verification key Target EK and output and to say contract. Sol right so it's a solidity contract So contract. Sol and there there you have it here's the solidity contract quite complex you don't need to know about it okay it's fine right can just copy paste
it um obviously you don't would don't use this like this you would maybe have a logic like you could use it I don't know uh you would have to pay to enter to enter the fight club for example so you maybe wrap this into your own solidity contract maybe but is this solidity but could be any language there's a guys that have done this for stet it could be anything like there are people working on verifiers for Sol right doesn't make it's just the same this is actually just the logic for verification and the key so no big deal so yeah so if you want to test this real quick one thing you can do is use remix
I don't know if you know remix so in the sheet there's I have this link remix doe.org can can go here should be clickable can go here and open it's an IDE right because Foundry could is hard hat could is whatever um but um yeah it says that no it's not a scam so going to start like a start blank default workspace just start blank blank blank um and just going to create like contract. s just going to copy and paste
my contract here so we can get so we can work with it yeah it will tell me yo please don't copy and paste and say yeah yeah I'm totally doing that uh and cool thing about remix is that it kind of does everything for you so I'm going to just uh zoom in a bit so you just choose whatever um okay just needs to be more than 821 so this should be fine just can compile what what is nightly Bill what happens okay I don't know I just chose a
different one work so now I have the compiled circuit this is just solidity development like if you've done any blockchain development with ethereum or evm chains you have done this so now you can use whatever uh Network you have you can use this VM whatever it's going to deploy so if you check the contracts most of them are libraries the one that you want is hon perier so I'm going to deploy that they said yeah it will fail yeah that's true but there was you could optimize it but I I don't really care now and what the verifier wants is the proof and the public inputs right again
zero information about what the password is like that's the point so you want to check what the what the proof is and as you see here this is actually going to change in the next version because this is unreadable and if you if you try to read it uh yeah it's it's it's horrible if you cut it it doesn't really work and one thing it's very annoying about brenberg in this version but that will change in the next version is that it it adds the public inputs to the to the beginning of the proof I don't know why ises that it's I want them to be separate I just want just to prove because then I want to
send to the contract separately but uh I don't know why like so far but we have one engineer that's working on basically splitting it as it should but one one way of splitting the proof from from private inputs is just I put that on the you can split the proof here just with this ugly command um that I I don't actually know what what it does but um you can use this ugly command and it will spit uh them separately it will yeah it will just uh so here's the proof right there's the huge proof mean this is what we call a
sucin proof it's actually Su it's not too big um other proven systems have bigger proofs so just going to copy this this is going to be my my proof 0x just going to place it here and then my public input it's just the password hash right so uh which is I actually left it in the test here password hash going to pass it here and if I didn't screw up this should perfect uh array value okay I think I need to
put some uh here some track file I think yeah anyway I missed something here I don't know what but uh yeah I guess it's never a demo if it works right so uh but yeah trust me bro it it would definitely work uh for whatever reason it doesn't but um but yeah you get you get the idea like you just send the proof send something that it's um invisible oh I think this actually uh I don't know I don't know it's it's faing but yeah you could do this in a smart contract and so far you could do it I
think only Stark net and evm chains I don't think anyone has ever built it there are some people working in one from Cosmos and another one for Salen I honestly don't know how Sol will do it because they don't have the the N 250 24 compil pre compil but up to them not my problem um they they they don't have the b254 pre compiles do they maybe they have I don't know what it is but just wanted to know what is the thing they don't have you need some pre- compiles like you need the EC pairings and mod x and there are some uh there are some operations um El curve operations that you need to verify these proofs and not all the
chains have even even some of the evm chains don't have it so actually if you go on the documentation there's a list of some chains that have it most of them have it but like famously zync doesn't have it for example so you can't verify Mar proof in a zync um evm even though it's evm you still can do it so I don't know I I I'm not sure if s has all of them but uh yeah cool was do you have any questions did you manage to follow along I guess like this last part is probably not meant to be followed along but it's
just an example of things working but I guess the initial part at least at least getting around the idea of who is proving and who is verifying the idea that this program is run by the pro the verifier is only has the the API and the proof and yeah with that only it is able to to verify something without knowing what it is and you can do if you go to the to the documentation it's crazy because you have things like proving that your signature is valid for public key without revealing
the public key you're like how I mean that's what they do um so those really cool things even things like paring strings passing um passing um emails domains uh you can do you can do so many cool cool things about with with this uh you can sign the transaction without buing your public key yes you can sign transaction with a public key and then use and then use the signature to prove that you know the public key corresponding to the private key where you sign the message with without revealing it it's really powerful really really powerful yeah and
you could do over many curves namely famously the ethereum curve but also the curve that you can use with your uh like face ID so one thing I did with the in in a hackathon was exactly that would use the your face ID to sign transactions and don't reveal who you are just sign just prove that the transaction is valid you could do that we did that to a uh for a safe for um like um for a multi where you don't know who the other signers are just like magic stuff yeah cool how it how is it better than existing systems where you have face
face IID uh it's you know who they are um with a I can unlock my oh oh yes I mean definitely like if you're unlocking your phone that's that's all everything is is on locally so that's fine right this is mostly if you want to for example prove that you own that specific device uh say you have a wallet that is unlock the wallet or you can uh yeah you can unlock the wallet you can sign transactions with your face basically with the same the same way as you unlock your phone is the same way as you sign a transaction so that's basically the end of seed phrases there was no more seed phrases it's really cool and I think
2025 we'll get rid of C phrases for good I think C phrases will be something of the past you'll never use it especially with passports like it's just you use a passport to check uh to access your wallet or recover it yeah you may be asking how can I do this in a web app right this is a if you're a web developer how how can I do it that's fine there's a guide here to do it you U tutorial how to build a web app okay you can follow this one it's it's fine I can show you a web app working for example um stealth drop it's a web app that runs
locally um even on your phone it runs if you have an Android if you have uh if you have um an iPhone it will kill your TP because it uses too much run uh but like you can you can hear I mean connects with the wallets uh going to use a dummy dummy um whatever to signs so you can see here is like I'm I'm I'm claiming so this is executing the circuit you know nargo execute the same thing but it's done on JS and then when it's finished execute it will prove you know PB proof same thing but injs so so you can do it in any web app
and this web app has no back end is everything is front end so it's static it's a static website um which is crazy you could log in into a website that doesn't have a back end right crazy cool I think this is it um if you have questions I mean there I'm going to be I'm going to be here after as well uh oh it's failed to claim to train anyway um now s will show us the the ZK passport what is ZK passport and like
yeah how to use how to use it which is really really one of the cool most known examples of ZK in like in the wild cool