How Haven Protects What You Write: the Public Key, the Private Key, and the Secret-Code Vault
A jargon-free explanation of how Haven’s encryption guarantees that no one — not even me, not even the servers — can read what you write.
One of the questions I get most about Haven is: "but how do you guarantee no one will read what I write?" It’s a fair question — and the answer isn’t "trust me," it’s math. Let me try to explain it without technical jargon.
Two keys, two different jobs
Picture a mailbox on your street. It has a slot in the front, where anyone can drop in a letter — and a door in the front, which only opens with a key.
- The slot is your public key. You can share it freely, hand it to anyone, publish it on a profile. There’s nothing wrong with people knowing what it is — because knowing about the slot doesn’t give access to what’s inside the box. It only lets someone drop something in, locked.
- The door with the lock is your private key. Only you have that key. Once a letter goes in through the slot, no one — not even whoever sent it — can take it back out without that key.
In Haven, each person (patient and psychologist) has their own key pair like this. When you want to share a record with your psychologist, you use her public key to lock the content. From that point on, only her private key can open it — not even I, nor Haven’s servers, can see what was written.
The problem: what if the letter is too big?
Here’s an interesting technical detail. The type of "lock" used in this system (called RSA) can only lock small things — think something the size of a note, not an entire letter. A journal entry, with full paragraphs, doesn’t fit directly into that lock.
So how does Haven solve this? With what I like to call the secret-code vault. It works like this:
- Every time you share a record, Haven generates a random, single-use code — like a temporary vault combination.
- That code locks the entire record, no matter how big. Fast, no size limit.
- Only then is that small code (not the record) locked with your psychologist’s public key — because a code is small enough to fit in the RSA lock.
- Both locked things — the record and the code — travel together.
On the other end, your psychologist uses her private key to open the secret code first, then uses that code to open the actual record. Two locks, one inside the other — like a vault holding the combination to another vault.
Why this matters in practice
This design has a direct consequence: at no point does Haven — not the server, not me as the developer — hold a key that opens what you wrote. What passes through our servers is just the locked vault, being handed from one place to another. If someone broke into our database tomorrow, they’d find nothing but unreadable text.
This is also what makes it possible to share a record safely: there is no "master key" that opens everything. Each share is sealed specifically for one person, with her public key — so only she can open that specific vault.
This isn’t a marketing promise. It’s the same logic used in end-to-end encrypted messaging systems — just applied to a space built for therapy, not casual conversation.
Check out Haven →Haven is still under development, and this is a simplified explanation of a more detailed architecture. If you’re technical and want the exact details — algorithms, key sizes, data formats — reach out and I’ll show you the rest.