r/reactnative • u/Aggravating_Ice_1213 • 15d ago
Pear: open-source E2E encrypted P2P messenger for Android (React Native + WebRTC, double ratchet) - feedback welcome
Enable HLS to view with audio, or disable this notification
Hey! I'm a French student and I've been building Pear, a private messaging app for Android, partly as a reaction to the EU "Chat Control" proposals.
Messages go directly phone to phone over WebRTC. Servers are only used to find each other and to wake the app up, and they only ever see encrypted data. Pairing is done via QR code (X25519) with a verification code to compare in person. Messages use a double ratchet, and each file is encrypted with its own key.
Features: photos, videos, voice messages, files, reactions, replies, edit/delete, encrypted backups, in-app updates from GitHub releases.
Stack: React Native/Expo, react-native-webrtc, Firebase (signaling), a small Vercel function for wake-ups, a custom Kotlin module.
Honest notes: it has NOT been security-audited, so don't use it for anything critical. I built it with heavy help from AI coding tools (Claude Code); the design and architecture choices are mine.
I'd love feedback on the crypto design and the UX.
GitHub: https://github.com/Louca90/Pear
6
u/xDiablo96 14d ago
Man! These comments... It looks great, don't pay attention to what they r saying
4
u/Romu1us1408 14d ago
So signal....
https://signal.org/
2
u/threespire 14d ago
Why are you trying to roll your own cryptography?
What problem does your app solve?
1
u/Aggravating_Ice_1213 11d ago
Update: v1.7.1 and v1.8.0 are out, and a lot of it comes from the feedback in this thread. Thanks to everyone who read the code and commented.
Honest note: all the code is written by Claude. I'm French, I had the app idea in my head but I don't have the skills to code it yet, and I'm going to study to get there. I choose every feature, the UI and the animations. If that doesn't suit someone, they can just pass their way, I'm being upfront about it.
v1.7.1 (your feedback)
v1.8.0 (new)
Still a prototype, not independently audited, so don't trust it with anything critical. Feedback and code review welcome. Changelog and APK are in the GitHub releases.
1
u/davidbalbino 13d ago
nice project, and props for the honest notes tbh. On the crypto side, if the double ratchet is hand rolled I think is better to swap it for something already reviewed like libsignal (it has client bindings) or at least vodozemac. A custom ratchet is where the subtle bugs hide, even when the design is right. Also take a look at the battery with the app idle. Keeping the peer connection open in background drains a lot, so imo close it when the app goes to background and just rely on the FCM high priority data message to wake up and reconnect. Gonna try the QR pairing later 🙂
3
u/CopiousAmountsofJizz 14d ago
https://i.imgur.com/cLcdSkw.gif