The problem
The problem is privacy. Most chat apps ask you to trust their server: it can read your messages, or hand them over, and you would never know. GhostChat was built to need no such trust, a messenger that stays private even if its own server is breached or dishonest.
Encrypting messages is only the start of that. It stops a server reading them, and says nothing about whether the server can fake a message, quietly delete one, reorder a conversation, or swap in its own key for someone you're talking to, which is how encrypted chats are usually attacked in practice. So GhostChat assumes the server is hostile: it may relay and store everything, but it must not be able to read, forge or silently alter anything, and each of those guarantees has to be visible and checkable by the people using it.
How it works
All encryption happens in the browser with libsodium; nothing is hand-rolled. The password is split before it leaves the device: one half signs in, the other unlocks a vault of private keys that the server stores but can never open. A 24-word recovery phrase can regenerate every key the account will ever use.
Every message is signed by its author and linked into a hash chain for its conversation. The server enforces the chain, and every client verifies it, so a forged, edited, reordered or dropped message shows up as a broken link. Keys are published in a transparency log, the same Merkle-tree design as Certificate Transparency, so the server can't show different people different keys without the proofs failing.
Files are encrypted in the browser in authenticated chunks, stored by the hash of their ciphertext, and checked against the hash the sender signed before they are decrypted.
“The server relays and stores data it can't read, can't forge and can't silently alter, and each of those guarantees is visible in the product.”