Homomorphic Encryption and Local-First Software: A Trade-off?

2025-06-18
Homomorphic Encryption and Local-First Software: A Trade-off?

This article explores the challenges of using homomorphic encryption to protect private data in local-first software. While homomorphic encryption allows computation without decryption, it introduces significant performance and storage overheads. The author demonstrates the practical limitations of homomorphic encryption on CRDTs by building a homomorphically encrypted 'last-write-wins' register CRDT. The article highlights how homomorphic encryption requires operations under worst-case input assumptions, drastically increasing space and time complexity. Ultimately, the author concludes that securing local-first apps without severely degrading usability remains an open problem.

Read more
Development local-first software

Isomorphic Web Components: Server-Side Rendering Made Easy

2024-12-15
Isomorphic Web Components: Server-Side Rendering Made Easy

The long-held belief that server-side rendering of web components is difficult has been challenged. This article demonstrates how to achieve server-side rendering of existing web components by cleverly using Happy DOM to emulate a browser environment. Two methods are detailed: using the `` tag for direct rendering and emulating the DOM to run component code and generate HTML. The author emphasizes the advantages of this approach: compatibility with all web components, robustness in the face of JavaScript failure, and avoidance of framework lock-in. This solves the server-side rendering problem for web components, offering a flexible and resilient solution.

Read more