Простой, современный и безопасный инструмент шифрования (и библиотека Go) с небольшими явными ключами, без параметров конфигурации и компонуемостью в стиле UNIX.
age — это простой, современный и безопасный инструмент для шифрования файлов, формат и библиотека для Go.
Он отличается явными ключами, постквантовой безопасностью, отсутствием параметров конфигурации и композируемостью в стиле UNIX.
$ age-keygen -o key.txt
Public key: age1pq167[... 1950 more characters ...]
$ tar cvz ~/data | age -r age1pq167[...] > data.tar.gz.age
$ age --decrypt -i key.txt data.tar.gz.age > data.tar.gz
📜 Спецификация формата находится на age-encryption.org/v1. age был разработан @benjojo и @FiloSottile.
🦀 Альтернативная совместимая реализация на Rust доступна на github.com/str4d/rage.
🌍 Typage — это реализация на TypeScript. Она работает в браузере, Node.js, Deno и Bun.
🔑 Аппаратные PIV-токены, такие как YubiKey, поддерживаются через плагин age-plugin-yubikey.
✨ Больше плагинов, реализаций, инструментов и интеграций можно найти в списке awesome age.
💬 Автор произносит это как [aɡe̞] с твёрдой g, как в GIF, и всегда пишет со строчной буквы.
| Homebrew (macOS или Linux) |
brew install age
|
| MacPorts |
port install age
|
| Windows |
winget install --id FiloSottile.age
|
| Alpine Linux v3.15+ |
apk add age
|
| Arch Linux |
pacman -S age
|
| Debian 12+ (Bookworm) |
apt install age
|
| Debian 11 (Bullseye) |
apt install age/bullseye-backports
(включите backports для age v1.0.0+)
|
| Fedora 33+ |
dnf install age
|
| Gentoo Linux |
emerge app-crypt/age
|
| Guix System |
guix package -i age
|
| NixOS / Nix |
nix-env -i age
|
| openSUSE Tumbleweed |
zypper install age
|
| Ubuntu 22.04+ |
apt install age
|
| Void Linux |
xbps-install age
|
| FreeBSD |
pkg install age (security/age)
|
| OpenBSD 6.7+ |
pkg_add age (security/age)
|
| Chocolatey (Windows) |
choco install age.portable
|
| Scoop (Windows) |
scoop bucket add extras && scoop install age
|
В Windows, Linux, macOS и FreeBSD можно использовать готовые бинарные файлы.
Если вы скачиваете готовые бинарные файлы, вы можете проверить их доказательства Sigsum.
Если в вашей системе есть поддерживаемая версия Go, вы можете собрать из исходного кода.
go install filippo.io/age/cmd/...@latest
Помощь от новых упаковщиков очень приветствуется.
Полную документацию см. в man-странице age(1).
Usage:
age [--encrypt] (-r RECIPIENT | -R PATH)... [--armor] [-o OUTPUT] [INPUT]
age [--encrypt] --passphrase [--armor] [-o OUTPUT] [INPUT]
age --decrypt [-i PATH]... [-o OUTPUT] [INPUT]
Options:
-e, --encrypt Encrypt the input to the output. Default if omitted.
-d, --decrypt Decrypt the input to the output.
-o, --output OUTPUT Write the result to the file at path OUTPUT.
-a, --armor Encrypt to a PEM encoded format.
-p, --passphrase Encrypt with a passphrase.
-r, --recipient RECIPIENT Encrypt to the specified RECIPIENT. Can be repeated.
-R, --recipients-file PATH Encrypt to recipients listed at PATH. Can be repeated.
-i, --identity PATH Use the identity file at PATH. Can be repeated.
--version Print the version.
INPUT defaults to standard input, and OUTPUT defaults to standard output.
If OUTPUT exists, it will be overwritten.
RECIPIENT can be an age public key generated by age-keygen ("age1...")
or an SSH public key ("ssh-ed25519 AAAA...", "ssh-rsa AAAA...").
Recipient files contain one or more recipients, one per line. Empty lines
and lines starting with "#" are ignored as comments. "-" may be used to
read recipients from standard input.
Identity files contain one or more secret keys ("AGE-SECRET-KEY-1..."),
one per line, or an SSH key. Empty lines and lines starting with "#" are
ignored as comments. Passphrase encrypted age files can be used as
identity files. Multiple key files can be provided, and any unused ones
will be ignored. "-" may be used to read identities from standard input.
When --encrypt is specified explicitly, -i can also be used to encrypt to an
identity file symmetrically, instead or in addition to normal recipients.
Файлы можно зашифровать для нескольких получателей, повторяя -r/--recipient. Каждый получатель сможет расшифровать файл.
$ age -o example.jpg.age -r age1pq167[...] -r age1pq1e3[...] example.jpg
Несколько получателей также можно перечислить по одному в строке в одном или нескольких файлах, переданных с помощью флага -R/--recipients-file.