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

Loading player…

Ethereum Foundation 🛠 Introduction to Anon Aadhaar SDK

ETHGlobalWed, Oct 9, 2024, 12:00 AM

An Introduction to Anon Aadhaar SDK! Embark on a journey with ETHIndia, where innovation thrives, collaboration knows no bounds, and hierarchies fade into self-sovereign ownership. The most skilled web3 developers, designers and product builders from all around the globe came together for a weekend-long adventure to advance the Ethereum ecosystem at ETHIndia in December of 2023! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Music] hello everybody I hope that you're as excited as I am for this great hackaton weekend so I'm yanis I'm part of a team called psse um which is Under the Umbrella of Ed foundation and we are working on a protocol called anadar so what's anadar anadar is a zero knowledge protocol that allows you allows you any Indian citizens uh to prove their identity in a privacy preserving way so I'm going to go into deta details but what problem we are solving so let's say that you're um so you're a citizen you have an issuer which is uh the government in the case of Adar is for example the UA Dia which is the signer of your ID so they give you your ID so basically okay you're you have a number you are a citizen or a resident in the case of AD so the the goal of it is is like uh you need to to give your information to a prover and the goal for this prover is like to prove a verifier uh that you're a citizen uh without ring any information about your uh your who you are so that's the that's what we are uh achieving with a um with anadar so how does it work so we are relying on the um eadar um it's also work on the e um uh the masked eadar so we in this PF you have a signature and you have also the ash of the PDF so we are just quaring like these two informations um and these two with these two informations uh we can we're going to check this information so what's happening so um you have you have in the PDF the ash of the PDF which is the ash of all the the contents of the PDF and this ash is signed with RSA so um we are quering the information the signature and the as inside of the PDF we are fetching the official RSA public key of the uid and so we are going to verify the RSA signature so um RSA lets you like easily verify uh the signature so what what is the Innovation here with anonadada is that we are doing it like inside of a snark uh resulting in a proof um that this RSA verification uh was done is the in the proper way uh with um some um inputs with a secured inputs and uh resulting in a proof of residency that does not reveal any information about you so here is um just the logic about the circuit and and how what how it is the the process of proving so you have um so you have the RSA public key which is a public because we need it public because you can use the circuits to verify any RSA signature so to verify to verify that you are um to acknowledge the fact that you uh prove uh uid document we need their public key uh and we need it to be public because um anyone who's uh verifying your uh snack proof needs to um see that uh you used uh the official public as an input um as a private putut you have like the RSA signature um also the PDF Ash is private here because we don't want again we don't want to reveal any information about yourself and you have an application ID so we use the application ID and the PDF Ash uh to Ash it um and the output of the circuit is a nudifier so the nudifier you can see it has a unique ID so let's say that you want to prevent someone like to double spend their proof into your apps um you can use the nudifier to nullify U uh the user so you can verify for example a proof in your phone front end um you query the nudifier and you can send it send the nudifier to to your backend or to your to your uh smart contract and so this this is the variable that you will need to nudify because uh the nudifier is supposed to be the same for uh the same U PDF so um we we did uh we did all the the complicated part so now let's abstract a bit this uh this um complexity and let's unboard you on how you can like use this primitive like into your apps during this weekend so we build the react we build the SDK that lets you simly like import import what we did so what you just have to do is like to generate an app ID you can you can run this small script um and take the the output of this script you just have to add our SDK and our provider alongside your app ID and then you have like a you have a hook and um connect component that you can use into your apps so this this is like a you can do it like under five minutes uh and you can uh add like a um a PRI privacy layer onto your apps uh you can build like C resistance use cases uh and you can build also like let's say that you want to build I don't know like a a Twitter just for other residence you can build it with it like very easily so uh the SDK will serve you like these components um so this is the flow that you you need the you need to do so you need to to upload like your musket add PDF and you need to enter your add PDF so um as I said uh as I show you so you have like um um the extraction part so when you upload the PDF uh we are going to search for the signature and we are going to search for the Ash U so that's what we are doing here and the password help us like to uh first ensure that you are the owner of the PDF that you uploading um and secondly like we need it to query like for example the the a certificate so the certificate is where like all the information about the signature process is stored so um just want to highlight here so everything runs locally meaning that you in the process nothing is shared to anybody about the Adar PDF it's just that everything run in the browser within the SDK so you don't need to send any information to your backends any information to the chain whatever you just need to use the SDK the user upload their documents and they can like locally prove um their identity resulting in a PCD proof I will talk more about PCD after that and so you can use this uh this proof U to um authenticate the user to nudify their interaction uh and stuff so this is everything is handled by the SDK actually just want to highlight that uh what ensure here privacy uh and data security is that uh everything happen like locally on the browser um yes so um in the documentation you will see that you can download like a test PDF so uh this PDF is like a a fake PDF that is emulating the specification of the PDF so it has like a RSS signature uh and you can use it like for developments um in the case like uh so by default uh the SDK will will be able like to verify both the test file and Bo your real um masket addar if you want to test with your real masket addar why why because by default it will just verify the RSS signature and as the fake document and the real document have real signature as as I said earlier what we need to ensure that U it is like really like e that you verifying is by um inputting uh the official public key so in the SDK you have a mode uh you have a testing mode and so if you want like to for examp if you want for example like to use to generate a real proof of your real eadar um and appr proof uh with the following statement I have like a document that is sign I have anada that is signed by the uid so in this case you can uh you can uh um put the testing mode to false um and you will be you will be able like um to uh to generate a real proof uh of your uhar um but yeah you still have like a testing mode you can use like the sign it the sign PDF and the password if you don't feel confoundable like developing with with your real Adar uh it's not something that we we will require you to do like even if you're if you're in your video demo like you're using like the test PDF the sign it PDF uh it's completely okay we we understand that it can be like a uh quite sensitive like to upload your Yar so it's up to you so um let's talk about the proof format so uh in the SDK when you will uh generate a proof um you will have like you will authenticate the user and uh this proof will be written into into your browser uh so what what's in there so you have a type which is uh the the name of our PCD the Anon PCD you have an ID just want to highlight here this ID should not be used it's like just a random uyu ID don't don't do anything with with it is like just a dumb dumb data uh you have a claim so what is the modulus is the the modulus is the public key uh so again you can always uh verif verify that someone like generated like a real proof by quering the the modulus inside the storage inside of the proof uh and you have like also the nudifier so as I said the nullifier should be like the variable that you need to use in order to nullify any inter inter interaction let's say you that you want like to create like a voting platform uh on chain of or of chain uh you can like use the nullifier to say okay so this is a unique user and um assign a Boolean to this to this nullifier and say okay true false does he vot it yes no and then you have like the proof which is a um grow 16 grow 16 proof you have also uh the app ID which is um um the app ID that is the input of the of circuit okay so uh the SD can also provide a solidity verifier um so what you will find in the package Anon another contracts is just um a basic gross 16 verifier uh but to verify proofs on chain you need like to add some more Logics for example as I said you need to check the modulus for example and plus you need to ensure some um cry cryptographic tricks that can be done over verifying snar proofs on solidity so that's why um so at the end I will give you like the the QR code of the gab repo inside of this repo you will you'll have a link to the to the example app in this example app you have like um all the contracts an implementation on how you should verify proof uh on chain uh you can follow this uh this app and another example or copy paste the constructs and the configurations that are there uh yeah so just want to highlight here so don't just use like the the verifier check also like this this example because it have like a some security layer that you will need like to to check to check proofs on chain so um let's talk about like uh what you can you can do this weekend with uh with anadar so anadar can be used like a mainly like if you want civil resistant use cases uh if you want use cases that are um that you want to enable only for other residents um and it can also be used like for anonymous kyc or proof of humanity you want uh your users like to um to prove that they are human so you can basically verify their eadar with anadar and um and you will you will ensure that there are um a another Resident and um and a human um yeah so the prices um so we have uh three tracks we have uh the main track uh which will be um all the application that integrates the the anadar SDK can um apply to this track so the judging criterias will be like the technical implementation uh we are going to check like if you really like use the SDK into your app um also like does it solve a problem into your app um and also like in terms of uix like uh um and the flow of your application and the problem that it that it solve um I'm just uh heading to the to the last one best social best social goods build with anadar so this uh this track is like we are going to judge of course like the technical implementation and um is if an solve a problem in your application but we mostly want to highlight the project that have the more the most potential um social impact and so the best implementation of ananad on mobile so that's a bit a special prize because at first uh we thought about it like because for now um You can only verify our um we can you can only like have the proving flow like on web application so our our are circuits are built with circum and so the back end is gross 16 but you have some way to compile this the the the files needed like to compute the proof uh so they can run natively on mobile so you have two solution to do that you can use a project a project called mpro or you can use Rapid snark uh which is a compiler uh developed by Iden three so this is a bit a bit more Technical and this is a bit more low level but just want to highlight here that you of course like if we have a team that achieve like a real mobile proving by compiling the circuits for mobile uh the there will be it's going to be crazy and super cool um just want to highlight that if we don't have a team that achieve to do that we will still reward like uh the best implementation that runs on mobile so can be like for example a progressive web application so it's going to be browser proving it browser but uh yeah just want to highlight here that it's okay it's okay if you want like to don't have like all the hassle of doing pretty low level stuff you can um you can still build it this way and uh yeah so that's the that's the link to the to the gab repo don't hesitate to pass by our booth uh to ask all your questions

Automatic transcript — names and jargon may be misspelled.