activitypub-e2ee

Architectural variations

Overview

This document describes some of the architectural variations that can be used to implement the protocols described in the abstract protocols document.

It presupposes the recommended integration model presented in the integration models document, namely, that the ActivityPub API and ActivityPub federation protocol are used as the distribution channel for end-to-end encrypted (E2EE) messages.

Encoding data structures in AS2

For protocols that work over ActivityPub, we’ll need to encode the data structures as Activity objects in AS2. For some protocols, this might mean using extended properties or custom object types.

Public key discovery

For public key encryption, the message sender needs a way to discover the recipient’s public key. We consider multiple methods for this, including:

Conversation archive storage

Actors need to be able to read the backlog of messages in a conversation, especially if the conversation takes place over days, weeks, or years. This requires some form of conversation archive storage.

Validating end-to-end encryption

One model for integration of end-to-end encryption into ActivityPub is to use the ActivityPub API to post an encrypted message to the sender’s server; the sender’s server then forwards the message to the recipient’s server, and the recipient client pulls the message from the recipient server.

As an attack, either the sending server or the recipient server could present their own key to the sending client, decrypt the message, and then re-encrypt it with the correct key. This would allow the server to read the message, defeating the purpose of E2EE.

Changelog