THE AEGIS PROTOCOL

The server knows nothing.

Zero-trust file transfer. Built from first principles.

View on GitHub
01

The Problem

Every mainstream file-sharing service asks you to trust the server. That trust is misplaced. Dropbox holds your encryption keys — a single breach, a single rogue employee, and every file is readable. Google Drive scans your content for advertising and is one subpoena away from full disclosure. iCloud held master keys for years before even offering an opt-in alternative.

PGP solved the cryptography decades ago, but never solved the experience. Key management is a discipline, not a feature. Ordinary people do not publish public keys or verify fingerprints over a second channel.

Existing solutions ask you to choose: security or usability. Privacy or convenience. Correct cryptography or something that ships.

"No existing solution gives you all of it."

02

The Principle

Aegis is built around a single invariant: the server must never possess knowledge. Not the file. Not the name. Not the sender. Not the recipient. The server is an expensive, blind USB stick — it accepts encrypted blobs and serves them back. Nothing more.

This is not a policy decision. It is an architectural guarantee. The encryption happens entirely on the client, in Rust, before anything leaves the device. Keys are never transmitted to the server. Metadata is noise. A full server breach reveals exactly nothing.

Five layers of defense, each independently verifiable:

01Client-side encryption — server never sees plaintext
02Ephemeral keys — each file gets a fresh keypair
03Split-key sharing — link and key travel separately
04Zero-knowledge server — no logs, no identities, no content
05Noise Protocol P2P — server-bypass direct transfers
03

The Protocol

Aegis is implementation-agnostic — any conforming client or server that adheres to the message formats, cryptographic operations, and security invariants is a valid protocol participant.

The protocol defines what must happen (encrypt client-side, split the key, derive ephemeral keys per file, use the Noise XX pattern for P2P) without specifying how any implementation presents this to users.

The reference implementation is a Rust library (aegis-crypto, aegis-protocol) that any application can consume — the desktop client is one example.

04

The Encryption Layer

XChaCha20-Poly1305 — Authenticated Encryption with Associated Data. One operation encrypts the file and produces an authentication tag that detects any tampering. No separate MAC step. No ambiguity.

The 192-bit extended nonce eliminates the birthday bound problem that plagues AES-GCM's 96-bit nonces. You can encrypt 264 messages under the same key without collision risk and without the counter-tracking overhead that GCM requires. ChaCha20 is inherently constant-time in software — no lookup tables, no cache-timing side channels, no dependence on AES-NI hardware instructions.

The encryption flow for every file:

plaintext
→
XChaCha20-Poly1305 + nonce
→
ciphertext + auth tag
05

Key Exchange

X25519 (Curve25519 ECDH) generates a shared secret between two parties who have never communicated before. The curve was designed by Daniel J. Bernstein with fully transparent parameters — no unexplained seed values, no suspicious NIST constants, no patent restrictions. Every design choice is documented and justified.

Ed25519 provides digital signatures. Unlike ECDSA, Ed25519 is deterministic — the signature does not depend on a random number generator at signing time. This is not an academic distinction. Sony's PS3 signing key was extracted because their ECDSA implementation reused a random nonce. Bitcoin wallets have been drained for the same reason. Ed25519 makes this failure mode structurally impossible.

06

Hashing & Derivation

BLAKE3 — 12× faster than SHA-256 on equivalent hardware. When you are hashing large files, speed is not a luxury; it is the difference between a usable system and a slow one. BLAKE3 is natively parallelized via a Merkle tree internal structure and is immune to length-extension attacks — a class of vulnerability that affects SHA-256 and SHA-512.

HKDF — HMAC-based Key Derivation Function. Domain-separated key expansion means every file gets a unique encryption key derived from an ephemeral shared secret. The derivation includes context labels that bind each key to its purpose. One compromised key does not cascade. One leaked secret does not unravel the protocol.

07

The Split-Key Insight

Most encrypted sharing systems embed the decryption key in the share URL. Click the link, get the file. Intercept the link, get the file. The security is only as strong as the weakest channel the link travels through.

Aegis splits the secret. The blob URL and the decryption key are delivered through separate channels. Intercepting one is useless without the other. Both halves are required to reconstruct access.

Traditional
https://share.example.com/file?key=a8f3e...
Steal the link → get the file
Aegis
Channel A — blob URL (server link)
Channel B — decryption key (separate path)
Both required. Neither sufficient alone.
08

Forward Secrecy

Every file generates a fresh X25519 ephemeral keypair. The shared secret derived from this keypair encrypts exactly one file. After encryption, the ephemeral private key is discarded. There is no master key to steal. Compromising one file's key reveals nothing about any other file — past, present, or future.

For real-time transfers, Aegis uses the Noise Protocol framework (XX pattern) to establish P2P sessions. Mutual authentication. Forward secrecy. Identity hiding. The server's role reduces to NAT traversal assistance — it never sees the data, the keys, or the identities of either party.

09

The Server

The protocol defines the server as a deliberately minimal participant. What matters is what the server does not know. No file contents. No filenames. No sender identities. No recipient identities. Encrypted blobs arrive with random IDs and a time-to-live. When the TTL expires, the blob is purged. Rate limiting prevents abuse. That is the entire server.

No logs are kept. No analytics are collected. No metadata is stored beyond what is needed to serve the blob back.

"A legal data request? We cannot comply. We have nothing."

Like Signal. Like Proton. The strongest legal defense is having nothing to hand over.

10

Build on Aegis

The protocol exposes a clean library interface: encrypt_file, decrypt_file, create_share_link, create_share_key, generate_identity — any application can call these.

Any conforming implementation that upholds the cryptographic invariants is a valid Aegis participant — desktop apps, web apps, CLI tools, mobile clients built by third parties.

The reference implementation (Rust library + Tauri desktop client + Axum server) exists to demonstrate the protocol and provide a working baseline, not to be the only consumer.

"The protocol is the product. The applications are examples."