Keyhive Sync Protocol: Architecture and Implementation of Beelay

This article details Beelay, a new sync protocol for the Keyhive project. Beelay, an RPC-based protocol, addresses shortcomings in Automerge's existing sync protocol when handling numerous documents and encrypted data. It uses Ed25519 keys for authentication and employs the RIBLT algorithm for efficient synchronization of the Keyhive membership graph and document collection. To prevent man-in-the-middle and replay attacks, Beelay incorporates the recipient's public key and timestamps in messages. Furthermore, Beelay introduces the Sedimentree protocol for efficient synchronization of Automerge document content.