Mercurial > projects > sencrypt
comparison sencrypt.1.xml @ 1:f0ceb0ad20e7 version-1
Add manpage
author | Guido Berhoerster <guido+sencrypt@berhoerster.name> |
---|---|
date | Thu, 30 Jan 2014 00:00:13 +0100 |
parents | |
children | 8e9dd5328b5a |
comparison
equal
deleted
inserted
replaced
0:73af139d1a94 | 1:f0ceb0ad20e7 |
---|---|
1 <?xml version="1.0"?> | |
2 <!-- | |
3 | |
4 Copyright (C) 2014 Guido Berhoerster <guido+sencrypt@berhoerster.name> | |
5 | |
6 Permission is hereby granted, free of charge, to any person obtaining | |
7 a copy of this software and associated documentation files (the | |
8 "Software"), to deal in the Software without restriction, including | |
9 without limitation the rights to use, copy, modify, merge, publish, | |
10 distribute, sublicense, and/or sell copies of the Software, and to | |
11 permit persons to whom the Software is furnished to do so, subject to | |
12 the following conditions: | |
13 | |
14 The above copyright notice and this permission notice shall be included | |
15 in all copies or substantial portions of the Software. | |
16 | |
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
18 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
19 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
20 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | |
21 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |
22 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |
23 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
24 | |
25 --> | |
26 <refentry xmlns="http://docbook.org/ns/docbook" xml:lang="en"> | |
27 <info> | |
28 <author> | |
29 <personname> | |
30 <firstname>Guido</firstname> | |
31 <surname>Berhoerster</surname> | |
32 </personname> | |
33 <email>guido+sencrypt@berhoerster.name</email> | |
34 <personblurb/> | |
35 </author> | |
36 <date>21 January, 2014</date> | |
37 </info> | |
38 <refmeta> | |
39 <refentrytitle>sencrypt</refentrytitle> | |
40 <manvolnum>1</manvolnum> | |
41 <refmiscinfo class="source"/> | |
42 <refmiscinfo class="version"/> | |
43 <refmiscinfo class="manual">User Commands</refmiscinfo> | |
44 </refmeta> | |
45 <refnamediv> | |
46 <refname>sencrypt</refname> | |
47 <refname>sdecrypt</refname> | |
48 <refpurpose>encrypt and decrypt data</refpurpose> | |
49 </refnamediv> | |
50 <refsynopsisdiv> | |
51 <cmdsynopsis> | |
52 <command>sencrypt</command> | |
53 <arg choice="req"> | |
54 <option>-l</option> | |
55 </arg> | |
56 </cmdsynopsis> | |
57 <cmdsynopsis> | |
58 <command>sencrypt</command> | |
59 <arg choice="opt"> | |
60 <option>-v</option> | |
61 </arg> | |
62 <arg choice="req"> | |
63 <option>-a</option> | |
64 <replaceable>algorithm</replaceable> | |
65 </arg> | |
66 <arg choice="opt"> | |
67 <option>-k</option> | |
68 <replaceable>key_file</replaceable> | |
69 </arg> | |
70 <arg choice="opt"> | |
71 <option>-i</option> | |
72 <replaceable>input_file</replaceable> | |
73 </arg> | |
74 <arg choice="opt"> | |
75 <option>-o</option> | |
76 <replaceable>output_file</replaceable> | |
77 </arg> | |
78 </cmdsynopsis> | |
79 <cmdsynopsis> | |
80 <command>sdecrypt</command> | |
81 <arg choice="req"> | |
82 <option>-l</option> | |
83 </arg> | |
84 </cmdsynopsis> | |
85 <cmdsynopsis> | |
86 <command>sdecrypt</command> | |
87 <arg choice="opt"> | |
88 <option>-v</option> | |
89 </arg> | |
90 <arg choice="req"> | |
91 <option>-a</option> | |
92 <replaceable>algorithm</replaceable> | |
93 </arg> | |
94 <arg choice="opt"> | |
95 <option>-k</option> | |
96 <replaceable>key_file</replaceable> | |
97 </arg> | |
98 <arg choice="opt"> | |
99 <option>-i</option> | |
100 <replaceable>input_file</replaceable> | |
101 </arg> | |
102 <arg choice="opt"> | |
103 <option>-o</option> | |
104 <replaceable>output_file</replaceable> | |
105 </arg> | |
106 </cmdsynopsis> | |
107 </refsynopsisdiv> | |
108 <refsect1> | |
109 <title>Description</title> | |
110 <para>The <command>sencrypt</command> utility encrypts data and the | |
111 <command>sdecrypt</command> utility decrypts data using the specified | |
112 algorithm. A key file must be a regular file and have the exact size of the | |
113 desired key length, its content will be used verbatim as the key. If no key | |
114 file is specified <command>sencrypt</command> or | |
115 <command>sdecrypt</command> will ask for a passphrase and use that together | |
116 with a salt to derive a key using the PBKDF2 key derivation function. If no | |
117 input file is specfified, the input will be read from stdin. If no output | |
118 file is specfied, the output will be written to stdout. The input and | |
119 output file may be identical, in which case the content of the input file | |
120 is replaced with the output after successful encryption or decryption. The | |
121 algorithm used for encrypting data is not saved and needs to be explicitly | |
122 specified when decrypting data.</para> | |
123 <para><command>sencrypt</command> and <command>sdecrypt</command> are | |
124 portable and compatible reimplementations of the <command>encrypt</command> | |
125 and <command>decrypt</command> utilities in Solaris/Illumos-based operating | |
126 systems.</para> | |
127 </refsect1> | |
128 <refsect1> | |
129 <title>Options</title> | |
130 <para>The following options are supported:</para> | |
131 <variablelist> | |
132 <varlistentry> | |
133 <term> | |
134 <option>-l</option> | |
135 </term> | |
136 <listitem> | |
137 <para>List the available algorithms and supported key lengths and | |
138 exit.</para> | |
139 </listitem> | |
140 </varlistentry> | |
141 <varlistentry> | |
142 <term> | |
143 <option>-a</option> | |
144 <replaceable>algorithm</replaceable> | |
145 </term> | |
146 <listitem> | |
147 <para>Use the specified algorithm.</para> | |
148 </listitem> | |
149 </varlistentry> | |
150 <varlistentry> | |
151 <term> | |
152 <option>-k</option> | |
153 <replaceable>key_file</replaceable> | |
154 </term> | |
155 <listitem> | |
156 <para>Read key data from specified key file. Key size requirements | |
157 depend on the selected algorithm.</para> | |
158 </listitem> | |
159 </varlistentry> | |
160 <varlistentry> | |
161 <term> | |
162 <option>-i</option> | |
163 <replaceable>input_file</replaceable> | |
164 </term> | |
165 <listitem> | |
166 <para>Read the input from the specified file.</para> | |
167 </listitem> | |
168 </varlistentry> | |
169 <varlistentry> | |
170 <term> | |
171 <option>-o</option> | |
172 <replaceable>output_file</replaceable> | |
173 </term> | |
174 <listitem> | |
175 <para>Write the output to the specified file.</para> | |
176 </listitem> | |
177 </varlistentry> | |
178 <varlistentry> | |
179 <term> | |
180 <option>-v</option> | |
181 </term> | |
182 <listitem> | |
183 <para>Ignored for compatibility with <command>encrypt</command> and | |
184 <command>decrypt</command>.</para> | |
185 </listitem> | |
186 </varlistentry> | |
187 </variablelist> | |
188 </refsect1> | |
189 <refsect1> | |
190 <title>Examples</title> | |
191 <example> | |
192 <title>Encrypt a file with the AES algorithm</title> | |
193 <para>The following example encrypts a file with the AES algorithm:</para> | |
194 <screen> | |
195 $ sencrypt -a aes -i secret.txt -o secret.aes | |
196 </screen> | |
197 </example> | |
198 <example> | |
199 <title>Decrypt a file in-place</title> | |
200 <para>The following example decrypts a file in-place:</para> | |
201 <screen> | |
202 $ sdecrypt -a 3des -i data.bin -o data.bin | |
203 </screen> | |
204 </example> | |
205 <example> | |
206 <title>Encrypt a file using a key file</title> | |
207 <para>The following example generates a key file with 512 bits of random | |
208 data and uses it to encrypt a file:</para> | |
209 <screen> | |
210 $ dd if=/dev/urandom of=key.bin bs=64 count=1 | |
211 $ sencrypt -a arcfour -k key.bin -i secret.txt -o secret.rc4 | |
212 </screen> | |
213 </example> | |
214 <example> | |
215 <title>Pipe data trough encrypt in order to make a remote encrypted | |
216 backup</title> | |
217 <para>The following example creates an archive in the tar format, | |
218 encrypts it and sends it to a remote location via | |
219 <abbrev>SSH</abbrev>:</para> | |
220 <screen> | |
221 $ pax -w -x ustar /home | sencrypt -a aes -k backup-key.bin |\ | |
222 ssh backuphost 'cat > home.tar' | |
223 </screen> | |
224 </example> | |
225 </refsect1> | |
226 <refsect1> | |
227 <title>Exit Status</title> | |
228 <para>The following exit values are returned:</para> | |
229 <variablelist> | |
230 <varlistentry> | |
231 <term>0</term> | |
232 <listitem> | |
233 <para>Command successfully executed.</para> | |
234 </listitem> | |
235 </varlistentry> | |
236 <varlistentry> | |
237 <term>> 0</term> | |
238 <listitem> | |
239 <para>An error has occured.</para> | |
240 </listitem> | |
241 </varlistentry> | |
242 </variablelist> | |
243 </refsect1> | |
244 </refentry> |