Locktopus: GPG Encryption for People, Not Just Keyrings

Schematic of Locktopus: fetch the recipient's public key from GitHub, encrypt the file locally with GPG, then share the encrypted file

Locktopus is the GPG tool I wanted every time I had to send someone a sensitive file. The cryptography was never the hard part. The hard part was the key hunt: finding the right public key, confirming it actually belongs to the person, importing it, and only then encrypting. Locktopus wraps the system gpg binary with explicit, conservative defaults and automates the hunt. Tell it a GitHub or GitLab username and it fetches the keys that person already publishes, shows them to you, and imports them only when you say so. The core is pure Python standard library, and a desktop app rides on the same rules for the days I do not feel like living in a terminal.

Locktopus logo: a purple octopus mascot holding a padlock, beside the word Locktopus
✅ PurposeEncrypt files for a person, using keys they already publish
🐍 CorePure Python standard library wrapping the system gpg binary
🌐 Key sourcesGitHub, GitLab, self-hosted instances, any HTTPS URL, email lookup
💻 Code🔒 Private repository

🔑 The key hunt is the hard part

Ask a room of engineers who has used GPG in the last month and watch the hands stay down. Then ask who needed to send a credential, a contract, or a key file to one specific person in that same month. Everyone. The gap between those two answers is not cryptography, it is ergonomics. Keys live in too many places, fingerprints are hostile to read, and every step has a footgun. Locktopus starts from the observation that most people I would encrypt to have already published a key somewhere. The tool’s job is to go get it, carefully.

🌐 Fetch the key where people publish it

An import starts with a preview, never a silent grab. From GitHub it asks the API for a user’s published GPG keys first, with the plain web route as fallback; GitLab gets the same API treatment because its shortcut endpoint can quietly omit some keys. Enterprise GitHub and self-hosted GitLab work through a host flag, any HTTPS URL that serves an armored key can be imported directly, and an email address resolves through Web Key Directory with keys.openpgp.org behind it. However the key arrives, you see it before it lands in your keyring. After that the everyday work is ordinary on purpose: generate an ed25519 keypair (RSA-4096 when compatibility demands it), encrypt for one or more recipients, decrypt back to the original name, sign, verify, or encrypt symmetrically with AES-256 when no keypair makes sense.

🛡️ Safety rules that do not bend

A wrapper around gpg earns trust by what it refuses to do. Locktopus never builds shell commands; every invocation is an argument list, and passphrases travel over stdin instead of the process list. Freshly imported keys are not silently trusted: encryption to one requires stating the trust model out loud, because a fetched key is a claim, not a proof. TLS verification is on by default, a private CA bundle can be supplied for self-hosted instances, and the escape hatch for a self-signed lab box is a per-operation flag that warns loudly and is never saved. These are small rules. They are also the whole point.

🖥️ A desktop app on the same core

The CLI came first, but not everyone I send files to lives in a terminal, and honestly neither do I on a Sunday. The desktop app is a cross-platform Electron shell for Windows, macOS, and Linux that drives the same core with the same safety rules: preview before import, explicit trust, no quiet surprises. Keys can come in from local files or the clipboard there, through the same flow. One engine, two front doors, and a roadmap in the repo that every feature must update as it ships, so plan and tool cannot drift apart.

🔗 Resources

  • GnuPG, the GNU Privacy Guard, the cryptography underneath Locktopus
  • GitHub, where many people already publish their keys
  • GitLab, the other key source the hunt covers
  • Python, the language the core is written in
  • keys.openpgp.org, the public key directory behind email lookup
  • Electron, the shell the desktop app is built in
Chad Yantorno

Chad Yantorno

AI Security Infrastructure Engineer. Policy as code from CI/CD to runtime, and AI agents in production under policy guardrails. He teaches at WCSU and CT State Naugatuck Valley, and runs NeuralSec Advisory.