Mopro: Building a Native Mobile ZK App with Noir

NoirCon 2 Berlin 2025 · June 2025 · 22:43

Vivian Jeng leads a step-by-step workshop on building a native mobile zero-knowledge app with Noir using Mopro. Participants follow along to run proofs on a phone, a key step for client-side privacy applications. The session was part of the NoirCon 2 workshop program.

Speakers

Topics

From NoirCon 2 Berlin 2025, hosted by Aztec Network.

Transcript

[Music] Okay. Uh, hi guys. I'm Vivie from PSC team and today I'm going to talk about Moro and which can help you to build a mobile native app for iOS and Android. Yeah. So what is Moro? Moro stands for mobile approver. So our goal is to help developers to build a mobile app and we also want to develop a like robust ecosystem for uh privacy preserving mobile apps. Yeah. And there's a link to our documentation zkopro.org.

Yeah. And what we provides the first one is the ROS rappers for supporting different proving systems because for now there are so many proving systems are written in rust. So but but some of them are not like circum and like no our back end is written in C++ and we provide ROS reper for this proving systems and we also uh help you to generate a crossplatform bindings with the same ROSS code. So you can write one ROS code for iOS, Android and and Wson.

And we also provide CLI tools for developers. So it is inspired by Funry. So Funry has so many different functions for developers to easily develop with Ethereum. And we also have like starter templates to quick start the project. So we also provide some like templates for Noir. So you can easily getting start with that template. Yeah. And we also have a management for mobile SDK to easily let you integrate your ROSS code to mobile native.

Yeah. So uh here we we show the example how we use ROS rappers. So because right now the noir doesn't support no nor RS. So we build the binaries from C++ and we use the rust to link to that library and define the interface to use this library. For example, we we use the binary and have a interface called proof ultra honk and then you can send input and witness and the circuit inside this function and it will uh ex execute the proof ultra honk exactly like the C++

code uh does. Yeah. So we have this rosers for prover and verifier. So you can you can just write what whatever you want in Rust and then have a like pro prove and verify function inside. So you don't have to go out to CLI and send back the results from the CLI or you go to the browser and then uh switch different uh platforms. Yeah. And the benefit for writing rust is that comparing to like uh this is the libraries from zk passport

team they develop both swift and cotling code to wrap up the noir back end. Yeah. And you can see there are so different implementation in swift and cotlin. So with with Noir RS you don't have to maintain these two these two platform specific code you just have a rus code and then you can output the FFI with uh UNFI and you can use them in in swift and cotlin so you don't have to maintain this this code yeah so here we introduce how we can get start with Moro so we we provide at the CLI. So you can just use cargo install

Moro CLI. Yeah. If you have installed ROST. Yeah. And you can create a new Moropro project use init. And here is how we define the uh interface you want to use in in mobile native. So here is the ZK email example. If we want to have a ZKL uh circuit proof and you can uh write the ZKML circuit in this in this function and define the uh your input should be SRS pass and the input of the circuit

and then you you can run mobile build to build the bindings for your platform. For example, you can choose iOS and Android. Yeah, if later we have more time, we can I can demo this. And yeah, if you want to update your bindings, you you run the Mo Pro update again to uh update the the bindings you used in iOS and Android. Yeah. And this is how you open the example app. For example, open iOS app, open Android app and react native and also flatter.

Yeah. And this is the like example view that if you are using flatter and then you can have a send code base and have two uh uh platform front end like iOS and Android. Yeah. And for more advanced use you can import any ROS crat. For example, you can just import a simopform RS and for example get uh generate an identity for the simore uh protocol. Yeah. But but here right now the simore is implementation are also in uh for systeming. So they

haven't had a like no back end uh semifor. So maybe it also is a good idea to implement this. Yeah. So if you want to customize your function and then you need to run mobile build again and run more pro update again. And since last Noah hack, we uh we uh I and my team team members also build uh steals nodes for mobile in the nor hack and maybe it's also a good starter to for you to play with uh Noir mobile app.

So we integrate the Google OS in this app and you can log in with Google O and then get the JWT and then use nor circuits to prove the JT is from certain uh organization and then you can publish the post on the uh steals notes uh platform. Yeah. And we we use exactly the same back end uh as the steals nodes.

Yeah. But we also support the markdown in in our mobile native implementation which is not supported in the web uh website version. Yeah. So this very um cool project to hack and I also want to share the benchmark results. Yeah. So we benchmar several circuits uh and actually uh in in most cases the nor is performs better than circum but oh but oh yeah here here's not another not a comparison

between different proving system but so so so in in this this table you can see the like iOS and Android is performs much better than the browser. So it can uh speed out up to 10 10 times faster in like catch up 256 and in mobile in the the app stills notes it also speeds up like 10 10 times faster than uh browser.

Yeah, here's the benchmark. Yeah, for browser it takes me like 3 37 seconds to prove, but it also take only take two and four seconds in in mobile. Yeah. Yeah. So, in if you build a mobile app, you can have a much better performance than if you have web app. Let me check how much time. Oh, I have so much time left.

>> Can I ask the still nose benchmark the browser is is the browser runs on iPhone or the browser runs on Mac? >> Yeah, actually the browser runs on Mac. >> Oh >> yeah, but actually I I should like compare it between like iPhone and >> let's see. >> Yeah. Yeah. So even though the the hardware might be a lot stronger there with iPhone but inside the browsing it's like 37 seconds. >> Yeah. Yeah. Yeah. >> But actually my my Mac is uh M1 Mac Pro.

So it is like older than my iPhone. So from from those platforms you you're calling it recalling the movement from a browser but where it says browser you're actually performing it within the browser sandbox and with Android and iPhone then it'll be calling out to a bind to a native >> I'm sorry >> so with each of the first four uh benchmarks or calling the the trig operation from that browser button in the browser >> to start uh to start proving

>> but where it says a browser that proving will happen within the browser sandbox >> within the JavaScript runs browser >> but the Android and iPhone they'll be calling out to native >> yeah yeah right >> a desktop or >> yeah so yeah the desktop is just write writing like no CLI to generate proofs for Yeah. Yeah. >> Is it because the availability of binaries that makes it much faster in mobile?

>> Um I I think the the browser because if you use the wasen and um Yeah. So, yeah. Yeah. Yeah. It is cannot have the much cap capacity like in in native. Yeah. Because it has to run among all the devices in the in the browser. So, it cannot achieve the performance like in make native. Yeah.

Yeah. Any any other questions? So, so far. Yeah. And I think I can demo a little bit about how to use the CLI. Yeah. So, because I already installed MoPro, so I can use Mor Pro in it. And then I can name the project and for example, Nora come to more pro and you can pick one of the uh proving system or adapters you want to use. So here we if we choose noir

and it just create a templates for you. So you can go to the directory and open this project. Oh yeah. So it will be a a ROSS project. So we can generate bindings from the ROSS code and actually we we have already write the generate noir proof in this m uh mobile FFI macro. So like in the test you can just use the generate noir proof in in your code.

And here's an example how you can customize your your function. For example, it's a hello world, but you can also import rust uh semapform rust or any other crats you want to use and then you can run more build. But actually it takes several times. So us. Oh yeah, but it shows that you can like select the platform you want to build for. For example, you only have like iOS device. You can only build for iOS and choose the one of the architecture. So that is for device and it's for like M1

series simulator and this is for Intel chips simulator. So for example, I choose uh M series simulator and it starts building and it yeah it takes some time. Yeah. So if you don't want to like t like build again and test on mobile native you can just write the ROS code uh to check the like bindings and the function works correctly in in ROST and then you go to mobile native.

Oh, and I can share like for steals note because it has to process the JWT. So actually we write a lot of functions to process the JWT file uh like proof JWT and yeah we have to generate inputs and have a like inal kit in in this protocol and we have to uh for example like use ED25 551

19 to like generate a key pair something like that and then we use the bindings in the uh iOS and Android. Yeah. So we can do a lot of things in ROS and then like send messages something like that and we can just use this functions in in mobile native. So you don't have to worry about there's no imp implementation for like swift or cotlin about this function.

Yeah. Oh, and yeah, I just turned on the steels notes. app. So you can try it on on simulator. Yeah. For example, you want to verify if the the one have submit a valid proof something like that and you can post.

Oh, and we also implement the like internal. So if you have like psc.dev dev domain you can post in this internal channel. Yeah. For example, hello to and publish post. Yeah, >> something like that. >> What one questions like in your experience like uh how how's the defex when building mobile app and compared to web app. Ah >> like because web app also have a lot of

like supports >> like rich ecosystem. Is there any things that you feels better when like doing mobile? >> Actually you know because right now we use AI a lot. So actually for now I think it's almost the the same because you just ask AI to like write this widgets or like write this front end for me and then AI can do everything for you and then the AI capacity is actually I think almost the the same for for building mobile app and web apps. So I think it also lowered the like difficulty for like for people if they don't have any experience in building

mobile app. Yeah. Like like this front end I also asked AI to help me to to build it. Yeah. And you can see the result is very very good. I can imagine that if you want to add like like take a photo and like to know with mobile it's much more easier >> compared to like using laptop. >> Yeah. We also like some GPS. >> Ah very soon. >> Yeah.

>> Will be more easier to do that on mobile >> compared to web. >> Yeah. you you mentioned a a good point because I I think developing a mobile app has many uh advantages for using the mobile hardware like for example the GPS and camera and gallery and like biometrics like your fing fingerprint or your face ID something like that and also integrating the Google O is also easier because they are like for fra they have really complete complete like Google O uh package and very easy to integrate in

in your mobile app. Yeah, I I haven't showed that. For example, I I log out and then I log in with Google again. And it's just like any other mobile app you use in your daily life. And then you choose your account. So it it all within this mobile app. You don't have to redirect to any other places. Yeah. Locking no happened.

I don't know, maybe the internet. Oh no. Okay, I will try this later. But actually the yeah for for this uh I publish on like Android uh yeah I I published the Android APK and you can test it with Google

uh app store iOS app store. So you are interest if you are interested in you can download this app. Yeah. Oh yeah. So the GitHub link is here. If you want to play with it, you can go to this link. Yeah. So that is my talk today and my telegram and GitHub is Vivian Jen. Yeah.

So welcome to reach out to me. Any other question? [Applause]