Syncing Keyhive
a year ago
- #local-first
- #encryption
- #sync-protocol
- Ink & Switch introduces Beelay, a new RPC protocol for data transfer between devices, focusing on local-first access control and encryption.
- Beelay is designed to work over HTTPS, WebSockets, or raw TLS, ensuring confidentiality and requiring authentication via Ed25519 keys.
- Keyhive's structure uses 'groups' and 'individuals' for access control, with documents represented as groups to manage permissions.
- Authentication in Beelay involves signing messages and addressing PITM and replay attacks by including audience fields and timestamps.
- RIBLT (Rateless Invertible Bloom Lookup Tables) is used for efficient set reconciliation, minimizing data transfer for synchronization.
- The sync process involves membership graph synchronization, document state comparison, and CGKA operations synchronization.
- Sedimentree protocol is introduced for compacting Automerge commit graphs, optimizing bandwidth usage during document synchronization.
- The common case sync is optimized to reduce round trips, aiming for efficient updates with minimal network overhead.