Hi all,
I've seen the recent surge of AI slop all over internet so I think it's one of the worst moment to ask for a design review.
However, as I truly need some advices, I'll take my chance and try to be as honest as possible so you can stop reading early if you disagree:
First, for years I didn't use AI in this app, but this has changed over the past six months and now it has become a solid help even for the crypto part.
Then, the frontend is open source (mirrored from gitlab to github), but not the backend (yet) because I don't want my work plundered before I even get the chance to launch the app.
Finally, I'm only a fullstack developer, not a cryptographer. I've read a lot and done my own reviews, but no one independent has looked at it.
The app already tells people "we can't read your data", and I want it to be true. I'd rather hear it's broken here than keep making a promise I can't keep.
The app is for sharing group expenses (trips, flatmates), sign in is optional. It started as a way to learn Rust (I'm coming from JS / C# world).
Along the way, with all the data breaches and the mass surveillance happening here and there, I decided the server should never be able to read anyone's data (Zero Access) and added the E2EE layer.
Roughly, here's the architecture:
- One random 256-bit key per group. All content is encrypted client-side with XChaCha20-Poly1305 (RustCrypto, WASM on web, native on mobile), random 24-byte nonce, payloads padded to powers of two.
- The key lives in the URL fragment (
/projects/<id>#<key>): the share link is the key, never sent to the server. As i said, no account is needed. - Optional accounts: account key uses Argon2id (password, salt), never leaves the device. Login uses a separate Argon2id proof, and the server stores only its hash. Group keys are wrapped under the account key server-side for multi-device.
- Sharing with a friend's account: X25519 + crypto_box, with a fingerprint to compare out of band.
Where I already know it's weak:
As you can see one of my pain point is the authorship.
Every member of a group shares one symmetric key, and nothing is signed, so any member can write as any other. Some members have no account, only the link. Is per-member authorship achievable here, e.g. a per-device signing key generated on join and pinned by the others on first use, or is a shared-key group with link-only members inherently unable to offer more than "someone in the group wrote this"?
If it's doable, is there a standard construction I should look at rather than inventing one?
Full spec: https://github.com/counted-labs/counted/blob/main/SPEC.md
The open source client code (AGPL): https://github.com/counted-labs/counted (packages/ui/src/crypto.rs).
Thanks for your help.