default
Written by
2024-05-18

Don’t Trust Us; One-click P2P Encrypted Chat and Video Call on Saito

The Lay of The Land

End-to-end encryption is a relatively simple and old technology, yet in 2024 there are only a handful of open source applications making it available to the general public, and either come burdened with reliance on trusted-third-party networks or naive, volunteer-operated P2P networks to verify and relay data.

Centralized and naive P2P represent two ends of a compromise between network stability and decentralization, but as argued below, the decentralization of a volunteer-P2P network doesn’t solve the primary security problems associated with centralized networks, and introduces other issues.

The Saito P2P Network gets the stability of a well-funded centralized network with the open qualities desired out of P2P by leveraging an incentivized P2P network. At scale, it allows secure key-exchange without reliance on any trusted-third-party (not even out-of-band) while avoiding the market failures, DoS vectors and funding issues that naive P2P networks face.

This article describes why the encrypted chat linked above, and Saito generally, is more scalable and secure than networks served by private companies, or naive, volunteer-reliant P2P networks. But first it’s useful to explore how we got here:

Trusted Third Parties… why do you need my phone number?

Why exactly do end-to-end encryption applications like Signal require a phone number to access their networks?

There is a practical reason, and there’s a security reason.

The practical reason is DoS: if infinite devices were allowed to join the Signal Network, denial-of-service (DoS) attacks would be trivial as Sybils eat up network resources needed for honest users. A phone number is a filter.

The security reason is identity: phone numbers verify the identify of Signal users so that other users have some assurance they are performing key-exchanges with their intended recipients, not imposters – that assurance is based on trusting Signal as well as the networks which own the phone numbers.

Trusted Networks

An encryption network cannot provide basic service without solutions to both of these problems. Simplicity is an understandable reason why most applications generally make the compromise to direct their users through a centralized network. The big issue in question then is trusting that the Signal Network (to use a specific example) is performing key exchanges without inserting spies in the middle.

Signal does not hide this vulnerability – they encourage users, after performing a key-exchange, to verify, ‘out-of-band’, its authenticity using a Safety Number. Out-of-band implies here: ‘verify through another network,’ like SMS. This effectively outsources key-exchange security to some network(s) outside of Signal; the likelihood of an attacker compromising the exterior network(s) as well as Signal itself is lower, but the effective security is still limited by the trust one can place in out-of-band networks.

Back to Square-One

Security-concerned users are then still faced with the same difficult question that led them to an encrypted chat app in the first place: “what network is secure enough to compare safety numbers (authenticate my key-exchange)?” Of course, the most secure out-of-band network is in-person authentication, where there is negligible risk of a man-in-the-middle attack. This is, to say the least, a major inconvenience.

In person and SIM ID based systems also preclude privacy, as one is necessarily doxxed in the process of setting them up. Saito at scale allows anonymous identities to establish themselves (be it for encrypted chats or otherwise) without a MITM able to covertly sit in between; the secrecy required for such an attack is foiled by robust censorship resistance.

Naive P2P networks likewise fail to avoid out-of-band requirements for security, as they lack strong censorship resistance. And reliance on unpaid volunteers introduces questions as to sustainability and resilience at scale and under adversarial conditions of these networks.

Volunteer-P2P Networks

Networks like Jami and Simplex offer a fully peer-to-peer model with no personal data requirements and no central mediator. These peers are not explicitly incentivized to communicate or to be honest; even if key-exchange is performed through a P2P network, one still must either trust the peers are not malicious or, again, resort to out-of-band authentication in order to verify authenticity.

Simplex, on their homepage, mentions out-of-band security as a feature, and Jami implies it in its instructions to share links to initiate key exchange. In reality, out-of-band key exchange is a requirement, not a feature, for protocols lacking a trustless network secure from censorship, be they P2P or fully centralized.

P2P networks with no, or weak incentive structures are also doomed to collapse at scale as users stop relaying data for free. There is some limit to how much a volunteer P2P network can scale without falling back into closed models; this takes richer and more ambitious P2P applications atop the protocol off the table. This same issue can also rear its head at small scale via dedicated DoS attacks.

Faced with these potential issues, the requirement from more established services like Signal that users present a valid phone number before entering a closed network seem more justified (though distributed network solutions, even if volunteer driven, offer some privacy benefits). If out-of-band authentication is required either way, and a closed network protects against rogue Sybil nodes, DoS attacks and bad incentives, most will end up using and building closed networks.

Saito rebuts this compromise.

Saito – An Incentivized P2P Network

Robust P2P

Saito is a unique P2P model: not only do nodes who faithfully and indiscriminately relay data entitle themselves to fee rewards bundled in the data, but nodes which censor data or otherwise disrupt the network are naturally bypassed thanks to ingenious incentive design: Nodes which fail to cease association with disruptive peer nodes and Sybils earn less than those that cut them out.

To put it simply, propagation is rewarded, censorship punished, and these consequences are meted out without reliance on any corruptible, centralized authorities. The scope of the benefits and how exactly they are achieved are too big a topic for this article, but those curious are invited to start at the Wiki.

Self-funding the P2P network solves the first big problem of an encryption protocol network: the P2P network procures necessary resources at arbitrary scale and naturally punishes DoS attackers. The second problem, enabling trustless and secure key-exchange on a single network, leverages the incentives of the network in a different way.

Native Key-Exchange Security

In addition to self-funding the P2P network, Saito is a probabilistically-finalizing, open consensus mechanism, meaning it grows more and more expensive to censor users, rescind data or monopolize the network as such attacks continue.

These properties, which can summed up as Universal Broadcast, solve the problem of secure key exchange because they can make it impractically expensive to fulfill the censorship step required to MITM attack. Because these messages are universally broadcast, users can always check if someone is attempting to insert themselves between a key exchange or impersonating their target.

This finally offers an avenue to secure key-exchange without trusted-third-parties or out-of-band fall-backs, with the caveat that the security of this network is a function of its fee-throughput. Probabilistic finality should be accounted for in the OpSec of anyone using any consensus network to verify key-exchanges.

Note that the Saito Network is in early stages of growth, which means its ability to offer this feature which prevents the need for out-of-band authentication is still weak.

Big Picture

That being said, Saito makes the entire exchange process, including out-of-band authentication, stone-age-simple. Upon navigating to Saito.io/chat, a key-pair is locally generated. All someone needs to do is click your personal chat link to connect p2p with you and initiate the key exchange. No signups, installs or setup – it happens in a few clicks and seconds.

Even without the massive scale that brings with it massive security, Saito is still a functional and self-sustaining P2P network with a rich, open-source ecosystem and public-key-cryptography built-in. Unlike P2P networks before it, Saito becomes easier to use, more robust, and more decentralized as adoption takes place.

Our vision for Saito is that as usage and the resultant security grows, it will support key-exchanges for the whole globe more securely than any possible out-of-band network. We envision Saito as the de facto key-exchange network for all other protocols offering comparable security to in-person authentication from anywhere in the globe at the touch of a button.

This is a bold statement, but Saito’s consensus security against majority-coalition network operators justifies it. You can read more about that here. We’ve already proven that sustainable P2P networks which place the user as the root of their own security are as easy to use as traditional web apps; see here.

Volunteer-P2P networks such as Simplex and Jami could leave behind their out-of-band requirements, instability and funding issues by integrating Saito as their P2P protocol – we invite anyone interested in digital security as a public-good to contact us and start building.

Get Involved

Saito is built as a P2P PKI network where each user is a node and owns their own key-pair. Features like digital signatures and public-key encryption are built in on the ground floor and serve as primitives for applications which respect user-privacy and autonomy. Because sensitive cryptographic operations are handled either by the consensus mechanism or the client, the burden of application security on developers is largely lifted.

This means that developers interested in building apps which respect the user’s privacy, operate P2P, perform key exchanges or authenticate data of all kinds are no longer required permission from trusted third parties, such as certificate authorities or their derivatives, to do so. Saito offers all these features trustlessly and in an easy to use development kit which can largely abstract away the hardest parts.

Most importantly for developers, the applications give a clear path for monetization without succumbing to centralized models: application hosts earn a large portion of the network fees for being the initial point of broadcast.

A developer who wants to build the next big app does not require the servers, reputation, OpSec or funding of big tech, and can earn money while remaining open source. If building any application that connects people is of interest to you, but you’ve always felt something was in the way, it may have been the security and infrastructure requirements of Web 2.0.

We encourage you to experiment with Saito and leverage our open and secure network; the network itself offers a permissionless way for every user to procure their own security, and the fees earned from broadcasting naturally reward those hosting successful applications. There is no need to obtain permission from a certificate, DNS or any authority to make revenue-generating applications with robust, out-of-the-box security – Saito is a permissionless P2P network designed to scale.

Secure key-exchange is just a building block on Saito – it’s why we made it so easy to implement. How developers compose this ability defines what’s possible on Web 3.

Written by