AGPL-3.0 · Early release

LEGION

Decentralized. Anonymous. Yours.

No servers. No accounts. No phone number.
Encrypted messaging over the Tor network — peer to peer.

🐧 Linux only  ·  Python ≥ 3.12  ·  Android in development

legion — bash
0 central servers
·
256-bit Ed25519 keys
·
E2EE libsodium only
·
100% open source

What is Legion

For anyone who wants a private life
to actually be private.

Legion is a messaging application with no company behind it, no server storing your data, and no business model built on your information. Your messages go directly to the person you're writing to — through Tor, end-to-end encrypted — and nowhere else.

🛡

Your words stay between you

When you write to someone, that message is for them. Not for an algorithm, not for a data warehouse, not for anyone but the person you addressed it to.

📵

No middleman to trust — or distrust

Most apps store your conversations on someone's server. That is a target: something that can be hacked, leaked, or accessed without your knowledge. Legion removes the server entirely.

🌱

Privacy as architecture, not a setting

With most apps, privacy is a toggle you configure or a policy that can change. In Legion, it is not a feature — it is the structure.

Freedom of expression is a right. What you do with it is a matter of your own conscience — not something to be pre-approved, filtered, or recorded by a system that has decided you are a suspect before you have said a word. A private conversation should not need to justify itself.

Interface

Built for clarity under pressure.

Private messages

End-to-end encrypted conversation with delivery status, TTL picker and burn-after-reading toggle.

Group chat

Group chats with peer-to-peer delivery, member management and automatic key rotation.

Settings and QR code

Settings panel: identity, contact card QR code, message expiry and the panic button.

Features

Everything you need.
Nothing you don't.

🔐

End-to-end encryption

X25519 + XSalsa20-Poly1305 via libsodium. Group chats use a shared SecretBox key. Plaintext never touches disk.

🧅

Tor Hidden Service

Every node is a .onion address derived from your Ed25519 key. Your IP is invisible to everyone, always.

👥

Group chats

Peer-to-peer delivery to every member. Automatic key rotation when a member is removed. Files and images supported.

📁

File & image sharing

Images are re-encoded by Pillow before sending — GPS, EXIF, camera model and all metadata permanently stripped.

🔥

Burn after reading

Messages delete themselves from both devices. The burn flag is inside the encrypted payload — invisible in transit.

💥

Panic button

One tap destroys all local data instantly: identity, messages, contacts, groups. Followed by a VACUUM pass — no forensic recovery.

How it works

Direct. Encrypted. Anonymous.

01
🔑

Generate your identity

An Ed25519 keypair is generated locally. Your private key never leaves your device — encrypted with Argon2id at rest.

02
🧅

Connect via Tor

Your node registers a v3 Hidden Service. Your .onion address is derived from your key — it never changes and never reveals your IP.

03
💬

Message directly

Messages travel peer-to-peer through Tor. No middleman. Encrypted on your device, decrypted only on theirs.

Security

Audited. Transparent.
No custom cryptography.

🔍
White-box Security Audit
Conducted by Claude (Anthropic AI) · Directed and verified by the project author

Legion underwent a complete white-box penetration test conducted by Claude — an AI model developed by Anthropic — with full access to every line of source code. Every component was systematically reviewed: cryptographic implementation, protocol logic, API surface, GUI input handling, file sanitization, and subprocess isolation.

The project author directed the entire audit process — defining scope, verifying findings, making the final call on every fix, and ensuring each decision aligned with Legion's security model. Two medium-severity vulnerabilities were found and fixed before release. All findings are public in SEC_AUDIT.md. Rejected design decisions are documented in DECISIONS.md.

Cryptographic primitives

Key generationEd25519 — libsodium CSPRNG
Private key at restArgon2id + XSalsa20-Poly1305
Message encryptionX25519 + XSalsa20-Poly1305
Group encryptionXSalsa20-Poly1305 SecretBox
SignaturesEd25519
Image sanitizationPillow re-encode

All via libsodium (PyNaCl). Zero custom algorithms.

AGPL-3.0
No telemetry
No update servers
Plaintext never on disk
No accounts
Tor-only routing

Vision

One person. One idea.
Built with the tools of the future.

Legion is the work of a single developer driven by a straightforward conviction: privacy is not a privilege — it is a right. In a world where communication infrastructure is increasingly centralised, surveilled, and vulnerable to pressure from governments and corporations, the answer is not a better app on someone else's server. The answer is no server at all.

The project was built with deliberate simplicity: every architectural decision was made to be understandable, auditable, and justifiable. No black boxes. No clever tricks. No dependencies that haven't been carefully evaluated. The goal was not to build the most feature-rich messenger — it was to build the most trustworthy one.

🤖
Built in collaboration with AI
Claude · Anthropic

Legion was developed in close collaboration with Claude, an AI model by Anthropic. Every feature — from the cryptographic architecture to the panic button, from burn-after-reading to the security audit — was implemented through a dialogue between human vision and AI execution.

This is not a disclaimer. It is a statement of intent: Legion is a demonstration that responsible AI collaboration, with a human firmly in control of every decision, can produce software that is safer, more consistent, and more thoroughly considered than either could achieve alone.

All intellectual property, all architectural decisions, and all responsibility for the project belong to its human author. AI was — and remains — a tool.

Install

One command.
Three distributions.

Supports Arch / EndeavourOS / Manjaro · Debian / Ubuntu / Mint · Fedora / RHEL / Rocky Linux

bash
$ git clone https://github.com/n3ur0-f4ll/legion.git
$ cd legion
$ bash install.sh
1 Installs system packages (webkit2gtk, tor, python-gobject)
2 Creates a Python venv and installs dependencies
3 Creates a ./legion launcher and a desktop entry

Your password cannot be recovered. If you forget it, your identity is permanently inaccessible — by design. Write it down and keep it somewhere safe.

Requires Python ≥ 3.12 · Linux only · Manual installation →

Because there is no central server, your device connects directly to your contact's device through Tor. If they are offline when you send, Legion keeps the message in a local queue and retries every 10 seconds — for as long as the app is running.

Once you close Legion, retries pause. The message is saved locally — delivery resumes automatically when you reopen the app.

A relay node is in development — an optional self-hosted server that keeps messages moving 24/7 without ever seeing their content. Coming in a future release.

Legion has no user directory, no phone numbers, no usernames. To message someone you must exchange contact cards — small signed JSON files containing your public key and .onion address. Both sides must add each other before messages can flow.

  1. Open Legion → Settings → Contact card. Copy your JSON — or click Show QR to display a scannable code.
  2. Send your card to your contact through any channel you already trust: in person, Signal, e-mail, etc.
  3. They do the same — send you their card.
  4. In Legion's sidebar, click Add contact and paste their JSON. (Meeting in person? Scan their QR with your phone camera to get the JSON.)
  5. Once both sides have added each other, messages can flow — immediately.

The card is cryptographically signed with your private key. It cannot be forged. Legion verifies the signature before accepting any contact.

📖

Full technical documentation

API reference, database schema, cryptographic internals, security model, architecture decisions.

Development

Active development.
Clear direction.

Legion is a living project. Here is what has been delivered, what is being worked on now, and what is planned.

Delivered
  • End-to-end encrypted private messaging
  • Tor Hidden Service — peer-to-peer routing
  • Group chats with key rotation
  • File and image sharing (both private & groups)
  • Burn after reading
  • Panic button with VACUUM wipe
  • QR contact card
  • White-box security audit
  • Installer for Arch, Debian, Fedora/RHEL
In progress
  • Relay — self-hosted optional server for offline delivery and public board
  • Relay board — owner publishes signed content; anyone with the address can read anonymously
  • This website
Planned
  • Android / GrapheneOS (Kivy, reuses legion-node)

Legion is a one-person project. Progress is steady but not rushed — correctness and security take priority over release speed.