Debian Codegraph @

doc/age.1.html

raw symbols SCIP
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv='content-type' content='text/html;charset=utf8'>
5 <meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'>
6 <title>age(1) - simple, modern, and secure file encryption</title>
7 <style type='text/css' media='all'>
8 /* style: man */
9 body#manpage {margin:0}
10 .mp {max-width:100ex;padding:0 9ex 1ex 4ex}
11 .mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
12 .mp h2 {margin:10px 0 0 0}
13 .mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
14 .mp h3 {margin:0 0 0 4ex}
15 .mp dt {margin:0;clear:left}
16 .mp dt.flush {float:left;width:8ex}
17 .mp dd {margin:0 0 0 9ex}
18 .mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
19 .mp pre {margin-bottom:20px}
20 .mp pre+h2,.mp pre+h3 {margin-top:22px}
21 .mp h2+pre,.mp h3+pre {margin-top:5px}
22 .mp img {display:block;margin:auto}
23 .mp h1.man-title {display:none}
24 .mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
25 .mp h2 {font-size:16px;line-height:1.25}
26 .mp h1 {font-size:20px;line-height:2}
27 .mp {text-align:justify;background:#fff}
28 .mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
29 .mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
30 .mp u {text-decoration:underline}
31 .mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
32 .mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
33 .mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
34 .mp b.man-ref {font-weight:normal;color:#434241}
35 .mp pre {padding:0 4ex}
36 .mp pre code {font-weight:normal;color:#434241}
37 .mp h2+pre,h3+pre {padding-left:0}
38 ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
39 ol.man-decor {width:100%}
40 ol.man-decor li.tl {text-align:left}
41 ol.man-decor li.tc {text-align:center;letter-spacing:4px}
42 ol.man-decor li.tr {text-align:right;float:right}
43 </style>
44 </head>
45 <!--
46 The following styles are deprecated and will be removed at some point:
47 div#man, div#man ol.man, div#man ol.head, div#man ol.man.
48
49 The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
50 .man-navigation should be used instead.
51 -->
52 <body id='manpage'>
53 <div class='mp' id='man'>
54
55 <div class='man-navigation' style='display:none'>
56 <a href="#NAME">NAME</a>
57 <a href="#SYNOPSIS">SYNOPSIS</a>
58 <a href="#DESCRIPTION">DESCRIPTION</a>
59 <a href="#OPTIONS">OPTIONS</a>
60 <a href="#RECIPIENTS-AND-IDENTITIES">RECIPIENTS AND IDENTITIES</a>
61 <a href="#EXIT-STATUS">EXIT STATUS</a>
62 <a href="#BACKWARDS-COMPATIBILITY">BACKWARDS COMPATIBILITY</a>
63 <a href="#EXAMPLES">EXAMPLES</a>
64 <a href="#SEE-ALSO">SEE ALSO</a>
65 <a href="#AUTHORS">AUTHORS</a>
66 </div>
67
68 <ol class='man-decor man-head man head'>
69 <li class='tl'>age(1)</li>
70 <li class='tc'></li>
71 <li class='tr'>age(1)</li>
72 </ol>
73
74
75
76 <h2 id="NAME">NAME</h2>
77 <p class="man-name">
78 <code>age</code> - <span class="man-whatis">simple, modern, and secure file encryption</span>
79 </p>
80 <h2 id="SYNOPSIS">SYNOPSIS</h2>
81
82 <p><code>age</code> [<code>--encrypt</code>] (<code>-r</code> <var>RECIPIENT</var> | <code>-R</code> <var>PATH</var>)... [<code>--armor</code>] [<code>-o</code> <var>OUTPUT</var>] [<var>INPUT</var>]<br>
83 <code>age</code> [<code>--encrypt</code>] <code>--passphrase</code> [<code>--armor</code>] [<code>-o</code> <var>OUTPUT</var>] [<var>INPUT</var>]<br>
84 <code>age</code> <code>--decrypt</code> [<code>-i</code> <var>PATH</var> | <code>-j</code> <var>PLUGIN</var>]... [<code>-o</code> <var>OUTPUT</var>] [<var>INPUT</var>]<br></p>
85
86 <h2 id="DESCRIPTION">DESCRIPTION</h2>
87
88 <p><code>age</code> encrypts or decrypts <var>INPUT</var> to <var>OUTPUT</var>. The <var>INPUT</var> argument is
89 optional and defaults to standard input. Only a single <var>INPUT</var> file may be
90 specified. If <code>-o</code> is not specified, <var>OUTPUT</var> defaults to standard output.</p>
91
92 <p>If <code>-p</code>/<code>--passphrase</code> is specified, the file is encrypted with a passphrase
93 requested interactively. Otherwise, it's encrypted to one or more
94 <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">RECIPIENTS</a> specified with <code>-r</code>/<code>--recipient</code> or
95 <code>-R</code>/<code>--recipients-file</code>. Every recipient can decrypt the file.</p>
96
97 <p>In <code>-d</code>/<code>--decrypt</code> mode, passphrase-encrypted files are detected automatically
98 and the passphrase is requested interactively. Otherwise, one or more
99 <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">IDENTITIES</a> specified with <code>-i</code>/<code>--identity</code> are
100 used to decrypt the file.</p>
101
102 <p><code>age</code> encrypted files are binary and not malleable, with around 200 bytes of
103 overhead per recipient, plus 16 bytes every 64KiB of plaintext.</p>
104
105 <h2 id="OPTIONS">OPTIONS</h2>
106
107 <dl>
108 <dt>
109 <code>-o</code>, <code>--output</code>=<var>OUTPUT</var>
110 </dt>
111 <dd> Write encrypted or decrypted file to <var>OUTPUT</var> instead of standard output.
112 If <var>OUTPUT</var> already exists it will be overwritten.
113
114 <p>If encrypting without <code>--armor</code>, <code>age</code> will refuse to output binary to a
115 TTY. This can be forced by specifying <code>-</code> as <var>OUTPUT</var>.</p>
116 </dd>
117 <dt><code>--version</code></dt>
118 <dd> Print the version and exit.</dd>
119 </dl>
120
121 <h3 id="Encryption-options">Encryption options</h3>
122
123 <dl>
124 <dt>
125 <code>-e</code>, <code>--encrypt</code>
126 </dt>
127 <dd> Encrypt <var>INPUT</var> to <var>OUTPUT</var>. This is the default.</dd>
128 <dt>
129 <code>-r</code>, <code>--recipient</code>=<var>RECIPIENT</var>
130 </dt>
131 <dd> Encrypt to the explicitly specified <var>RECIPIENT</var>. See the
132 <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">RECIPIENTS AND IDENTITIES</a> section for possible recipient formats.
133
134 <p>This option can be repeated and combined with other recipient flags,
135 and the file can be decrypted by all provided recipients independently.</p>
136 </dd>
137 <dt>
138 <code>-R</code>, <code>--recipients-file</code>=<var>PATH</var>
139 </dt>
140 <dd> Encrypt to the <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">RECIPIENTS</a> listed in the
141 file at <var>PATH</var>, one per line. Empty lines and lines starting with <code>#</code>
142 are ignored as comments.
143
144 <p>If <var>PATH</var> is <code>-</code>, the recipients are read from standard input. In
145 this case, the <var>INPUT</var> argument must be specified.</p>
146
147 <p>This option can be repeated and combined with other recipient flags,
148 and the file can be decrypted by all provided recipients independently.</p>
149 </dd>
150 <dt>
151 <code>-p</code>, <code>--passphrase</code>
152 </dt>
153 <dd> Encrypt with a passphrase, requested interactively from the terminal.
154 <code>age</code> will offer to auto-generate a secure passphrase.
155
156 <p>This option can't be used with other recipient flags.</p>
157 </dd>
158 <dt>
159 <code>-a</code>, <code>--armor</code>
160 </dt>
161 <dd> Encrypt to an ASCII-only "armored" encoding.
162
163 <p><code>age</code> armor is a strict version of PEM with type <code>AGE ENCRYPTED FILE</code>,
164 canonical "strict" Base64, no headers, and no support for leading and
165 trailing extra data.</p>
166
167 <p>Decryption transparently detects and decodes ASCII armoring.</p>
168 </dd>
169 <dt>
170 <code>-i</code>, <code>--identity</code>=<var>PATH</var>
171 </dt>
172 <dd> Encrypt to the <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">RECIPIENTS</a> corresponding to the
173 <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">IDENTITIES</a> listed in the file at <var>PATH</var>. This
174 is equivalent to converting the file at <var>PATH</var> to a recipients file with
175 <code>age-keygen -y</code> and then passing that to <code>-R</code>/<code>--recipients-file</code>.
176
177 <p>For the format of <var>PATH</var>, see the definition of <code>-i</code>/<code>--identity</code> in the
178 <a href="#Decryption-options" title="Decryption options" data-bare-link="true">Decryption options</a> section.</p>
179
180 <p><code>-e</code>/<code>--encrypt</code> must be explicitly specified when using <code>-i</code>/<code>--identity</code>
181 in encryption mode to avoid confusion.</p>
182 </dd>
183 <dt>
184 <code>-j</code> <var>PLUGIN</var>
185 </dt>
186 <dd> Encrypt using the data-less <a href="#Plugins" title="Plugins" data-bare-link="true">plugin</a> <var>PLUGIN</var>.
187
188 <p>This is equivalent to using <code>-i</code>/<code>--identity</code> with a file that contains a
189 single plugin <code>IDENTITY</code> that encodes no plugin-specific data.</p>
190
191 <p><code>-e</code>/<code>--encrypt</code> must be explicitly specified when using <code>-j</code> in encryption
192 mode to avoid confusion.</p>
193 </dd>
194 </dl>
195
196 <h3 id="Decryption-options">Decryption options</h3>
197
198 <dl>
199 <dt>
200 <code>-d</code>, <code>--decrypt</code>
201 </dt>
202 <dd> Decrypt <var>INPUT</var> to <var>OUTPUT</var>.
203
204 <p>If <var>INPUT</var> is passphrase encrypted, it will be automatically detected
205 and the passphrase will be requested interactively. Otherwise, the
206 <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">IDENTITIES</a> specified with <code>-i</code>/<code>--identity</code>
207 are used.</p>
208
209 <p>ASCII armoring is transparently detected and decoded.</p>
210 </dd>
211 <dt>
212 <code>-i</code>, <code>--identity</code>=<var>PATH</var>
213 </dt>
214 <dd> Decrypt using the <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">IDENTITIES</a> at <var>PATH</var>.
215
216 <p><var>PATH</var> may be one of the following:</p>
217
218 <p>a. A file listing <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">IDENTITIES</a> one per line.
219 Empty lines and lines starting with "<code>#</code>" are ignored as comments.</p>
220
221 <p>b. A passphrase encrypted age file, containing
222 <a href="#RECIPIENTS-AND-IDENTITIES" title="RECIPIENTS AND IDENTITIES" data-bare-link="true">IDENTITIES</a> one per line like above.
223 The passphrase is requested interactively. Note that passphrase-protected
224 identity files are not necessary for most use cases, where access to the
225 encrypted identity file implies access to the whole system.</p>
226
227 <p>c. An SSH private key file, in PKCS#1, PKCS#8, or OpenSSH format.
228 If the private key is password-protected, the password is requested
229 interactively only if the SSH identity matches the file. See the
230 <a href="#SSH-keys" title="SSH keys" data-bare-link="true">SSH keys</a> section for more information, including supported key types.</p>
231
232 <p>d. "<code>-</code>", causing one of the options above to be read from standard input.
233 In this case, the <var>INPUT</var> argument must be specified.</p>
234
235 <p>This option can be repeated. Identities are tried in the order in which are
236 provided, and the first one matching one of the file's recipients is used.
237 Unused identities are ignored, but it is an error if the <var>INPUT</var> file is
238 passphrase-encrypted and <code>-i</code>/<code>--identity</code> is specified.</p>
239 </dd>
240 <dt>
241 <code>-j</code> <var>PLUGIN</var>
242 </dt>
243 <dd> Decrypt using the data-less <a href="#Plugins" title="Plugins" data-bare-link="true">plugin</a> <var>PLUGIN</var>.
244
245 <p>This is equivalent to using <code>-i</code>/<code>--identity</code> with a file that contains a
246 single plugin <code>IDENTITY</code> that encodes no plugin-specific data.</p>
247 </dd>
248 </dl>
249
250 <h2 id="RECIPIENTS-AND-IDENTITIES">RECIPIENTS AND IDENTITIES</h2>
251
252 <p><code>RECIPIENTS</code> are public values, like a public key, that a file can be encrypted
253 to. <code>IDENTITIES</code> are private values, like a private key, that allow decrypting
254 a file encrypted to the corresponding <code>RECIPIENT</code>.</p>
255
256 <h3 id="Native-keys">Native keys</h3>
257
258 <p>Native <code>age</code> key pairs are generated with <a class="man-ref" href="age-keygen.1.html">age-keygen<span class="s">(1)</span></a>, and provide small
259 encodings and strong encryption based on X25519 for classic keys, and X25519 +
260 ML-KEM-768 for post-quantum hybrid keys. The post-quantum hybrid keys are secure
261 against future quantum computers and are the recommended recipient type for most
262 applications.</p>
263
264 <p>A hybrid <code>RECIPIENT</code> encoding begins with <code>age1pq1</code> and looks like the following:</p>
265
266 <pre><code>age1pq167[... 1950 more characters ...]
267 </code></pre>
268
269 <p>A hybrid <code>IDENTITY</code> encoding begins with <code>AGE-SECRET-KEY-PQ-1</code> and looks like
270 the following:</p>
271
272 <pre><code>AGE-SECRET-KEY-PQ-1K30MYPZAHAXHR22YHH27EGDVLU0QNSUH3DSV7J7NR3X6D9LHXNWSDLTV4T
273 </code></pre>
274
275 <p>A classic <code>RECIPIENT</code> encoding begins with <code>age1</code> and looks like the following:</p>
276
277 <pre><code>age1gde3ncmahlqd9gg50tanl99r960llztrhfapnmx853s4tjum03uqfssgdh
278 </code></pre>
279
280 <p>A classic <code>IDENTITY</code> encoding begins with <code>AGE-SECRET-KEY-1</code> and looks like the
281 following:</p>
282
283 <pre><code>AGE-SECRET-KEY-1KTYK6RVLN5TAPE7VF6FQQSKZ9HWWCDSKUGXXNUQDWZ7XXT5YK5LSF3UTKQ
284 </code></pre>
285
286 <p>A file can't be encrypted to both post-quantum and classic keys, as that would
287 defeat the post-quantum security of the encryption.</p>
288
289 <p>An encrypted file can't be linked to the native recipient it's encrypted to
290 without access to the corresponding identity.</p>
291
292 <h3 id="SSH-keys">SSH keys</h3>
293
294 <p>As a convenience feature, <code>age</code> also supports encrypting to RSA or Ed25519
295 <span class="man-ref">ssh<span class="s">(1)</span></span> keys. RSA keys must be at least 2048 bits. This feature employs more
296 complex cryptography, and should only be used when a native key is not available
297 for the recipient. Note that SSH keys might not be protected long-term by the
298 recipient, since they are revokable when used only for authentication.</p>
299
300 <p>A <code>RECIPIENT</code> encoding is an SSH public key in <code>authorized_keys</code> format
301 (see the <code>AUTHORIZED_KEYS FILE FORMAT</code> section of <span class="man-ref">sshd<span class="s">(8)</span></span>), starting with
302 <code>ssh-rsa</code> or <code>ssh-ed25519</code>, like the following:</p>
303
304 <pre><code>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDULTit0KUehbi[...]GU4BtElAbzh8=
305 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH9pO5pz22JZEas[...]l1uZc31FGYMXa
306 </code></pre>
307
308 <p>The comment at the end of the line, if present, is ignored.</p>
309
310 <p>In recipient files passed to <code>-R</code>/<code>--recipients-file</code>, unsupported but valid
311 SSH public keys are ignored with a warning, to facilitate using
312 <code>authorized_keys</code> or GitHub <code>.keys</code> files. (See <a href="#EXAMPLES" title="EXAMPLES" data-bare-link="true">EXAMPLES</a>.)</p>
313
314 <p>An <code>IDENTITY</code> is an SSH private key <em>file</em> passed individually to
315 <code>-i</code>/<code>--identity</code>. Note that keys held on hardware tokens such as YubiKeys
316 or accessed via <span class="man-ref">ssh-agent<span class="s">(1)</span></span> are not supported.</p>
317
318 <p>An encrypted file <em>can</em> be linked to the SSH public key it was encrypted to.
319 This is so that <code>age</code> can identify the correct SSH private key before
320 requesting its password, if any.</p>
321
322 <h3 id="Plugins">Plugins</h3>
323
324 <p><code>age</code> can be extended through plugins. A plugin is only loaded if a corresponding
325 <code>RECIPIENT</code> or <code>IDENTITY</code> is specified. (Simply decrypting a file encrypted with
326 a plugin will not cause it to load, for security reasons among others.)</p>
327
328 <p>A <code>RECIPIENT</code> for a plugin named <code>example</code> starts with <code>age1example1</code>, while an
329 <code>IDENTITY</code> starts with <code>AGE-PLUGIN-EXAMPLE-1</code>. They both encode arbitrary
330 plugin-specific data, and are generated by the plugin.</p>
331
332 <p>When either is specified, <code>age</code> searches for <code>age-plugin-example</code> in the PATH
333 and executes it to perform the file header encryption or decryption. The plugin
334 may request input from the user through <code>age</code> to complete the operation.</p>
335
336 <p>Plugins can be freely mixed with other plugins or natively supported keys.</p>
337
338 <p>A plugin is not bound to only encrypt or decrypt files meant for or generated by
339 the plugin. For example, a plugin can be used to decrypt files encrypted to a
340 native X25519 <code>RECIPIENT</code> or even with a passphrase. Similarly, a plugin can
341 encrypt a file such that it can be decrypted without the use of any plugin.</p>
342
343 <p>Plugins for which the <code>IDENTITY</code>/<code>RECIPIENT</code> distinction doesn't make sense
344 (such as a symmetric encryption plugin) may generate only an <code>IDENTITY</code> and
345 instruct the user to perform encryption with the <code>-e</code>/<code>--encrypt</code> and
346 <code>-i</code>/<code>--identity</code> flags. Plugins for which the concept of separate identities
347 doesn't make sense (such as a password-encryption plugin) may instruct the user
348 to use the <code>-j</code> flag.</p>
349
350 <h4 id="Tagged-recipients">Tagged recipients</h4>
351
352 <p><code>age</code> can natively encrypt to recipients starting with <code>age1tag1</code> (using P-256
353 ECDH) or <code>age1tagpq1</code> (using the ML-KEM-768 + P-256 post-quantum hybrid). These
354 are intended to be the public side of private keys held in hardware.</p>
355
356 <p>They are directly supported to avoid the need to install the plugin, which may
357 be platform-specific, on the encrypting side.</p>
358
359 <p>The tag reduces privacy, by allowing an observer to correlate files with a
360 recipient (but not files amongst them without knowledge of the recipient),
361 but this is also a desirable property for hardware keys that require user
362 interaction for each decryption operation.</p>
363
364 <h2 id="EXIT-STATUS">EXIT STATUS</h2>
365
366 <p><code>age</code> will exit 0 if and only if encryption or decryption are successful for the
367 full length of the input.</p>
368
369 <p>If an error occurs during decryption, partial output might still be generated,
370 but only if it was possible to securely authenticate it. No unauthenticated
371 output is ever released.</p>
372
373 <h2 id="BACKWARDS-COMPATIBILITY">BACKWARDS COMPATIBILITY</h2>
374
375 <p>Files encrypted with a stable version (not alpha, beta, or release candidate) of
376 <code>age</code>, or with any v1.0.0 beta or release candidate, will decrypt with any later
377 version of the tool.</p>
378
379 <p>If decrypting older files poses a security risk, doing so might cause an error
380 by default. In this case, a flag will be provided to force the operation.</p>
381
382 <h2 id="EXAMPLES">EXAMPLES</h2>
383
384 <p>Generate a new post-quantum identity, encrypt data, and decrypt:</p>
385
386 <pre><code>$ age-keygen -pq -o key.txt
387 Public key: age1pq167[... 1950 more characters ...]
388
389 $ tar cvz ~/data | age -r age1pq167[...] &gt; data.tar.gz.age
390
391 $ age -d -o data.tar.gz -i key.txt data.tar.gz.age
392 </code></pre>
393
394 <p>Encrypt <code>example.jpg</code> to multiple recipients and output to <code>example.jpg.age</code>:</p>
395
396 <pre><code>$ age -o example.jpg.age -r age1pq167[...] -r age1pq1e3[...] example.jpg
397 </code></pre>
398
399 <p>Encrypt to a list of recipients:</p>
400
401 <pre><code>$ cat &gt; recipients.txt
402 # Alice
403 age1pq167[... 1950 more characters ...]
404 # Bob
405 age1pq1e3[... 1950 more characters ...]
406
407 $ age -R recipients.txt example.jpg &gt; example.jpg.age
408 </code></pre>
409
410 <p>Encrypt and decrypt a file using a passphrase:</p>
411
412 <pre><code>$ age -p secrets.txt &gt; secrets.txt.age
413 Enter passphrase (leave empty to autogenerate a secure one):
414 Using the autogenerated passphrase "release-response-step-brand-wrap-ankle-pair-unusual-sword-train".
415
416 $ age -d secrets.txt.age &gt; secrets.txt
417 Enter passphrase:
418 </code></pre>
419
420 <p>Encrypt and decrypt with a passphrase-protected identity file:</p>
421
422 <pre><code>$ age-keygen | age -p &gt; key.age
423 Public key: age1yhm4gctwfmrpz87tdslm550wrx6m79y9f2hdzt0lndjnehwj0ukqrjpyx5
424 Enter passphrase (leave empty to autogenerate a secure one):
425 Using the autogenerated passphrase "hip-roast-boring-snake-mention-east-wasp-honey-input-actress".
426
427 $ age -r age1yhm4gctwfmrpz87tdslm550wrx6m79y9f2hdzt0lndjnehwj0ukqrjpyx5 secrets.txt &gt; secrets.txt.age
428
429 $ age -d -i key.age secrets.txt.age &gt; secrets.txt
430 Enter passphrase for identity file "key.age":
431 </code></pre>
432
433 <p>Encrypt and decrypt with an SSH public key:</p>
434
435 <pre><code>$ age -R ~/.ssh/id_ed25519.pub example.jpg &gt; example.jpg.age
436
437 $ age -d -i ~/.ssh/id_ed25519 example.jpg.age &gt; example.jpg
438 </code></pre>
439
440 <p>Encrypt and decrypt with age-plugin-yubikey:</p>
441
442 <pre><code>$ age-plugin-yubikey # run interactive setup, generate identity file and obtain recipient
443
444 $ age -r age1yubikey1qwt50d05nh5vutpdzmlg5wn80xq5negm4uj9ghv0snvdd3yysf5yw3rhl3t secrets.txt &gt; secrets.txt.age
445
446 $ age -d -i age-yubikey-identity-388178f3.txt secrets.txt.age
447 </code></pre>
448
449 <p>Encrypt to the SSH keys of a GitHub user:</p>
450
451 <pre><code>$ curl https://github.com/benjojo.keys | age -R - example.jpg &gt; example.jpg.age
452 </code></pre>
453
454 <h2 id="SEE-ALSO">SEE ALSO</h2>
455
456 <p><a class="man-ref" href="age-keygen.1.html">age-keygen<span class="s">(1)</span></a>, <a class="man-ref" href="age-inspect.1.html">age-inspect<span class="s">(1)</span></a></p>
457
458 <h2 id="AUTHORS">AUTHORS</h2>
459
460 <p>Filippo Valsorda <a href="mailto:[email protected]" data-bare-link="true">[email protected]</a></p>
461
462 <ol class='man-decor man-foot man foot'>
463 <li class='tl'></li>
464 <li class='tc'>August 2026</li>
465 <li class='tr'>age(1)</li>
466 </ol>
467
468 </div>
469 </body>
470 </html>