age-keygen - generate age(1) key pairs

age-keygen [-o OUTPUT]
age-keygen -y [-o OUTPUT] [INPUT]

age-keygen generates a new native age(1) key pair, and outputs the identity to standard output or to the OUTPUT file. The output includes the public key and the current time as comments.

If the output is not going to a terminal, age-keygen prints the public key to standard error.

Write the identity to OUTPUT instead of standard output.
If OUTPUT already exists, it is not overwritten.
Read an identity file from INPUT or from standard input and output the corresponding recipient(s), one per line, with no comments.
Print the version and exit.

Generate a new identity:

$ age-keygen
# created: 2021-01-02T15:30:45+01:00
# public key: age1lvyvwawkr0mcnnnncaghunadrqkmuf9e6507x9y920xxpp866cnql7dp2z

Write a new identity to key.txt:

$ age-keygen -o key.txt
Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p

Convert an identity to a recipient:

$ age-keygen -y key.txt


Filippo Valsorda

September 2021