Learn Noir in an Afternoon

NoirCon 1 at ETHDenver 2025 · February 2025 · 49:09

Noir aims to let ordinary programmers build zero-knowledge applications as programs rather than hand-written constraints or circuits, abstracting much of the cryptographic math. The workshop builds a password-knowledge example, then uses Nargo and Barretenberg for witness generation, proving, verification keys and a Solidity verifier. The Remix attempt ends with an input-length error, while the Q&A warns that proofs can be reused or front-run and says proof generation generally belongs on the client.

Speakers

Topics

From NoirCon 1 at ETHDenver 2025, hosted by Aztec Network.

Transcript

cool sorry to interrupt I mean feel free to talk later or now whatever so yeah I'm going to show you how to learn uh how will learn in the afternoon I'll I'll totally give you your many back on this free Workshop um and this is uh let's say a beginner Workshop but also something that if you're already working with nor maybe it could be still interesting on the latest syntax or the latest way you do things so yeah so first of all like we're actually going to learn no in one minute okay not not an afternoon it's going to actually I'm I'm updating this to

actually be faster than 1 minute um so so yeah I mean if you're like these people you're like in um this is groc made it great right um so if you're like in a hackathon or something you could be someone oh yeah do you know rust and there's another one yeah yeah definitely I know rust so yeah then just write rest that basically it's purpose of Noir is just if you know rust you can just write rust and I mean you just make a small uh change as that Noir AI will tell you how to do it and you're good to go so that's the whole purpose of Noir is just to be a language you just code it as any other language even if you don't know rust and

so that's it good for you let's see you um later on I'm going to have okay I'm just kidding yeah because may you maybe you don't know rust and that's fine as well I did a know rest when I started working with Noir and and you're like yeah it also can't be really the same right so let's just talk about like how Z kvms are in D kvms um no this was Sor no no this this is not about zkn I'm kidding um this is about learning zero knowledge and my my kind of my beef with d kvms is that exactly they are most of them are not actually uh privacy preserving so that's what you

can do with Noir and you can do with Z kvms so we're going to be talking about that we're going to be talking about Noir and the why is this W thing why do we have a w big event the second edition of an event about Noir and and then yes then we've going to achieve Global piece in an A so it's uh something quite easy to do so let's just start with the zero knowledge stuff um you can bring your own imposter syndrome I definitely have mine uh here with me you can see it um and you're going to see that ZK is actually very simple um if you start with the basics okay so if this is here's a little equation right I think most of us can understand this right so if you're following like you're like

okay yeah so far so good now you can just just observe something right just observe that this is true right that's um I mean why is that is that is that a problem why is that why is that a problem why am I doing this to you um that's pretty much how people like me uh failed when they first try tried to learn ZK you kind of need to have a PhD to write some code and that's why we wanted to do something um so you can definitely go this Bon yeah we did this actually write the constraint system yourself why why can't you do that um we did it and we understood that it was not

great so then you can you have this concept circuits where you can uh you kind of wire things up like there were some kind of Hardware circuits um but yeah you are like this guy and they like where exactly am I trying to make this XR gate or something and this is most this is the state of most zero knowledge domain specific languages write circuits um and then there comes Noir and they're like okay you write a program right um and Noir is made to basically encapsulate all the difficult math and all the complex and the complexity of the cryptography into a language that you can basically work

with so so Noir or Noir like why do we care um DK is cool I'm I don't have to tell you this because you're here so supposedly are interested in about Noir uh you can prove statements without revealing some of the inputs for that statement or computation um ZK is kind of hard as well so yeah people wanted to do something that can be done by written by normal programmers um and then Kev was like yeah like rust let's just do Rust they copied rust basically that's it uh nice guy and yeah after two years or I think more than that it's actually very very

good um and it's it's very fast it's probably the best fastest language you can write on and do actual privacy with it so yeah Noir is the facto ZK DSL these days and I couldn't say this last year I would be lying but now I can right you can trust me if it is like no one in their I mean even Way D he was saying that he was saying no one in their perfect mind would actually think about using another another ZK language uh to write whatever right um this is way I so kind of the big the big boss anyway what do you want you want

something that's fast that doesn't take a t t of time to learn and doesn't take a t time ton of time to prove like your develop your users won't be staring at the phone for 10 seconds like right 10 seconds without Twitter that's not going to happen um you want something that is also powerful that you can do things you can do without this very complex math and then you want to be something that is actually useful that works on a phone for example um yeah that's that's our main goal so some examples and then I'm going to go to the actual beginner stuff where we're going to be live coding you can follow along as well I prepared something for that so A simple guessing game this is a

very simple example we're going to have this one uh because it's the standard um the standard like first example you're going to have uh yeah try to guess my number good luck that's that's the basic circuit so you can have like I mean you can think of a field as kind of a big integer and you're basically saying all the inputs are private except for the ones I'm saying that are public and then you just make your computation and say Pro prove that X is different from Y and that's what the verifier will check that's the main smallest example you have for something that is more interesting and actually nobody has done this yet on web 2 and I don't know why is uh knowing that you have that you

know the hash of a password um we may actually do this for for the workshop today uh where you prove you don't you don't give your password to the website like usually people do just give your password your pass password in in in plain text and trusting https and then trusting the back end to not log your stuff or not start your password in PL text this is not this is not how it should do that in 2025 you should actually send the hash of your password and then send a zero knowledge proof proving that you know what is the what is the the pre-image of that so this is it's it's one line of a circuit right it's circuit that has one line you just

import a hash and then you import uh the the actual plain text uh password and then you prove that whatever the verifier knows that will be the the the public hash that everyone knows that's fine it's hash um is equal to the one the to the hash of the the password that you know without revealing what is the plain text password so this is very secure like your your password actually never leaves your device you generate the proof there and why didn't web to developers pick that up I don't know maybe they don't know about DK I because it's pretty impressive and then semor the the I guess classic example of of semor people

there's actually open uh RNG for for building actual um V4 version of semaphor um inir and so yeah proving you are part of like some kind of real human group and this has been done for uh world world kind working on that um ZK passport pretty much every protocol uses uh this kind of semop for construct and actually today at uh halfast 1 we're going to be here for the out of schedule I would say I mean it's in schedule but not in the paper um we I'm going to walk you through a simple simple Merkle tree and how to use a simple merel tree because it's pretty much uh

I mean there's a big range of solutions that will eventually depend of on you proving what what is a Merkle tree so but is sorry yeah are you think questions yeah sure are you going at some point show sort of how winess generation verus con I will yeah yeah yeah it's is fast like that's that's what people ask me oh but it's not fast I don't care I'm going to tell you why I don't I don't care it's actually it's actually faster in most situations I don't think there's any situation where there's any other faster F language that it's faster than R but it doesn't care we don't care actually it even depends because like you do have

different backend so it then depends on what kind of back end you choose so if you choose um broad 16 back ends then you're going to be faster than you use plish black back ends like the default the one we're going to be using today is a plish uh and you're going to check that it's actually faster than gr 16 in most situations it also depends on your program like it's up to you to optimize it as best as you can right we want to make you write a program and it will be optimized as much as possible but it's definitely up to you if you're Zach you're going to be able to do something that's incredibly faster because you're going to understand what what are the complexities about the underlying system and then this is what I want it's

the app because if you've worked with gratic stain backends you know that you need to download a huge proven key it could be 300 Megs that works for one circuit can you imagine if you're like working with DK passport you have one you have one program that is supposed to work with many different or sorry you have different programs one for each different passport there are many different versions of your passport so if you have an app your user is going to go to the app going to choose what password there is and then the app will download the three 00 megabyte key that doesn't work right what you want is something that you download a 40 Meg app and it comes with it runs every circuit that you want whatever whatever passport

you have right that's the actual product that you want to ship not something that is faster but whatever doesn't work so yeah I don't care about benchmarks nobody cares about benchmarks once you're actually starting to build a product and yeah so I can say this with all confidence Noir is the only usable ZK DSL um I mean you can write code not circuits um I mean yeah again this I was just mentioning about like the the fact that you can have you have to have different zero knowledge different proving keys for different circuits which is not great

um yeah I mean there was the whole thing about the gas cost that yeah definitely anir plish uh solid verifier can be a little bit more expensive but honestly like it's not that you're going to pay for a Gro 16 L1 verification anyway so you're going to always choose an L2 to verify your proofs anyway and then yeah it's just the mobile friendliness of Noir which is a big deal you can actually do things on the phone with the progressive web app or with the native app even better even easier even faster but it works on a phone so I on price 60% of the traffic and maybe more maybe more of the consumer traffic online is on mobiles if you don't work if you

don't make if you make an app that's all great but doesn't work on a phone you're not going to make it okay so yeah about the global Pace in and afternoon yeah I may have oversold that so let's just uh go through the agenda of the workshop uh let's see some Noir toing then we're going to write some nir code and then we're going to prove something okay that's basically cool so there are some links here you can uh maybe Zoom if you want to to to scan this is the Aztec Discord I don't know it's atic Discord should be nor Discord anyway um ping me and I'll give you the nor Discord link this is nor.org this is the documentation um just remember I mean

yeah five yeah 5 hours debugging will actually make you spare 5 minutes reading do mation so yeah choose Choose Wisely and and here is the my link tree has all my socials but also has the workshop resources which is not big but it it's cool because um well going to show you why but there's a Code space that I pre-built so we can skip on the installation of Noir and everything yes what's the best resource for um there is no documentation around like uh building other backends but there was a team working on a plon but plish is dark I'm going to have to go

back to get back to you with like which one is working at this at the time yeah yeah but I I honestly like as a developer I I I don't see a situation where we would choose gr 16 at the back end at this point yeah cool I don't see phones in the air so let's let's get started here so this link I I showed you is for this when you can create a new code actually I'm going to mirror my screen because it's so I don't have to look like this uh this place uh mirror how do I Mirror Mirror

Mirror Mirror Mirror cool yeah much better um okay cool uh okay I guess this this should work yeah so you you'll end up on this on this screen you can choose whatever here um actually going to tell me if if this says I'm going to pay by me it's fine I just wanted to know because I never tried to log in with a different account so I'm curious uh but yeah you can choose whatever machine type I'm going to choose it fairly so we don't have to like wait uh for long time but here it will basically in basically run um VSS

code uh full development um I mean environment that already comes with nargo and and BB and this is useful for today because we don't want to spend much time with uh installing this if you want to do that on your machine you can go to no.org and the quick start tells you how to install nargo andbb you put yeah sure um can I I don't know uh how do I do this uh maybe link tree or uh no link tree won't work just check here come on oh here yeah

okay yeah here so it's you you you'll check in the link tree and then within there's a there's a link but it's you can actually go to I think code spaces uh new there is yeah you got code spaces SL new slor SL tiny code space and it will work also I think there's like new code space something that there was a there's another one that you can use yeah cool can

we can we move on okay take that yes so yeah just choose whatever U machine type this should be pre-built so it will hopefully be fast as well and getting started in meantime I'm going to pull up the Noir documentation because I I of forget about stuff but again you can go to the getting started and what I'll be doing today is pretty much what is in the in the getting started but what the code space does for you is all this installation of Noir and the proving back end so we can basically skip that so yeah as you can see here and I should have nargo here and I should have BB as well cool can you see it should I

um should I make should I zoom in maybe yeah guess so oh come on I told him to not sync my extensions please don't sync so once you create a new code space how do you it it immedately should start one like uh so when you go to code spaces new uh where is that here you should get to this screen and you just click create code space and you will basically start this take picture that you here you can you click just create code space I mean the URL there here

here oh the URL yeah yeah I should maybe like create a subdomain or something um tell me if I'm going too fast right Could Happen reload come on come on why is why is it trying to install all my oh not CU I don't care my my Extensions by the way there's a there's an extension that should be already installed by default that is um nor okay it's somewhere here somewhere here there's

going to be no nor l so yeah this basically it's a really cool tool that will give you not only the syntax highlighting but we always also give you autoc complete it would give you a nice uh uh like um I mean Runners for your test so you can run one or the other it will give you um a language server it will check linting it will format the code for you it's really really uh powerful tool so assuming that the this worked out for you we can basically start and to start we're going to go with nargo Naro new Nar new would be naron new noron

one okay and this started a new program so let's just have a look at this you know naroo it's pretty much like cargo. Tomo like you're going to see a ton of uh the names are inspired by rust because we really like rust so naroo well basically it's the name of your package uh authors and also the dependencies so if you want to import a dependency you're going to be doing that and I'm going to be doing that later on in the next Workshop um also if you want to build a library for example we will change that and then we have the main. Noir which is the actual uh program that you run so it already comes with one by

default so you can already go and write Naro test it will work okay okay no n con one and this will already work okay so this is uh you can start with this boiler plat uh but yeah I don't care so I'm going to comment it out and so let's just have this um just think about this idea of you are a me you are Brad Pit okay maybe not as good looking as Brad Pit but you are Brad Pit so you're you're part of um it's spoiler right maybe it's no it's not spoiler yeah you're a member of a Fight Club um but one thing about the fight Club is

that you want to have password to enter right and it's just like it's just like the website you want don't want to give the password to the bouncer at the entrance of the fight LA because you don't know what the bouncer will do with the password maybe it's interested person maybe it will hack you maybe it will I don't know put it in a notep paper and then sell Note Paper you don't know right um so what you want to do is you want to prove that you know the password without actually revealing the password so how do you do this how do you do that on a phone right like um so let's start with that like first of all you need a hush so actually let's just start with

the plain password okay plain text password okay and you're like oh you're already giving the password no problem this is the private input like none of this will be accessible for the verifier the verifier will only see what is written in with Pub right so this is where you're going to say the password the password hash and so that's it basically your circuit your program will prove that you know this one and that hashing that password will be actually be equal to the password that your verifier knows what it is so when you you basically you go to the

bouncer uh if you're the manager of the fight club you say oh the password hash now is this one and that's fine everyone can know that it's not like people can track you uh by knowing something that is public what you want to people to prove is that they know what is the pre-image of that so for that you need to import a hash basically in your program you want to redo the hashing and by redoing the hashing you are proving that you know uh that it matches the one that everyone knows so you can use STD which is a standard Library if you want to know more about the standard Library it's really great and you can go here on Art language and you have all the concepts

and uh sorry uh here standard library and here you have everything you can do with the standard Library spoiler light is amazing you can do craziest things with the standard library right so so yeah this is just one of the hashes which should be I guess in one of the C prog graphic Primitives and we're going to just use one of them okay so this one it's uh a hash known as posidon hash which is probably the most useful um hash you can do with with ZK so STD I'm going to Hash uh I think it's like POS 2 and then POS 2 I can check in the documentation if I mess it up hash I think this is the one so you are

importing this dependency and now your circuit is just as simple as hash plain text password you also need oh this is a slice so you need to make it a an array and then you're just hashing one input so just plus one and again that's it it just prove that that is equal to the password hash that everyone knows and yeah I see my um yeah the the how can I say the the server language server is not working here but that's fine I can always go and say Naro check and it will tell me I mean if there's any problems it Naro check will give me like an error or

something yes so this private PL text password field how is the prover doing this without knowing that I will do it I'll I'll I'll show you just just now yeah the prover will know the prover is that your user like he knows that's that's the point but the verifier won't the verifier the verifier is the Smart contract is the bouncer of your Fight Club um so that's uh it's really cool right you're going to see that the proof actually doesn't contain any information about what is the plain text password you only contain information about what is the password hash and so this code is actually executed on the client yeah okay on a phone or laptop whatever yeah

pretty cool yeah if you want to run some tests um nargo already has some um cool things where you're going to have like I don't know hash of zerox one 2 3 4 will match something I don't know what's the hash of 01 1 2 3 4 what's the P hash uh I mean I could always like print it out here and see what what it is and then use it as a test for example but you can also have like um you can also have tests that are supposed to fail which maybe this is the good um good thing to try now and say a test that should fail so I know that this if the test fails then I'm good it's supposed to fail so it test test that passes if it fails

right so okay it passed and it should have fail okay this is just I would say just wronger you should have equals uh yeah sure of course that's why it passed um so yeah it passed because it it should have failed and it failed so this is U very simple again you can go to the documentation yes so my aamer to theun yes yes I'm passing one it's the number of inputs you can have because you can have different inputs for uh for whatever reason it asks you for the number of inputs you have so

and for what your question about the prover you actually have this you have this file that is created when you run nargo check and it will create this prov. Tomo file and this is what you're going to be doing on your client usually if you're building like a a web app for a phone for example for a phone app you're not actually going to run nargo at all like you're going to use njs which is uh something I can I will show in the next Workshop in half halfast one um and this is basically the the JavaScript version of Noir which is usually you're going to be doing some kind of Noir Noir react native or going to use some kind of react or I mean

whatever framework you use on your front end and and so you need a JS version for for Noir so so yeah here like you can go and zero like 1 2 3 4 and then the pl text sorry uh and then the plain text password here so just show how how this works I'm going to actually go and say try to Output what what should be the result of this so and say um print line wa print line I'm going to do hash of plain text password just to know what is supposed to be the output so and then

I'm going to Naro test with show output and which will oh of course 1 2 3 for so yeah this should be the hash we're looking for so yeah just going back to the test I can actually now run this as a test that should pass so I can go here and say this test should pass and hopefully if everything goes right it should pass right because the hash posidon hash of 1 2 3 4 is indeed this so so yeah just uh for you so so so you I I kind of deleted everything so you can go print

line and then hash of 0x 1 2 3 4 One and this should print when you run it with nargo test SL SL output it will print what is the hash of that right you could use like uh posan JS or you could use I don't know if there's any online service that will give you the POS hash of something maybe that should be a a nice uh I would say like hackathon project or something I see confused face here is number to to f um when you run Naro check I did did you quote it Naro

execute oh yeah yeah that's that's uh nargo execute I put Ito yeah let's let's let's go let's go there and see what happens so yeah I actually going to copy this one um this hash going to put it in prover password hash and I think this is it yeah so Naro execute right you're saying oh uh I think you need to quote it when you run um when you put it in because it's tho file so it needs to be yeah you need to quote the number that's just a Thal syntax you can just put put this it will try to read it

as a number um so cool I mean if I change something here let just put in E it will it will just not not work right it'll say I mean it will fail constraint it will immedately not not even try to uh um do something so going back to my f which is the correct one cool and you're like cool now I have the witness so what is the witness the witness is basically a solution for your circuit this is something that you as aover only you know but it is like a solution for the for the polinomial problem that is built by Noir so when you run a proof you always need to generate the witness and then you need to prove you do that all

in one go all in client side right so when you run nargo execute that's the witness generation and it's very difficult to understand what it's here like it's it's meant to not not be human well um now you're good to good to prove and that's it about Noir actually because now you're going to the back end right so Noir is only the front end uh language now we need the prover and that's where you can actually have a different provs you can you can take this um this is the you can think of like the ABI of the circuit you have the witness and you could put it in whatever uh back end that supports Noir it will

read it and it will prove for you right so in our in our case we're going to be using barenberg which is the backend that AA clabs developed um and which is already installed in our code space you can run BB okay um the documentation is not great okay it's it's horrible but this this is ongoing work where we're going to actually have a help help command and everything because I don't think anyone have has a help command yeah it's just just horrible but this is uh one of our team members is actually working on this this week but it's not here so um but there's a documentation on the Aztec packages repo you have on brenberg uh page there's

some uh not even documentation but some hints of how to do stuff but that's cool because we only we only need to prove things with it it's not big deal so you can actually go and run R proof BB proof right and if I gave it a different name so I actually need to pass all the inputs here so it was not not uh not great of me so you can pass B which I think is the I can go Target noron Json again if you just do nargo in it without anything it will start an example project and then it'll just use that so I'm going to pass the the program I'm going to pass to witness Target uh noron one. gz and then I'm

going to also say where I want my proof say targets proof and that's it like it errors again just the tooling stuff and here's your proof uh you're maybe like how do I see this right I mean you can cut it I think cut proof right oh uh Target you can see the proof here okay not not with the correct uh thing but there's uh I think in the documentation actually if you go on quick start there is a little snippet you can copy uh yeah to to basically show you the proof how it looks like so I can you

can go here on the quick start just copy the last one and yeah this is uh oh this is actually the just the public the public input so one thing about about about this is like just cut this so you can show I can show you the wall thing so this is a proof so it's a ZK so it's a fairly small proof this is small right you guys know this it's a small proof snark Su non- interactive argum arguments of knowledge right uh yeah arguments of knowledge so and one thing you going to notice is that the beginning of it is actually your public input okay and this is just

how bber works okay uh but that's fine it's public right you can just uh do it and that's I don't know exactly why does brenberg append the the the the public input to the proof but actually when you use it on a on a smart contract the smart contract will likely want it separated so you want to you want to split there's a the njs will do it for you actually just split the the public inputs from the from the proof this is the whole thing like you you have it right now you want to verify this you're like okay good now imagine I am the verifier if what happens if I want to verify this right so in another machine you just have the circuit you have the

proof and you know nothing besides the this hush how do I verify it right that's that's the question you you want to ask yourself so I can actually start a new code space with that but I'm not going to just trust me so you need to generate a verification key the verification key is a very important piece of the circuit because if a circuit changes it has a different verification key so you want your verifier to be sure that he's verifying the proof for that circuit not a different one right otherwise you could just do whatever uh so the verifier will actually have to take the circuit compile it as we did it the no execute

Naro execute no sorry Naro compile that will give you this ebi right this ebii has all the bite code for the for the program also has the plane code apparently um for for the circuit which is fine like that doesn't reveal any information um and with this you're going to generate what is what would be the verification key for these circuits so I don't I don't exactly recall what is the right VK uh I think it's right VK and then it's going to be going to Point Let's imagine that I'm I'm another machine I'm going to point to my circuit I just compiled it I'm going to go

Target noron one. Json and this should be it cool so again I didn't need to I didn't need the input to generate the verification key it's there you can use it right and so in this other machine you have the verification key and then you're going to receive the proof by uh I mean the guy at the bounce the bouncer at your Fight Club are going to get the proof but you have generate the the the verification key on your side want to be sure that the proof that you get is actually for the circuit that you want them to prove for so now you can verify you can go on BB verify and to verify you're just going to pass I think you

still need to pass this um the VK VK uh or I think it's key um I don't even know exactly Target VK and the proof right this this is all information you have about it's just verification key that you generated this the circuit that you generated and the proof that's the only thing that reveals nothing about uh the private input uh so so you're going to go past the proof which should be P I don't know going to check the Ducks I don't know documentation will tell me verify K oh I I okay cool oh cool yeah obviously you don't even

need the circuit you just need verification key so so you can actually go here and say BB verify you just pass the key and say Target BK and then the proof Target proof and that's it like it's kind of silent but it works if you change the circuit if you change the proof it will to the file uh I can I can change easily change the proof here but um that's it you say I don't need to input out the the the public inputs that's fine they're public right so you can and now another thing you may want

to and I don't know if I think we're going to have another Workshop so but I don't see anyone so I guess we can just keep going uh which is you're like cool this is great works on my machine hopefully you want to do this on a smart contract and big advantage of doing that on a smart contract is that you don't actually need to have someone else in specific to verify your circuit and this is useful because in the case of the fight club you have one bouncer I mean there's only one person at the door but if you want some kind of uh if if your fight Club is very is you have a a lot of them like it's a franchise thing or whatever you may not want to trust the

bouncer right so you're like what if I could have some programming Cloud that will always verify my proofs and I can be perfectly sure it will always verify it will never cheat we'll never say that yeah yeah this person knows the password right uh so that's the big advantage of doing that in a smart contract and cool thing about about BB is like it generates a smart contract for you right you can go BB contract and I I don't think it needs anything else yeah just BB contract uh like it already gets the VK from here and generates a contract contract looks terrible but that's fine you don't need to understand it um but this is basically what the verifier is doing right this is the math that we

hide for you from you uh in in solidity form so now you can actually uh deploy this contract so I can go uh I don't know if you know remix I suppose some of You Know Remix is a nice IDE on the web that you can use to quickly generate smart contracts compile them and everything so I can go to remix project.org going to run the IDE I'm going to start a new program new um thing no how it was way too okay create blank going to create a blank project going to create a contract here

it's going to be C.A it's going to be the same one just going to go to the to this code space to this contract that it generated going to copy it paste it on the IDE it will complain because it say oh you shouldn't trust this yeah I trust um and now you can compile it so actually I'm just checking what's the version for that that's um 84 that's weird but yeah you can basically use any compiler um oh yeah you need to um optimize it if you know the stack to dip thing it's very very annoying you not you need to optimize it this is ultra plun so this is the old

version of of Noir it's the one that's cheaper to verify on chain it's also I I think it's not still not the default that it should be the default the default now or the default should be the honk verifier which is the fastest proof that we have so yeah I'm showing you the old one that's fine so it did compile and now I'm I'm good to actually deploy this I'm going to use just the remix VM I'm just going to choose the ultra verifier or deploy I do have a contract here you can actually get verification key see this is the the cool thing you can actually see the verification key so you know that you're going to verify the circuit you are supposed to be verified and now I'm

going to go to my code and I'm going to split it right with this thing I I used just to get just the public input I don't need to I actually I can I have the public input here right there where is it yeah here just going to put my public input in my proof it will say my public input um I'm going to yeah I think this should work and then my proof um what I want the proof I actually want the tail not not the head so I want the tail or

uh I don't know if I know too much about the to but it's good I can just uh I guess copy the rest of it something like that let got copy oh no oh it's it's here yeah where is it oh because it has a zerox just going to cool so this is the rest of the proof just going to copy the whole thing and here can copy it can go to back to the remix ID just going to put the ZX at the beginning and hopefully this should uh it's odd length Okay maybe need a zero before because odd

length um array value um which one is the odd length maybe this one is the odd length I mean it has to fail right it's uh anyway yeah it should should should work usually me just check veryify public inputs so I'm definitely doing it correctly I think we might have to be kicking you up soon yeah yeah that's good is that cool yeah we're finished actually yeah we give you yeah yeah so it's cool I mean we going to be here again at halfast 1 with a more advanced example if you even

if you're beginners you're free to feel free to come uh it's going to be cool going to show something working on a phone yeah thank you I don't know if I have any questions since I'm not we're not being kicked out yet so um I had a um so the when you generate the witness and the prover are those sensitive can I use those to like do a re-entrancy for whatever you did the first time you can yeah so when you generate them locally and then you make the proof you best practice to just delet those off of the client or is there a sa way to do you

need to keep those around for anything you don't keep you don't have to keep them around but they are they are you can you can do some kind of reenters in attack where especially smart contracts say oh here's my proof I mean your node can actually steal the the transaction from you in front R you so you need to you need to be careful with that there's a actually at at half Workshop we're going to show you how how can you do how can you avoid that okay but there's a but usually if your prover is on a phone or something or it's proving you can keep the proof around it's just a data it's just stays on a phone and then the witness is the witness more sensitive than the pro no neither of them um neither of them you should be putting them on chain or anything but there will

always be on is sensitive yeah yeah the same they they are as sensitive yeah I mean the proof you don't want to you don't want to reveal the proof the the proof you want to reveal but uh it can be uh it can be reused because the proof is how I what I actually submit to the sequence Ser or the sequencer no yeah in a transaction in the case of of solidity or locally orber BB thing is how you take the appr and the witness and make the actual proof yes and that also happens the client yes and then you were saying a smart contract does that CU there's an account contract is something I keep

hearing about and that's something that would actually generate its own proof uh no I mean it you generally don't want a smart contract to generate the proof some people have done that with like I think there's a talk later on with the guy from near he's going to probably talking about that I don't know but I would say that it's probably where he's going he's going to we're having a proof being done on a on a distributor machine like uh like near and this is doable but I there's little scenarios when you wanted to actually give private inputs and get a proof back right usually want the smart contct to verify or proof you want to proof to be private you don't want to reveal the information if you ask someone if you ask the smart contact to generate the proof then

you're telling them the private inputs right so that's kind of fits purpose but it's doable yeah cool there's someone for the workshop so cool see you later I'm going to hang around as well so thank you