New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Sismo 🛠 An Introduction

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Sismo for an introduction workshop! This workshop is part of ETHGlobal's flagship online event: ETHOnline 2023! ETHOnline 2023 has grown into one of the most exciting events on our calendar, anticipated by hackers all over the world. ETHOnline is a three week long online hackathon with over $200,000 USD in prizes as well as a series of curated summits, celebrating some of the most significant happenings & learnings from the past 12 months in web3. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] Workshop so I will there will be a very few presentation but more like trying out a bit our tutorial our like gorilla plate and stuff like that so I hope you enjoyed um so at this mode what we do is that we leverage zero knowledge proof to enable users to aggregate their identities and selectively declose some piece of personal data directly to Applications I'm going to so here we can see we have 0x1 and 0x2 and we are able to aggregate this data generate a zero knowledge proof of some small piece of personal that are inside it and bring it to an application with what with a single sign-on so SSO flow I'm going to do a demo right now so you will more understand how it works so for a bit of context you run this this demo um last year what we we have done is um we have printed the code of tornado cache with a two meter high artwork so it was a physical um piece of painting and um so two months ago it arrived on Twitter and people ask us to have it and to have a version of it so what we did is we did a lottery to be able to gain this artwork the problem was okay we wanted to gate his Lottery only to users of tornado cache but when you used another cache you can deposit and withdraw a lot of time so it's highly uncb resistant so we decided to also add a way to have severe resistance and to enter this Lottery we use gitcan passport for that so git going passport is a way to you you connect your Twitter your GitHub so it's a bit like doxing because all happened in your public identities and it analyze your activity basically the commits you have made the tweets you have made and based on that it will give you a score of severe resistance and and for instance 15 score 15 is a good score of civil resistance let's say I am human so here uh this movie is very interesting use case because you want to prove that you have used another cache with a very private toilet you don't want to reveal at all and you want also to prove that you have a git gun password so basically the trustee build with your very public uh wallet ens and so using sismo and sismo connects you will bring these two data without revealing the address that was used behind so let's go let's go to the demo um so we have what we call the App Store so it's apps.tismo.io you can go there and try it out you click on demo here and here you can see the lottery registration so basically to this is the application Lottery registration to be able to enter you are going to do a SSO flow sign in with ismo and requesting data from the user to be able to enter the two data we request here is okay I am Wellington education depositor on my net with a score more than 15. so I do sign in with this mode I am redirected to my system so the system data voltage is like a password manager when you import all your different different accounts so this one is a demo one so we can see here there is a lot of icons that I already have been imported I can use show you mine uh the my real one you will see it so I won't do all the when because otherwise I will docks myself but you can see I have a lot a lot of accounts and I import them just once and like in password manager in one password functions you import your different icons when it's imported it's linked to your Vault and in this system what we call the Vault secrets that you will be able to use in zero knowledge proof to prove that you earn these different accounts so thanks to that you will be able to prove to application that you own your different accounts if you want and we will see this later how to use a devex to request some proof of ownership of different accounts but you can also do some membership basically it's what is this membership it's you have groups of all the icons that have exactly the same characteristics for instance here you have the tornado gashi terrain depositor groups if we see the content of the group it's all the deposit on minutes so it's basically all the icons that have made this action so what we are going to do is that we are going to prove in the zero knowledge proof here so all happen in the browser that we earn an account set is inside this group and we are going to send back this proof to the application that will verify it verified of chain or on chain if we take the git gun passport it's exactly the same so you have the group of all the gitken passwords and we can see here the contents and there is a particularity that it's a key value that a group so the key is the accounts and the value is the score of your git can passports and what is interesting here is that you can do predicate or statement around this value the application can request and this is what's happening here that okay you are part of this good but also you have a score that is more than 15 and the application won't know exactly which score I have inside but the application we know that I have more than 15. this is just what is interesting for the application so I do generate ZK proof foreign proof and I will be able to enter the lottery so here the flow the verification happened of chain but it can also happen on chain we have a solidity library that can we can call to verify the proof so we have what we call the Factory The Factory is the UI UI Dev tool that enabled to um to browse the different data groups and create data groups so data groups here are very important because it's a source of data you will be able to use inside your application so we can see here for instance there is around 1 000 groups that have been created so you can go there it's all open and you can like search for instance the Bitcoin passport 1 is here we can see the last generation the Next Generation for the groups are snapshot groups they are run at Daily frequency and you can choose basically the frequency you want for your group to refresh this data um I will show you how we can create a new data groups so you can do all in the UI tool also um you can do a manual group like basically you just put your your addresses your list of addresses or you can use what we call data providers data providers are just a way to fetch data from the outside world so for instance here we have a lot of data providers that have been made by the community also you can you can also code your own data provider that will appear here for all the other Developers so we can create a group together I propose it to use like the GitHub one here you can see the different accounts we have we have like wet three accounts but we also can have like GitHub Twitter or telegram accounts so basically if we do a group of all the GitHub contributors of the repository you will then later be able to prove that to a part of this group without revealing exactly who you are so basically you can import your reputation from your web to activity in this example I'll bring some web to activity and web activity together in one proof so here we can take for instance so let's take I don't know so let's take the foundry one so it's for it's an interesting one I think there is no group for this one so you just need to put here uh the Repository so here we know that there is uh 274 accounts that contributed to a Foundry if you just continue so here you need just to put the description and specification around your data group so other people can can search for groups and reuse them for their own application so when you create groups you just bring data for all the other people to be able to generate Zero Energy proof out of it so let's say um that a group of all the contributors to Foundry so with that type Loops of all all commuters to the so in the specifications what is good is to put the very more precise one like um to put all committers to the Repository okay so let's say a Foundry Vita contributors that are groups here you specify the frequency you want so either once it will be computed just once or we clearly let's put daily because then we will have updated data these days um here public information is to be able then to contact you if we want to change the group or whatever so I will put mine because I'm the one that did the group underscore okay so you see your group is being created what happened here it creates so the factory is a UI tool On Top of the sismo Hub which is a repository that contains all the infra that computes all these groups and put them in medical trees in what we call Poseidon metal tree to be able to use them inside zero knowledge proof so it completes all these micro threads and the root and chain and then it's available for everyone to be used um here what happens so you can see the code you can directly code your own groups by hand as a developers and do really more complex stuff like uh using multiple data providers together Computing some score around it and trying to normalize stuff whatever you want once we have this group so we can do zero knowledge proof out of this group so what will happen here it will be automatically checked if all is good then it will be nursed automatically and when it's merged it's deployed for instance we can see uh an old one uh so you will understand for instance if you see today there was this group that was created and so here we can see that the group is generated the miracle trees are created and then the the groups is the root of all these metal 3 or stand on old chains and then they are available for uh to be used in sismo Connect okay so while it's it's generating and deploying we are going to effectively so use the system connect to an app so we have provided some boilerplates for that you can go to stocks.

sismo.io and we have here all the sections built with small connect um in the overview you will see so exactly what I demote you so you have a button you do you need to to follow the requests you want to do to the you for the users so basically you will say Okay I want that he is part of this group this group and this group so user generates his secret proof in his browser send back the ZK proof to the application your application and you can verify it of chain or Unchained okay so um sorry so if you go to the installation here we have a create system connects uh scripts that will basically set up all the different bowler plate we have so let's start running it what is the name of your project so let's say Workshop so when you start so up the the script asks you for an app ID what is an app ID it's basically when when you create an app on top of this mode it's like when you do um connect with Google you need to register your Hub so the proverb part will allow you only your front end to be able to request data from the user so it's for security reason basically so you create your system connector app so it's very uh it's very easy it's permissionless you just need to to go to the factory again and to create your system Connect app so let's say is global Workshop for This Global motion so it's fun when you add a picture and authorize domain so here you can put like localhost to test in localhost and then once you deploy you can update it to add the authorized domain for your app and by creating this Hub this app you will have an app by this so this app ID is is the one you will put into your piece of code like uh when you install the frontenders and the the system connect button and the system connect verifier okay so you put your ID here it freaking exits um and let's start by the option so we have enough 10 and the Unchained border plate so you can do what depending on your oh yeah sorry I am so sorry isn't better like that thanks so yeah you can um so let's go to the of chain one to start so it will set up an xgs application which is more connect installed in it uh it's okay let's go to shop yeah so here you will see okay you have the Phantom the web you have your button and this is what is used to request rosique proof you have the system connect config while you have your app ID and the different data you want to request and then you have your API your backend to verify to very Facebook okay so when you launch it you arrive it will arrive on a very simple front end that you can modify to just do your needs but here you can see what we are going to request so we are going to request authentication so it's basically proof of ownership of an account and claim requests that are basically proof of membership into a group age you can see the different group ideas here so you can see when we click it goes directly to the different group ID system web contributor for instance okay we do pro resist mode generate escape proof so here you have like six different ZK proofs so it takes a bit more time in the browser to run it's around 2 seconds by ZK proof so if you take a bit of time okay it was pretty fast to verify okay then it's very fast so it calls the back end and verifies the results and prints the result here so then you can use them to do whatever you want storage into into the database or whatever and if you want to update so let's try to update it foreign so here you can see the button it's very easy you just need to put your config oh sorry just need to put your config with your app ID and here you can impersonate accounts yeah and you have your app ID that was automatically filled and you have here the accounts that you can impersonate so you can change this to say Okay I want to so we use Foundry let's impersonate a okay get const which is judges okay I think I've think I did a mistake here okay so we do again your system and we can see here so we have our is global Parry Workshop so it discovers the app ID and changes here so impersonated account so now I use care const let's go see our group how it goes so it's been it's been sent on chain so yeah it will be ready in around two minutes I think so during that time it sound let's try to set up the maybe Unchained baller plate so we will have the Unchained one so we are using Foundry for this one um so I know which you are very familiar with hungry but we also have a package for others but we advise you to use Foundry and we have so this border plate that are all well set up so it's a good I think it's a good reason to start and Foundry directly if you want and it's really like a 10x tool when we compared to to the old others so I really advise you to do it um okay so we start again the create system Connect app let's take again the system app ID so we have this one and we take the and chain one so in this bottle plate you have a front folder where you will have an xgs application with all wagami and VM that will be able to allow you to call directly your contract and you have a SLC folder here with adverb that's all that is using sismo connect to verify the proof so it's very easy you just have to put it here and to import it from this Library so all this is in the documentation also also so in the installation spot then you have a claimery system function where you will have the system connect response that you will be able to verify regarding the data you wanted so you need between the front-end and the back end or here the smart contracts you need to have exactly the same requests otherwise it will fail because you request something and you verify it with if it's different does not correspond specifically it's like a signature when you do a signature you verify your signature against a specific message and you verify that your public key corresponds to the save verification here it's exactly the same so um let's go to I'm I'm going to so yeah we don't have a lot of of time so I'm going to modify it uh to just put our new group ID and to use a notification of type word so I will explain you just later what happened so we are going to say okay I want to verify a claim request from being part of this group so let's go on our so it's almost finished okay let's go to browse our groups okay so our group is here we can see the content of the group so we have all the contributors our gear consists here so it will works in the value the data providers was developed to put the number of commits you have made so then here it will it's interesting because we can do requests of having done like more than 50 contribution into this Repository we take the group ID here and I can put it directly there um now if I go to the button part so we are looking for the system connects system connect button here we see our open free where we have same so our different impersonator address so let's change this one to have the GitHub and let's change our request so here we have our authentication request under our claim requests so we say we need to have exactly the same between the font and the smart contract so we put a vault so here let me explain usable we have created an app and we are doing zero knowledge proof from a user to an application this is up as an updated this app ID is a random number basically inside your system database you have a secret that is stored in the browser in the in the system manager and if you hash and zero knowledge proves this secret with the web ID you will have a unique number The Vault ID that will identify you to the application this fault ID is very important because it can be used as a newly file for your app let's say you you do nail drop you can just store this voltages being used and the user won't be able to claim again his adopt or an option you can use it like a bit more as a user ID into your app and it's like an anonymous user ID but you will be able to authenticate each time and you don't need an email or I don't know or whatever so um so let's go do here just verifying this is okay I think this is almost done um sorry the group 8 is here and here we go okay so when the the create system Connect app has launched it's a you need to launch the local chain um this is you just so you can like you know deploy your contract easily and don't pay each time on your local chain uh sorry I need to go to the Unchained Foundry and launch my chain and same here I will go to the front end and do yam there so all should be explained here I know I have okay so all here should be explained uh you know when you run it you have all this explanation on what to do exactly here so let's go to our new system connects uh yeah it's because I have the off chain one sorry so I will read like launch it again okay so what happened when you launch the front it will also deploy your contract into your local chain and each time you modify your contract it will redeploy into your local changer constructs um okay so here it asks me to connect my wallet okay asked me to just I need to switch sorry so we say I am in this local chain I'm going to use my account I do claim with this more I see that I request only ownership of My Vault ID here it's my random number that will be completed in zero match proof and here we're checking that uh get const which we are incriminating here is part of The Foundry guitar repository group so what happened here is that we download the world group in the browser and we generate the CK proof out of this group so all happen in local in your browser I think this is because the Wi-Fi is a bit slow but let's try again okay maybe let's take another group let's take I think we were going to take the rest when that we already have uh they are going so we need to to change if we change the group we need to change it also in the contracts let's go again I'm a bit out of time sorry okay let's do claim with system again so now we have the rest Gita contributor group we do generate zika proof we are redirected back to the application and we can uh do our claim which is more okay so sorry for that um yeah I think we are running out of time so I won't give you more and uh yeah so if we want to build on this more go to builders.sismo.io here you will enter the telegram Channel where you can ask for help for whatever happens and we will be here doing this report all the weekend thank you for your time [Applause]

Automatic transcript — names and jargon may be misspelled.