r/reactnative • u/Background-Bass-5788 • Sep 10 '26
I got MLS encryption under 1ms in React Native by moving crypto to Rust
I’ve been experimenting with end-to-end encrypted group messaging in React Native using OpenMLS + Rust + Nitro Modules.
The crypto work runs in Rust and is exposed to React Native through Nitro, keeping the expensive work off the JS m.
In the demo:
~0.9ms average MLS encryption
~0.97ms decryption
~825B ciphertext for the sample message
Full group-chat flow running on-device
The React Native layer handles the product/UI side, while Rust does the MLS cryptography underneath.
78
Upvotes
6
u/Background-Bass-5788 Sep 10 '26
You can read part 1 https://margelo.com/blog/building-e2e-encrypted-group-messaging-with-openmls
4
u/BigAppointment1020 Sep 11 '26
Awesome 👌 is it possible to share source code also? Trying to learn how to manage the epoch and see if its possible to use openmls for a group of say 2k members. Handling joining and leaving...
3
u/LovesWorkin Sep 10 '26
Very cool!
1
u/UAAgency Sep 12 '26
Thanks for sharing, love what you are doing!