Debian Codegraph @

doc/age-plugin-batchpass.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-plugin-batchpass(1) - non-interactive passphrase encryption plugin for age(1)</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="#WARNING">WARNING</a>
60 <a href="#ENVIRONMENT">ENVIRONMENT</a>
61 <a href="#EXAMPLES">EXAMPLES</a>
62 <a href="#SEE-ALSO">SEE ALSO</a>
63 <a href="#AUTHORS">AUTHORS</a>
64 </div>
65
66 <ol class='man-decor man-head man head'>
67 <li class='tl'>age-plugin-batchpass(1)</li>
68 <li class='tc'></li>
69 <li class='tr'>age-plugin-batchpass(1)</li>
70 </ol>
71
72
73
74 <h2 id="NAME">NAME</h2>
75 <p class="man-name">
76 <code>age-plugin-batchpass</code> - <span class="man-whatis">non-interactive passphrase encryption plugin for <a class="man-ref" href="age.1.html">age<span class="s">(1)</span></a></span>
77 </p>
78 <h2 id="SYNOPSIS">SYNOPSIS</h2>
79
80 <p><code>age</code> <code>-e</code> <code>-j</code> <code>batchpass</code><br>
81 <code>age</code> <code>-d</code> <code>-j</code> <code>batchpass</code><br></p>
82
83 <h2 id="DESCRIPTION">DESCRIPTION</h2>
84
85 <p><code>age-plugin-batchpass</code> is an <a class="man-ref" href="age.1.html">age<span class="s">(1)</span></a> plugin that enables non-interactive
86 passphrase-based encryption and decryption using environment variables.</p>
87
88 <h2 id="WARNING">WARNING</h2>
89
90 <p>This functionality is not built into the age CLI because most applications
91 should use native keys instead of scripting passphrase-based encryption.</p>
92
93 <p>Humans are notoriously bad at remembering and generating strong passphrases.
94 age uses scrypt to partially mitigate this, which is necessarily very slow.</p>
95
96 <p>If a computer will be doing the remembering anyway, you can and should use
97 native keys instead. There is no need to manage separate public and private
98 keys, you encrypt directly to the private key:</p>
99
100 <pre><code>$ age-keygen -o key.txt
101 $ age -e -i key.txt file.txt &gt; file.txt.age
102 $ age -d -i key.txt file.txt.age &gt; file.txt
103 </code></pre>
104
105 <p>Likewise, you can store a native identity string in an environment variable
106 or through your CI secrets manager and use it to encrypt and decrypt files
107 non-interactively:</p>
108
109 <pre><code>$ export AGE_SECRET=$(age-keygen)
110 $ age -e -i &lt;(echo "$AGE_SECRET") file.txt &gt; file.txt.age
111 $ age -d -i &lt;(echo "$AGE_SECRET") file.txt.age &gt; file.txt
112 </code></pre>
113
114 <p>The age CLI also natively supports passphrase-encrypted identity files, so you
115 can use that functionality to non-interactively encrypt multiple files such that
116 you will be able to decrypt them later by entering the same passphrase:</p>
117
118 <pre><code>$ age-keygen -pq | age -p -o encrypted-identity.txt
119 Public key: age1pq1cd[... 1950 more characters ...]
120 Enter passphrase (leave empty to autogenerate a secure one):
121 age: using autogenerated passphrase "eternal-erase-keen-suffer-fog-exclude-huge-scorpion-escape-scrub"
122 $ age -r age1pq1cd[... 1950 more characters ...] file.txt &gt; file.txt.age
123 $ age -d -i encrypted-identity.txt file.txt.age &gt; file.txt
124 Enter passphrase for identity file "encrypted-identity.txt":
125 </code></pre>
126
127 <p>Finally, when using this plugin care should be taken not to let the password be
128 persisted in the shell history or leaked to other users on multi-user systems.</p>
129
130 <h2 id="ENVIRONMENT">ENVIRONMENT</h2>
131
132 <dl>
133 <dt><code>AGE_PASSPHRASE</code></dt>
134 <dd> The passphrase to use for encryption or decryption.
135 Mutually exclusive with <code>AGE_PASSPHRASE_FD</code>.</dd>
136 <dt><code>AGE_PASSPHRASE_FD</code></dt>
137 <dd> A file descriptor number to read the passphrase from.
138 Trailing newlines are stripped from the file contents.
139 Mutually exclusive with <code>AGE_PASSPHRASE</code>.</dd>
140 <dt><code>AGE_PASSPHRASE_WORK_FACTOR</code></dt>
141 <dd> The scrypt work factor to use when encrypting.
142 Must be between 1 and 30. Default is 18.
143 Higher values are more secure but slower.
144 The age CLI refuses to decrypt files above 22, and so does this plugin
145 unless <code>AGE_PASSPHRASE_MAX_WORK_FACTOR</code> is set to at least the same value.</dd>
146 <dt><code>AGE_PASSPHRASE_MAX_WORK_FACTOR</code></dt>
147 <dd> The maximum scrypt work factor to accept when decrypting.
148 Must be between 1 and 30. Default is 22.
149 Can be used to avoid very slow decryptions, or to allow slower ones.</dd>
150 </dl>
151
152 <h2 id="EXAMPLES">EXAMPLES</h2>
153
154 <p>Encrypt a file with a passphrase:</p>
155
156 <pre><code>$ AGE_PASSPHRASE=secret age -e -j batchpass file.txt &gt; file.txt.age
157 </code></pre>
158
159 <p>Decrypt a file with a passphrase:</p>
160
161 <pre><code>$ AGE_PASSPHRASE=secret age -d -j batchpass file.txt.age &gt; file.txt
162 </code></pre>
163
164 <p>Read the passphrase from a file descriptor:</p>
165
166 <pre><code>$ AGE_PASSPHRASE_FD=3 age -e -j batchpass file.txt 3&lt; passphrase.txt &gt; file.txt.age
167 </code></pre>
168
169 <h2 id="SEE-ALSO">SEE ALSO</h2>
170
171 <p><a class="man-ref" href="age.1.html">age<span class="s">(1)</span></a></p>
172
173 <h2 id="AUTHORS">AUTHORS</h2>
174
175 <p>Filippo Valsorda <a href="mailto:[email protected]" data-bare-link="true">[email protected]</a></p>
176
177 <ol class='man-decor man-foot man foot'>
178 <li class='tl'></li>
179 <li class='tc'>August 2026</li>
180 <li class='tr'>age-plugin-batchpass(1)</li>
181 </ol>
182
183 </div>
184 </body>
185 </html>