The age Encryption Tool: Modern GPG Alternative
Explore age as a simple, modern alternative to GPG for file encryption with better usability.
The age Encryption Tool: Modern GPG Alternative is a free Cryptology Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Age Design Goals
age (Actually Good Encryption) was designed by Filippo Valsorda and Ben Cartwright-Cox as a simple, modern alternative to GPG. The design rejects GPG's complexity: no key rings, no trust model, no key signing, no configuration files, no plugin ecosystem for core operations. age focuses on doing one thing well: encrypting and decrypting files in a straightforward, hard-to-misuse way.
Age Public Key Recipients
The primary recipient type in age is an age public key, derived from X25519. age-keygen generates a key pair: an age public key (starting with age1) and an age identity file containing the private key. To encrypt to a recipient, specify their age public key with -r age1...; to decrypt, provide your identity file with -i key.txt. The format is designed to be copy-paste safe.
SSH Public Key Recipients
age can encrypt directly to SSH public keys, both RSA and Ed25519. If you have a recipient's SSH public key (from GitHub: curl https://github.com/username.keys), you can encrypt a file to them without any additional key exchange: age -r @recipient_public_key.txt plaintext.txt > encrypted.age. The recipient decrypts using their existing SSH private key identity.
Password-Based Encryption
age supports password-based (symmetric) encryption with the -p flag. It uses scrypt for key derivation from the passphrase, providing memory-hard resistance against brute force. This mode requires no key management: anyone with the passphrase can decrypt. It is suitable for cases where key distribution is impractical, such as encrypting backup archives stored in the cloud.
age Identity Files
An age identity file contains the private key in text format, one key per line. Unlike GPG's binary keyring, identity files are plain text that can be stored anywhere, backed up, and managed with standard file tools. Protect identity files with filesystem permissions or encrypt them with a passphrase (using another age encryption layer or a tool like age-plugin-yubikey). Identity files are specified with -i on decryption.
age-keygen for Key Generation
age-keygen generates a new X25519 key pair in seconds: age-keygen -o key.txt. The output file contains the private key, and the corresponding public key is printed to stdout. There is no interactive configuration: key type, size, and algorithm are fixed. This simplicity means there are no generation options to misconfigure, and the output format is standardized and parseable.
Encrypting to Multiple Recipients
age supports encrypting to multiple recipients in a single operation: age -r age1alice... -r age1bob... file.txt. Any of the listed recipients can decrypt the file independently using their own private key. Internally, age encrypts the symmetric file key separately to each recipient and stores all encrypted key copies in the header. This is conceptually similar to GPG's multi-recipient encryption.
Rage: Rust Implementation of age
rage is a Rust implementation of the age specification, offering the same file format and CLI interface. Rust's memory safety guarantees and performance make rage an attractive alternative to the reference Go implementation. Both implementations are interoperable: files encrypted with age can be decrypted with rage and vice versa. rage is available via package managers on most platforms.
age-plugin System
age plugins extend the recipient types supported by age. age-plugin-yubikey enables encryption to YubiKey hardware security keys using the PIV interface, so decryption requires physical possession of the YubiKey. Plugins follow a standardized protocol, allowing new recipient types without modifying the core age binary. This extensibility supports hardware key support while keeping the base tool minimal.
Comparing age to GPG
age excels in simplicity: no trust model to manage, no key signing parties, no configuration, and a one-line encrypt or decrypt command. GPG has far more features: key signing, trust levels, key servers, multiple subkeys, photo IDs, and extensive integration with mail clients. For encrypting files and backups, age is often the better choice. For email encryption and software signing ecosystems, GPG remains standard.
Age in Automated Backup Pipelines
age is particularly well-suited for automated backup encryption. A cron job can encrypt backups to a set of recipient public keys stored in a file: age --recipients-file recipients.txt backup.tar.gz > backup.tar.gz.age. No passphrase entry is needed, key management is simple, and multiple operators can decrypt independently using their own keys. The resulting files are resistant to server compromise.
Age Recipient Types
Which of the following is NOT a supported recipient type in age encryption?
age Encryption Tool Recap
age recap: designed for simplicity over features, X25519-based age public keys for primary recipients, SSH public keys as convenient alternative recipients, scrypt-based password encryption for passphrase mode, age-keygen for key pair generation, multiple recipients in one file, rage as a Rust alternative with identical file format, plugins for hardware key support, and ideal for automated backup encryption pipelines.
Frequently asked questions
Is the “The age Encryption Tool: Modern GPG Alternative” lesson free?
Yes — the full text of “The age Encryption Tool: Modern GPG Alternative” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “The age Encryption Tool: Modern GPG Alternative”?
Explore age as a simple, modern alternative to GPG for file encryption with better usability. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The age Encryption Tool: Modern GPG Alternative” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- GPG for Asymmetric File Encryption
- The age Encryption Tool: Modern GPG Alternative
- Encrypted Containers with VeraCrypt
- Secure Deletion and Key Destruction