@Dennis Schubert Thanks for the follow-up. Indeed, I naively assumed that an admin would run vanilla code and the client would be untampered but you're right, neither have to be.
@🛫 Brad Koehn 🛬 Initially, I only thought about incoming content. The server would encrypt the plain text message before storage, and the decryption would only be for display. Outgoing messages would have to be plain text and again, the local copy would be encrypted with the public key before storage. But this is moot given @Dennis Schubert reservations.
However, we already are exchanging a couple of public keys between accounts (for the diaspora and salmon protocol), so we could exchange one more so that the encryption could be done from remote servers as well.
I'm not particularly attached to either solutions. I realize now they are bad answers to a hard question. Basically, I took the encryption at rest and brought it as far as I could, and even then I got severely blindsided.
The obvious solution to protect people's privacy is of course to use a purposefully built end-to-end encryption messaging system. Even hosting a single-user node disseminate plain text private data on remote servers.