Age Encryption Cheat Sheet
age is a simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.
Key Generation
age-keygen -o output_file.txt
Encrypt With Public Key
To Output File
age -R keyfile.txt -o outputfile.txt.age inputfile.txt
To Ascii Armored Output
age -R keyfile.txt -a inputfile.txt
Decrypt With Private Key
age -d -i private-key-path encrypted-file.age
Encrypt With Passphrase
Leave password blank when asked for randomly assigned passphrase
$ age -p secrets.txt > secrets.txt.age
Decrypt With Passphrase
$ age -d secrets.txt.age > secrets.txt