diff --git a/doc/age-keygen.1 b/doc/age-keygen.1 index b60958f..100c0bf 100644 --- a/doc/age-keygen.1 +++ b/doc/age-keygen.1 @@ -1,10 +1,10 @@ .\" generated with Ronn-NG/v0.9.1 .\" http://github.com/apjanke/ronn-ng/tree/0.9.1 -.TH "AGE\-KEYGEN" "1" "June 2024" "" +.TH "AGE\-KEYGEN" "1" "December 2025" "" .SH "NAME" \fBage\-keygen\fR \- generate age(1) key pairs .SH "SYNOPSIS" -\fBage\-keygen\fR [\fB\-o\fR \fIOUTPUT\fR] +\fBage\-keygen\fR [\fB\-pq\fR] [\fB\-o\fR \fIOUTPUT\fR] .br \fBage\-keygen\fR \fB\-y\fR [\fB\-o\fR \fIOUTPUT\fR] [\fIINPUT\fR] .br @@ -14,6 +14,11 @@ If the output is not going to a terminal, \fBage\-keygen\fR prints the public key to standard error\. .SH "OPTIONS" .TP +\fB\-pq\fR +Generate a post\-quantum hybrid ML\-KEM\-768 + X25519 key pair\. +.IP +In the future, this might become the default\. +.TP \fB\-o\fR, \fB\-\-output\fR=\fIOUTPUT\fR Write the identity to \fIOUTPUT\fR instead of standard output\. .IP @@ -25,7 +30,17 @@ Read an identity file from \fIINPUT\fR or from standard input and output the cor \fB\-\-version\fR Print the version and exit\. .SH "EXAMPLES" -Generate a new identity: +Generate a new post\-quantum identity: +.IP "" 4 +.nf +$ age\-keygen \-pq +# created: 2025\-11\-17T13:39:06+01:00 +# public key: age1pq167[\|\.\|\.\|\. 1950 more characters \|\.\|\.\|\.] +AGE\-SECRET\-KEY\-PQ\-1K30MYPZAHAXHR22YHH27EGDVLU0QNSUH3DSV7J7NR3X6D9LHXNWSDLTV4T +.fi +.IP "" 0 +.P +Generate a new traditional identity: .IP "" 4 .nf $ age\-keygen @@ -35,11 +50,11 @@ AGE\-SECRET\-KEY\-1N9JEPW6DWJ0ZQUDX63F5A03GX8QUW7PXDE39N8UYF82VZ9PC8UFS3M7XA9 .fi .IP "" 0 .P -Write a new identity to \fBkey\.txt\fR: +Write a new post\-quantum identity to \fBkey\.txt\fR: .IP "" 4 .nf $ age\-keygen \-o key\.txt -Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p +Public key: age1pq1cd[\|\.\|\.\|\. 1950 more characters \|\.\|\.\|\.] .fi .IP "" 0 .P @@ -47,7 +62,7 @@ Convert an identity to a recipient: .IP "" 4 .nf $ age\-keygen \-y key\.txt -age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p +age1pq1cd[\|\.\|\.\|\. 1950 more characters \|\.\|\.\|\.] .fi .IP "" 0 .SH "SEE ALSO" diff --git a/doc/age-keygen.1.html b/doc/age-keygen.1.html index c05c175..eaf5e39 100644 --- a/doc/age-keygen.1.html +++ b/doc/age-keygen.1.html @@ -76,7 +76,7 @@
age-keygen [-o OUTPUT]
+
age-keygen [-pq] [-o OUTPUT]
age-keygen -y [-o OUTPUT] [INPUT]
-pqIn the future, this might become the default.
+-o, --output=OUTPUT
Generate a new identity:
+Generate a new post-quantum identity:
+ +$ age-keygen -pq
+# created: 2025-11-17T13:39:06+01:00
+# public key: age1pq167[... 1950 more characters ...]
+AGE-SECRET-KEY-PQ-1K30MYPZAHAXHR22YHH27EGDVLU0QNSUH3DSV7J7NR3X6D9LHXNWSDLTV4T
+
+
+Generate a new traditional identity:
$ age-keygen
# created: 2021-01-02T15:30:45+01:00
@@ -115,16 +128,16 @@ standard error.
AGE-SECRET-KEY-1N9JEPW6DWJ0ZQUDX63F5A03GX8QUW7PXDE39N8UYF82VZ9PC8UFS3M7XA9
-Write a new identity to key.txt:
Write a new post-quantum identity to key.txt:
$ age-keygen -o key.txt
-Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
+Public key: age1pq1cd[... 1950 more characters ...]
Convert an identity to a recipient:
$ age-keygen -y key.txt
-age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
+age1pq1cd[... 1950 more characters ...]
IDENTITIES are private values, like a private key, that allow decrypting
a file encrypted to the corresponding RECIPIENT.
-Native age key pairs are generated with age-keygen(1), and provide small
-encodings and strong encryption based on X25519. They are the recommended
-recipient type for most applications.
A RECIPIENT encoding begins with age1 and looks like the following:
A hybrid RECIPIENT encoding begins with age1pq1 and looks like the following:
age1pq167[... 1950 more characters ...]
+
+
+A hybrid IDENTITY encoding begins with AGE-SECRET-KEY-PQ-1 and looks like
+the following:
AGE-SECRET-KEY-PQ-1K30MYPZAHAXHR22YHH27EGDVLU0QNSUH3DSV7J7NR3X6D9LHXNWSDLTV4T
+
+
+A classic RECIPIENT encoding begins with age1 and looks like the following:
age1gde3ncmahlqd9gg50tanl99r960llztrhfapnmx853s4tjum03uqfssgdh
-An IDENTITY encoding begins with AGE-SECRET-KEY-1 and looks like the
+
A classic IDENTITY encoding begins with AGE-SECRET-KEY-1 and looks like the
following:
AGE-SECRET-KEY-1KTYK6RVLN5TAPE7VF6FQQSKZ9HWWCDSKUGXXNUQDWZ7XXT5YK5LSF3UTKQ
+A file can't be encrypted to both post-quantum and classic keys, as that would +defeat the post-quantum security of the encryption.
+An encrypted file can't be linked to the native recipient it's encrypted to without access to the corresponding identity.
@@ -331,6 +347,20 @@ instruct the user to perform encryption with the-e/--encrypt
doesn't make sense (such as a password-encryption plugin) may instruct the user
to use the -j flag.
+Tagged recipients
+
+age can natively encrypt to recipients starting with age1tag1 (using P-256
+ECDH) or age1tagpq1 (using the ML-KEM-768 + P-256 post-quantum hybrid). These
+are intended to be the public side of private keys held in hardware.
+
+They are directly supported to avoid the need to install the plugin, which may
+be platform-specific, on the encrypting side.
+
+The tag reduces privacy, by allowing an observer to correlate files with a
+recipient (but not files amongst them without knowledge of the recipient),
+but this is also a desirable property for hardware keys that require user
+interaction for each decryption operation.
+
EXIT STATUS
age will exit 0 if and only if encryption or decryption are successful for the
@@ -351,29 +381,28 @@ by default. In this case, a flag will be provided to force the operation.
EXAMPLES
-Generate a new identity, encrypt data, and decrypt:
+Generate a new post-quantum identity, encrypt data, and decrypt:
-$ age-keygen -o key.txt
-Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
+$ age-keygen -pq -o key.txt
+Public key: age1pq167[... 1950 more characters ...]
-$ tar cvz ~/data | age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p > data.tar.gz.age
+$ tar cvz ~/data | age -r age1pq167[...] > data.tar.gz.age
$ age -d -o data.tar.gz -i key.txt data.tar.gz.age
Encrypt example.jpg to multiple recipients and output to example.jpg.age:
-$ age -o example.jpg.age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p \
- -r age1lggyhqrw2nlhcxprm67z43rta597azn8gknawjehu9d9dl0jq3yqqvfafg example.jpg
+$ age -o example.jpg.age -r age1pq167[...] -r age1pq1e3[...] example.jpg
Encrypt to a list of recipients:
$ cat > recipients.txt
# Alice
-age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
+age1pq167[... 1950 more characters ...]
# Bob
-age1lggyhqrw2nlhcxprm67z43rta597azn8gknawjehu9d9dl0jq3yqqvfafg
+age1pq1e3[... 1950 more characters ...]
$ age -R recipients.txt example.jpg > example.jpg.age
@@ -432,7 +461,7 @@ $ age -d -i age-yubikey-identity-388178f3.txt secrets.txt.age
- - June 2024
+ - December 2025
- age(1)