1 .\" Copyright 2009 Colin Percival
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .Nd encrypt and decrypt files.
34 .Op Fl m Ar maxmemfrac
42 and writes the result to
44 if specified, or the standard output otherwise.
45 The user will be prompted to enter a passphrase (twice) to
46 be used to generate a derived encryption key.
51 and writes the result to
53 if specified, or the standard output otherwise.
54 The user will be prompted to enter the passphrase used at
55 encryption time to generate the derived encryption key.
57 .Bl -tag -width "-m maxmemfrac"
61 bytes of RAM to compute the derived encryption key.
62 .It Fl m Ar maxmemfrac
63 Use at most the fraction
65 of the available RAM to compute the derived encryption key.
69 seconds of CPU time to compute the derived encryption key.
73 the memory and CPU time limits are enforced by picking
74 appropriate parameters to the
76 key derivation function.
79 the memory and CPU time limits are enforced by exiting with
80 an error if decrypting the file would require too much memory
85 utility exits 0 on success, and >0 if an error occurs.
87 Note that if the input encrypted file is corrupted,
89 may produce output prior to determining that the input
90 was corrupt and exiting with a non-zero status; so
91 users should direct the output to a safe location and
92 check the exit status of
94 before using the decrypted data.
98 .%T "Stronger Key Derivation via Sequential Memory-Hard Functions"
99 .%O "Presented at BSDCan'09"
105 utility was written in May 2009 by Colin Percival as a
108 key derivation function.
111 key derivation function was invented in March 2009 by Colin
112 Percival in order to allow key files from the
114 backup system to be passphrase protected.