activitypub-e2ee

Integration models of end-to-end encrypted messaging into ActivityPub

Evan Prodromou

Overview

This document considers multiple modes of integration of end-to-end encrypted messaging (E2EE) into ActivityPub. The different models progress in both the level of effort for software developers implementing the integration, and ease of use for both end users and system administrators.

A brief description of each model is provided. Pros and cons of the model are given. Finally, a conclusion is drawn as to the best way to move forward.

This document does not define which abstract or concrete E2EE protocol to implement; that is left up to a separate, orthogonal effort.

Models

None

In this level, there’s no integration of end-to-end encryption in ActivityPub. This is the status quo as of this writing.

In order to get end-to-end encrypted messages, users have to share their account information with other users in the clear, either as part of their bio, or in a private or public message.

Pros

Cons

In this mode, users have a way to set a structured link to their messaging address on another platform. This could be via a link in their ActivityPub profile, or in a special field of their actor object, probably as an extension property.

Pros

Cons

Initiation and handoff

There is some automated integration of one or more messaging platforms. The remote user has a way to specify their preferred messaging platform and address on that platform. When the end user wants to start an E2EE messaging conversation, their ActivityPub client and/or server identifies the remote user’s messaging platform and identity, initiates the conversation, and then hands off the interaction to a client and/or server for that protocol. The clients might even negotiate the best platform to use, based on the end user’s and remote user’s configured accounts and preferences.

Pros

Cons

External protocol support

The ActivityPub client and/or server also support a distributed E2EE messaging protocol fully, such as Matrix. This is either implemented directly in the software, or implemented by a close integration between the ActivityPub software and the messaging software, such as an API or plugin. Each user on the ActivityPub server has a corresponding account in the messaging namespace, such as by domain name.

Pros

Cons

Mastodon API and ActivityPub protocol

An abstract protocol for E2EE is implemented with the Mastodon API as the distribution channel. Mastodon API clients do the encryption, decryption, key management, and other E2EE functions. Mastodon or an API clone provide inter-server distribution of E2EE messages via ActivityPub.

Pros

Cons

ActivityPub API and ActivityPub protocol

An abstract protocol for E2EE is implemented with the ActivityPub API as the distribution channel. ActivityPub clients do the encryption, decryption, key management, and other E2EE functions. ActivityPub servers provide inter-server distribution of E2EE messages via ActivityPub.

Pros

Cons

Conclusion

Of these options, the flexibility of the ActivityPub API and protocol gives a promising path forward. There are many abstract E2EE protocols that can fit well into the ActivityPub API model. It will make for slower growth of E2EE messaging in ActivityPub, but will provide a more robust and secure system in the long run.

Changelog