[Music] Hi everyone. Uh this is Mulvin from Ethereum Foundation and today I'm going to walk you through how to build your ZK app on mobile. So before I getting started, I just want to like uh ask you ask you guys a questions like uh last time when you are using Twitter will ask who use browser like like I think most of you guys use app right just open your phone and click the app and you enter the whole thing is really smooth. So that's another reason why uh making ZK possible on mobile is also our goal. So Mo is show for mobile approver.
So uh with ZK we know that we are enable uh the developers to do a lot of stuff. So mainly about building privacy preserving applications but also uh we unlocks uh the onchain interactions uh with many use case. Yeah. So uh what Moro is it is actually more than just a toolkit. So first of all, it's a ROSS wrapper so that you can wrap all of the functions that you need for your mobile computations, maybe some cryptography functions uh and we can generate the bindings for it and then port it to the mobile platform so that you can run it inside your uh your phone.
So currently we also do some uh very complete uh integration on the ZK proving system including circum hello to no. So if you're going to use that uh use the stack uh after you compile your circuit you can directly use mo to port this compile circuit and generate bindings around it and then you can complete your business logic on your mobile phone. Yeah. And second is that we also u make make this crossplatform. So whether you are developing native iOS or Android or you are using flatter or react native for crossplatform purpose we are all supporting that.
and also the wall was on uh execution environment though uh we prefer people to go for pure native on mobile. Yeah. And next uh we also have a really uh concise CLI. Uh recently we have a really big uh refactor on this but I'll go through it later. So with this CLI you will a uh you'll be able to generate the ROS project uh and you can uh uh you can config your functions and also the circuits you want to use and you can port it uh to the mobile pro platforms with the CLI.
So it's really simple to use. I'll walk you through how to use it later. And also uh we've been trying to lower the developer uh barrier for this to increase the experience so that we have many starter templates you can use. So it includes a lot of like uh you can build a proof of geocation, you can use uh the risk zero integration template for it. Yeah.
And will make a developer uh much more easy to build on top of more pro. And last but not least, if you are not familiar with ROSS or any other programming language, you're just a pure mobile developer, we also have a SDK so that you can directly import on swift or cotlin or uh dart to directly use it instead of like dealing with other ROS thing. So yeah, so let me let let us start uh with the Moro CLI. So uh before it we have a stable version but right now we recommend you uh to clone our ripple directly and install it from the CI directory because we recently have a really big refactor. Yeah.
So that's a way we recommend it and uh just like many other CLIs you can see a full list of commands and help uh with the with with this tag. So there's two main version right now. We will suggest people to use for the first is the main version. So you just clone the ripple and go to the main branch and you download it uh through the CLI directory and you are good to go. So uh the pro is that it's more len and marginalized but also there's might be some existing uh little bug right there.
So if you're using it uh if you face any questions like feel free to come come to a booth or uh go to our telegram group channel we'll have uh you answer really really quick and second is that we have a stable legacy version which is version 0.2.x. Yeah so if you want to build uh without any other issue though it's a little bit heavy but everything uh works fine there. So one thing to notice is that you have also have to update the dependencies in your cargo tunnel to make this work.
Yeah. So up up upgrade the uh dependency to the specific version. Okay. So once you have the CLI installed, you can leverage these three commands to basically build the whole uh pro the whole whole circuit into your mobile apps. So first of all, you can uh initate a project with more innate.
It will give you a ROS bed uh ROSS based project where you can pro the functions you can import uh the uh the circuits the logic of it and then you can run more pro uh more pro build to generate the bindings uh to like generate iOS bindings or cutling bindings uh and uh each of it and also select architectures that match your phone. So for example, if you are writing uh if you are a swift developer, the simulator architecture is quite different from the phone one. So you can choose it uh choose the one you want in during the pro build phase. And last but not least, you can use mobile create to scanfold the template for you so that you don't have to like manually to uh to connect all things by yourself. So you can use mobile create to create uh Android template, iOS template, flut template and react native template uh template that you can use uh to directly uh click and run maybe the circum proof or verification functions.
Yeah. So uh it's actually quite easy to use. These are the programming code uh example right here. So what you need for circum is just two things. the the build wasn't and the Z key that including all of the prover and verifier artifacts inside of it and then uh you can use more pro FFI setup circum circuits to set up the things and then you're good to go.
You can just like run mobile build and mobile create and to get a minimal uh template that runs on your phone and that supports uh they can generate the proof and do verification of the specific circuit you just import and uh it's more than that. So we we know people have uh many different uh use case on this thing. So if you are not using circum noir or hello to that's fine for uh any kind of like Ross function you want to use just import it inside of the the project and then you can use this macro tag called uni ffi export uh we will help you to export the whole thing including gen uh including generate inter uh interface and also the bindings for you inside the mro project. So it's not just uh the ZK circuit with that we have touched on but also uh any functions that would you would love to use on mobile platform. Yeah.
So yeah. So after uh writing the the ROS code inside your uh the mobile innate project and you can run mobile build uh about uh the the bindings. But also if you want to change the circuits you want to update it, you just have to rebuild the project again and then you can run more pro update. We will help you to uh like update the all the bindings and related artifacts to the correct place inside the template or the Android app or iOS app that you are using so that you can continue to build it really uh really quick. Okay.
So that's basically about the usage of uh Moro and then uh we'll dive into the use case a little bit so that you can understand with Moro what you can build and also what kind of reference you can look into before you start hacking. So first of all uh if you know uh stealth node is one of the project from noir and uh we built a mobile version for it uh on top of their noir uh zk circuits. Yeah. So you what you can do is that you can login with your Google account and then uh you can prove your uh organizations the the email will appears uh on on the on on the on the mobile and you can see that uh the people who post this message uh the email domain they come from. Yeah.
And you can also verify whether if this message is direct uh is actually from that person. So if you're looking to build uh uh JWT things, you might want to look into this project and you can use the JWT circuits directly. And next uh we also build uh with Sema 4. So if you're familiar with Sema 4, you can prove your membership. And uh this uh project called Zuma is like uh Luma LU MA but with ZK version of it.
So it can prove your membership that you are already enrolled in an event and you are valid for it without real revealing your real name or the uh the information that you registered on the on the event page. Yeah. And also like we also leverage some like native features on mobile app like you can uh directly open the uh the phone app to scan the QR code or to browse a photo gallery which is much more harder to do on the web uh applications. Yeah. So that's also another thing to go mobile native and uh we know like ADAR is really a thing in in India.
So there's a a project called NRA. So we also have integrate NRA circumcircuits. So we have a react native uh app you can look into if you're trying to play around with it. And also uh some hackers come to me like earlier these days they're talking about they want to prove their locations with uh GPS datas uh to verify whether if this person uh who generate the proof is actually near the space. Yeah.
So this is actually comes from uh Zika verifies. they have built a interesting demo on top of it. So if you're interested uh you can go to the link and uh look for more details and try to build on top of it and uh we know that uh there's a lot of use case on chain. So we try to bridge the barrier by providing the solitivity verifier integrated. So these are the templates that we built uh for circum and nor as well.
So that uh you can like start from this template app and it will it also integrate wallet connect feature so that you can uh connect your wallet and then uh generate a proof and then verify it with a onchain verifier and uh with that you can start like connecting other uh services on chain maybe like DI or other things to make the application possible and uh recently we uh figure out this template called uh risk zero. So if you ever try uh ZKVM uh risk zero is one of it and um it's actually possible to run risk zero on your phone. So we built this template is uh really minimum on flatter. So you can try to uh port your ZKVM program into it and then run it on your phone. So uh I would say it's good for PC but uh it's a little bit slow.
So the general runtime is like 90 second to two minutes to generate a proof. Um so but uh it won't make your phone crash. So yeah so it's good for PC. We also have a workable example on ECDSA verification. So if you are trying to do identity stuff uh you can look into it.
Okay. So that's pretty much about the templates we uh previously we built and that's let let me walk you through some interesting if global projects that we had before. So one of the projects is called moi scale. Uh it's use uh it's for uh photo identity verification. So what it do is that it run face recognition algorithm inside the apo uh secure enclave which is TE and uh and it will generate a proof right so I also use Z uh Rick zero to verify this proof is possible and also some integration of noir as well.
So if you want to dive into uh how he built this thing you can also look into the if global uh page about his uh project. So one cool thing about this is that it it can actually make you verify whether if you this person right here are the same one that on your uh passport. So you just like load your passport and take a selfie right right here and then you can run the face recognition algorithm to verify whether if these two are the same and generate approve for other people to verify it. So it's quite interesting and also another one is called Zeper. So they have many uh advanced things uh wrapped together.
So one of the thing I think is most interesting is that they have a they have this uh wristband as a ser um you can you can do a unlock a lot of new things here. So all of their code is open source. So if you're trying to play around things with this wristband like definitely look into their code and try to build on top of it. And also they uh have a post quantum access control system on top of EIP7702 and uh for the onchain use case and which is really interesting as well. And last but not least uh there's another uh zkist uh called uh genark and also do the integration for it.
So those are the things that the previous hackers have done and what we expect here is to add your innovation in in into it without rebuilding the wheels yourself. Yeah. So just leverage the previous thing and uh let me go to the price a little bit. So uh for this time we'll have a joint price with ZKPDF. So for application check there will be uh three prizes and there's also a one grand prize for infrastructure check and uh we have like gathered a lot of ideas and also group uh good reference that you can look into inside this QR code it will it is also possible to reach here through the ETH global web page.
So no no need to worry it's also it's all on the info page. Yeah. So some topics uh I want to cover. So the credential sharings like with the Z with the sign PDF uh you are able to like uh do some interesting thing on on your educational credentials or your driver lessons or even your citizenship uh uh to do some citizenship verification and those are very interesting topic we want people to look into as well as game and matching app. Yeah.
And for the infrastructure uh track uh one is the unified ZK registry system. So if you think about the current identity system right now some people you might use self or zk passport those uh uh passport based solution to uh create their identity but some of it use PDF or some of it use other way maybe unchain identity. So these identities right now are uh relatively fragment. So uh we want to like explore more on how can we unify this registry system to make the whole thing more complete. Yeah.
It also like uh related to revocation. So if I want to revoke my previous record on a specific group uh can I do it and will it like sync to other my other identity as well and also uh in the middle is the NFC feature exploration. So we all know that uh NSA is a really like uh convenient feature like so we are thinking about whether if people can generate a proof just like you're doing Apple bail or Google pay just give it a top uh and a tap to proof or tap to authenticate to tap to everything. Yeah. So that will be really interesting thing to explore and also uh some native features that we say like GPS or like the uh camera things or uh some uh some device inside your phone that you can leverage and integrate to the scenario.
Uh I think that would be good and also uh last but not least um to is definitely one interesting topic we are exploring right here. So many projects related to Zika TOSS are on the market right now. So uh there are many different base of uh TOSS like MPC base uh TE base or proxy base. So uh TOSS notary is one of the PSC project that use MPC to do uh the uh the ZKTO's thing and uh it is mostly on the web website but we want to explore more on the mobile. So if you are aiming for uh infrastructure check this is also an interesting topic and whether if you can leverage the dig link feature to complete these to notary things but uh this is still very new.
So if you have uh encounter any problems like feel free to come to the booth to reach out to us. Yep. So this is pretty much uh all of the stuff we have right here. And the QR code is the link tree to today's uh slides. So you can find all of the reference that we uh I just covered inside of it and also the GitHub and the uh Telegram group channel so that if you encounter any other issues uh you can directly post a question there.
We'll get back to you very soon. Yeah. So that's pretty much of it. Thank you guys for listening and good luck on hacking Mo and Zik PDF. [Music]
Automatic transcript — names and jargon may be misspelled.