skip to content
2026#rust#typescript#networking#privacy

kShare

End-to-end encrypted file and folder transfer between two online devices, with no account and no server keeping the files. The receiver sends the invitation and accepts each offer.

The problem

Sending a file to the person next to you still routes through somebody's cloud. AirDrop works until one of you has the wrong phone, and most of the rest asks for an account, uploads the file to a server, and hands back a link whose lifetime the service decides. A transfer between two online devices doesn't need a third party that stores anything.

kShare is the tool for that case. The receiver opens Receive and gets a single-use invitation as a short code, a QR, or a link. The sender picks files and pastes it. The receiver sees who's offering what, verifies the sender, and accepts. The transfer then runs directly between the two machines where the network allows and over an encrypted relay where it doesn't. No service keeps a copy of the files.

Architecture

Rust owns everything that can hurt: identity, pairing, networking, storage, and filesystem safety. TypeScript owns presentation. A Tauri/React desktop app and an Ink terminal client talk to the same engine through a generated client and expose the same security behavior; the TUI adds a headless mode for scripts. A browser client runs the engine as WebAssembly. Browsers don't expose UDP, so it always goes through the relay and offers Auto only.

Each installation holds a stable Ed25519 (a fast elliptic-curve signature scheme) identity in the platform's secret store (or a passphrase-encrypted key file if none is available). Pairing runs CPace, a PAKE (a key exchange where two peers sharing a password derive a strong key without revealing it): the invitation's pairing secret (four words from the EFF long list by default, 15-minute lifetime) never reaches the rendezvous service, which sees only opaque ciphertext and deletes the mailbox once pairing completes. The optional eight-character short code is stretched with Argon2id (a memory-hard password derivation function) into the identifier and key of a sealed envelope holding the full invitation, so an operator holding the whole envelope store can't sweep the 40-bit space at hashing speed. Transport is Iroh (a QUIC-based networking library with NAT traversal and relay fallback) with a fresh transport identity per session; direct addresses travel only inside the pairing-encrypted mailbox and never appear in the invitation.

Two connectivity modes ship today. Auto tries a direct path and falls back to an encrypted relay. Direct-only forbids any file payload over a relay, and enforces it structurally: the data endpoint is created with relay disabled, so a lost direct path pauses the transfer instead of leaking through a fallback. A third mode, Private, is designed to route everything over Tor through Arti (the Tor Project's Rust client) embedded in the engine, stopping on any failure without downgrading. It isn't built yet: no released Arti version passes kShare's startup and clean-shutdown checks on both Windows and Linux, so the engine rejects Private sessions until its leak, failure, and downgrade tests pass.

The transfer itself is a signed offer over a BLAKE3 (a hash function whose output identifies the content it was computed over)-hashed manifest, pulled by the receiver, resumable after a restart, and finalized atomically per file: staged on the destination volume, verified against size and hash, then renamed into place with overwrite disabled. Every incoming path is hostile input: kShare rejects traversal, reserved names, and case or Unicode collisions, rechecks each path's parent directories at finalization to narrow symlink races, and never replaces an existing file unless you say so.

Boundaries

kShare moves files between two online peers. It doesn't sync folders, hold files for later pickup, or deliver to someone who's offline. That job needs a server that stores files, and kShare's rendezvous and relays never keep file content.

End-to-end encryption covers content, not metadata. In Auto and Direct-only, a direct peer sees the other peer's network address, and a relay operator sees both addresses while the relay carries traffic. Private, once it ships, won't claim protection against a global observer or colluding relays. Version 1 has no key revocation: a stolen identity key means a new identity and re-adding contacts by hand. The security review so far is internal; kShare hasn't had an independent audit.