NOTE: This is still a work-in-progress and partially a close-source project. To view the open source version see here. It has NOT been audited or reviewed. For testing purposes only, not a replacement for your current messaging app. I have open source examples of various part of the app and im sure more investigation needs to be done for all details of this project. USE RESPONSIBLY!

Im aiming to create the “theoretically” most secure messaging app. This has to be entirely theoretical because its impossible to create the “most secure messaging app”. Cyber-security is a constantly evolving field and no system can be completely secure.

If you’d humor me, i tried to create an exhaustive list of features and practices that could help make my messaging app as secure as possible. Id like to open it up to scrutiny.

Demo

(Im grouping into green, orange and red because i coudnt think of a more appropriate title for the grouping.)

Green

  • P2P - so that it can be decentralized and not rely on a central server for exchanging messages. The project is using WebRTC to establish a p2p connection between browsers.
  • End to end encryption - so that even if the messages are intercepted, they cannot be read. The project is using an application-level cascading cipher on top of the encryption provided by WebRTC. the key sub-protocols involves in the approach are Signal, MLS and AES. while there has been pushback on the cascading cipher, rest-assured that this is functioning on and application-level and the purpose of the cipher is that it guarantees that the “stronger” algoritm comes up on top. any failure will result in a cascading failure… ultimately redundent on top of the mandated WebRTC encryption. i would plan to add more protocols into this cascade to investigate post-quantum solutions.
  • Perfect forward secrecy - so that if a key is compromised, past messages cannot be decrypted. WebRTC already provides a reasonable support for this in firefox. but the signal and mls protocol in the cascading cipher also contribute resiliance in this regard.
  • Key management - so that users can manage their own keys and not rely on a central authority. there is key focus on having local-only encryption keys. sets of keys are generated for each new connection and resued in future sessions.
  • Secure signaling - so that the initial connection between peers is established securely. there are many approaches to secure signaling and while a good approach could be exchanging connection data offline, i would also be further improving this by providing more options. its possible to establish a webrtc connection without a connection-broker like this.
  • Minimal infrastructure - so that there are fewer points of failure and attack. in the Webrtc approach, messages can be sent without the need of a central server and would also work in an offline hotspot network.
  • Support multimedia - so that users can share animations and videos. this is important to provide an experience to users that makes the project appraling. there is progress made on the ui component library to provide various features and functionality users expect in a messaging app.
  • Minimize metadata - so no one knows who’s messaging who or when. i think the metadata is faily minimal, but ultimately is reletive to how feature-rich i want the application. things like notification that a “user is typing” can be disabled, but its a common offering in normal messaging apps. similarly i things read-reciepts can be a useful feature but comes with metadata overhead. i hope to discuss these feature more in the future and ultimately provide the ability to disable this.

Orange

  • Open source - moving towards a hybrid approach where relevent repositories are open source.
  • Remove registration - creating a messaging app that eliminates the need for users to register is a feature that i think is desired in the cybersec space. the webapp approach seems to offer the capabilities and is working. as i move towards trying to figure out monetization, im unable to see how registration can be avoided.
  • Encrypted storage - browser based cryptography is fairly capable and its possible to have important data like encryption keys encrypted at rest. this is working well when using passkeys to derive a password. this approach is still not complete because there will be improvements to take advantage of the filesystem API in order to have better persistence. passkeys wont be able to address this easily because they get cleared when you clear the site-data (and you lose the password for decrypting the data).
  • User education - the app is faily technical and i could use a lot more time to provide better information to users. the current website has a lot of technical details… but i think its a mess if you want to find information. this needs to be improved.
  • Offline messaging - p2p messaging has its limitations, but i have an idea in mind for addressing this, by being able to spin up a selfhosted version that will remain online and proxy messages to users when they come online. this is still in the early stages of development and is yet to be demonstrated.
  • Self-destructing messages - this is a common offering from secure messaging apps. it should be relatively simple to provide and will be added as a feature “soon”.
  • Javascript - there is a lot of rhetiric against using javascript for a project like this because of conerns about it being served over the internet. this is undestandable, but i think concerns can be mitigated. i can provide a selfhostable static-bundle to avoid fetching statics from the intetnet. there is additional investigation towards using service workers to cache the nessesary files for offline. i would like to make an explicit button to “fetch latests statics”. the functionality is working, but more nees to be done before rolling out this functionality.
  • Decentralized profile: users will want to be able to continue conversations across devices. It’s possible to implement a p2p solution for this. This is an ongoing investigation.

Red

  • Regular security audits - this could be important so that vulnerabilities can be identified and fixed promptly. security audits are very expensive and until there is any funding, this wont be possible. a spicier alternative here is an in-house security audit. i have made attempts to create such audits for the signal protocols and MLS. im sure i can dive into more details, but ultimately an in-house audit in invalidated by any bias i might impart.
  • Anonymity - so that users can communicate without revealing their identity is a feature many privacy-advocates want. p2p messages has nuanced trandoffs. id like to further investigate onion style routing, so that the origins can be hidden, but i also notice that webrtc is generally discourage when using the TOR network. it could help if users user a VPN, but that strays further from what i can offer as part of my app. this is an ongoing investigation.

Demo

Aiming to provide industry grade security encapsulated into a standalone webapp. Feel free to reach out for clarity on any detailsor check out the following links:

IMPORTANT NOTE: It’s worth repeating, this is still a work in progress and not ready to replace any existing solution. Provided for testing, demo and feedback purposes only.

why are there closed source parts?

@xoron@programming.dev
creator
link
fedilink
13d

Its important for things like the cryptography module to remain open source for transparency and clarity (kerkhofs principles). Open sourcing things like the p2p framework would only put me at a competative disadvantage.

The open-spource version of the project is fully functional and has always been open source. I keep it open because the project demonstrate a unique concept, which is useful to demonstrate with transparency. After seeking support for that version of the project, it is clear that there is no support for a one-man-band and so i deprecated it (and now call it an MVP). i am proceeding in a close source direction as i improve various details like UX and features.

There are several modules involved in the project. Some key parts are listed below

Open source:

  • Cryptography module
  • Signal protocol
  • MVP version
  • Various experiements / blog / website

Close source:

  • P2P framework
  • PWA boilerplate
  • UI Components
  • Storage manager
artyom
link
fedilink
13d

You didn’t answer the question.

@xoron@programming.dev
creator
link
fedilink
03d

why are there closed source parts?

because open source wont pay the bills.

artyom
link
fedilink
33d

Well then you are at a unique competitive disadvantage to other fully open source messengers. In addition I don’t see anything novel that you are providing that they don’t.

@xoron@programming.dev
creator
link
fedilink
13d

the key distinction between this project and other is that its presented as a PWA. A key cybersecurity feature of this form-factor is that it can avoid installation and registration.

artyom
link
fedilink
13d

How is being a PWA an advantage?

SimpleX also let’s you use it without registration.

@xoron@programming.dev
creator
link
fedilink
13d

Not only can you avoid installation, you aren’t locked to a platform like android and iOS.

not true, and now i don’t trust anything else you say, good job

@xoron@programming.dev
creator
link
fedilink
33d

not true

care to elaborate for my benefit? i could stand to learn something if you have some insight. ive tried several grants applications and places that provide funding for open source project. im aware they exist… all rejected me. im sure many are inundated with project submissions that have a more professional quality and able to articulate details better than myself.

don’t trust anything else you say

this is the way. i have open source code so i dont have to ask you to trust me. its why its important for the MVP to remain open source.

Do you plan on charging for this or otherwise monetizing it?

@xoron@programming.dev
creator
link
fedilink
13d

Yes. Im investigating introducing clerk. I hope to use that to create a subscription model. I would like to charge $1 per-month as per the minimum allowed by clerk.

i started off thinking i could avoid charging users entirely given it seems a norm for secure messaging apps to be free. but given the grant rejects and the lack of donations on github sponsors (completely understandable), but its clear that it wont be able to sustain the project.

i also tried google adsense on the website/blog but it was making practically nothing. so i disabled it because it wasnt a good look when it goes against the whole “degoogling” angle.

Pearl
link
fedilink
43d

Can you maybe draw up a chart comparing it to signal, simpleX, element.

Because anything more secure than simpleX in my opinion is just going to be pgp signed messages on an onion or i2p website.

@xoron@programming.dev
creator
link
fedilink
2
edit-2
3d

The project is far from finished and it woudnt make sense to create something as clear as a comparison table. Especially because core features like group-messaging isnt working.

If you have features youd like me to compare, feel free to ask and i can tell you how it it compares.

Some technical details can be seen here if your want to draw your own comparison.

Special Wall
link
fedilink
2
edit-2
3d

If the user trusts the server to serve safe JavaScript each time they connect with an empty cache (which is cleared often for privacy-conscious users), I’m not sure how this adopts a very different security posture from the Trust On First Use security model that’s used by many other apps, even if the app itself implements secure MITM mitigations using data from shared links.

When you have an app with dedicated updates, it is possible to verify that it is genuinely from the developer or maintainer. Web browsers’ certificate validation protects against connecting to a fake server, but it does not protect the user if the server is compromised when they first connect.

The most security-conscious users are going to end up hosting the JavaScript in a webserver on localhost, and at that point it might as well be a dedicated application.

@xoron@programming.dev
creator
link
fedilink
2
edit-2
3d

the javascript-over-the-internet is indeed a concern that has always been mentioned about this project. to address this, im investigating the to use service workers to cache the file. this is working to some degree, but needs improvement before i fully roll it out… i would like to aim for something like a button on the UI called “Update” that would invalidate the service-worker cache to trigger an update.

as for selhosting, i hope to have something more elegant than selfhosting on localhost or using a dedicated app. the capabilities are demonstrated on the open source version and are transferrable. its possible to provide a static bundle that can work from running index.html in a browser without the need to run a static server.

the static bundle of the open source version can be seen and tested to work from this directory: https://github.com/positive-intentions/chat/tree/staging/Frontend

when i reach a reasonable level of stability on the app, i would like to investigate things like a dedicated app as is possible on the open source version. https://positive-intentions.com/blog/docker-ios-android-desktop

Special Wall
link
fedilink
1
edit-2
3d

Okay. Well, in this case it would probably be a good idea to at least have the update process also verify developer signatures, since otherwise it’s not only trust on first visit, but trust every update.

And yeah, I agree that a standalone package might be a good solution, as long as it is signed.

@xoron@programming.dev
creator
link
fedilink
23d

deleted by creator

I Cast Fist
link
fedilink
03d

P2P with E2EE, sounds like Jami

@xoron@programming.dev
creator
link
fedilink
13d

thats right. the key distinction between this project and other like it like simpleX is that its presented as a PWA. A key cybersecurity feature of this form-factor is that it can avoid installation and registration.

floquant
link
fedilink
13d

I don’t know if you could call that a cybersecurity feature. Not being able to install it locally is the opposite to me - I wouldn’t want to rely on the application being served dynamically from the internet every time. Doesn’t seem very decentralized :/

@xoron@programming.dev
creator
link
fedilink
13d

id like it browser-first, but its isnt limited. the features from the open source version can also be applied to the new version. but only worth doing when it reaches a reasonable level of stability.

https://positive-intentions.com/blog/docker-ios-android-desktop

versions control is especially important for cybersecurity and so details will be investigated for the best way to approach this. it would be particularly important to have locked versions that have a third-party security audit, but the project seems far from that.

in an ideal world where i manage to get the main project to be open source sustainably. it would make things more decentralized we can remove having the statics served from the internet like its possible on the opensource version. its possible to provide a static bundle that can work from running index.html in a browser without the need to run a static server.

the static bundle of the open source version can be seen and tested to work from this directory: https://github.com/positive-intentions/chat/tree/staging/Frontend

Create a post

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

  • Posting a link to a website containing tracking isn’t great, if contents of the website are behind a paywall maybe copy them into the post
  • Don’t promote proprietary software
  • Try to keep things on topic
  • If you have a question, please try searching for previous discussions, maybe it has already been answered
  • Reposts are fine, but should have at least a couple of weeks in between so that the post can reach a new audience
  • Be nice :)

Related communities

much thanks to @gary_host_laptop for the logo design :)

  • 0 users online
  • 108 users / day
  • 435 users / week
  • 1.32K users / month
  • 4.54K users / 6 months
  • 1 subscriber
  • 4.61K Posts
  • 116K Comments
  • Modlog