OLD | NEW |
| (Empty) |
1 .\" Copyright 2009 Colin Percival | |
2 .\" All rights reserved. | |
3 .\" | |
4 .\" Redistribution and use in source and binary forms, with or without | |
5 .\" modification, are permitted provided that the following conditions | |
6 .\" are met: | |
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. | |
12 .\" | |
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 | |
23 .\" SUCH DAMAGE. | |
24 .Dd May 24, 2009 | |
25 .Dt SCRYPT 1 | |
26 .Os | |
27 .Sh NAME | |
28 .Nm scrypt | |
29 .Nd encrypt and decrypt files. | |
30 .Sh SYNOPSIS | |
31 .Nm | |
32 .Brq Cm enc | Cm dec | |
33 .Op Fl M Ar maxmem | |
34 .Op Fl m Ar maxmemfrac | |
35 .Op Fl t Ar maxtime | |
36 .Ar infile | |
37 .Op Ar outfile | |
38 .Sh DESCRIPTION | |
39 .Nm Cm enc | |
40 encrypts | |
41 .Ar infile | |
42 and writes the result to | |
43 .Ar outfile | |
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. | |
47 .Pp | |
48 .Nm Cm dec | |
49 decrypts | |
50 .Ar infile | |
51 and writes the result to | |
52 .Ar outfile | |
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. | |
56 .Sh OPTIONS | |
57 .Bl -tag -width "-m maxmemfrac" | |
58 .It Fl M Ar maxmem | |
59 Use at most | |
60 .Ar maxmem | |
61 bytes of RAM to compute the derived encryption key. | |
62 .It Fl m Ar maxmemfrac | |
63 Use at most the fraction | |
64 .Ar maxmemfrac | |
65 of the available RAM to compute the derived encryption key. | |
66 .It Fl t Ar maxtime | |
67 Usr at most | |
68 .Ar maxtime | |
69 seconds of CPU time to compute the derived encryption key. | |
70 .El | |
71 In | |
72 .Nm Cm enc , | |
73 the memory and CPU time limits are enforced by picking | |
74 appropriate parameters to the | |
75 .Nm | |
76 key derivation function. | |
77 In | |
78 .Nm Cm dec , | |
79 the memory and CPU time limits are enforced by exiting with | |
80 an error if decrypting the file would require too much memory | |
81 or CPU time. | |
82 .Sh EXIT STATUS | |
83 The | |
84 .Nm | |
85 utility exits 0 on success, and >0 if an error occurs. | |
86 .Pp | |
87 Note that if the input encrypted file is corrupted, | |
88 .Nm Cm dec | |
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 | |
93 .Nm | |
94 before using the decrypted data. | |
95 .Sh SEE ALSO | |
96 .Rs | |
97 .%A "Colin Percival" | |
98 .%T "Stronger Key Derivation via Sequential Memory-Hard Functions" | |
99 .%O "Presented at BSDCan'09" | |
100 .%D "May 2009" | |
101 .Re | |
102 .Sh HISTORY | |
103 The | |
104 .Nm | |
105 utility was written in May 2009 by Colin Percival as a | |
106 demonstration of the | |
107 .Nm | |
108 key derivation function. | |
109 The | |
110 .Nm | |
111 key derivation function was invented in March 2009 by Colin | |
112 Percival in order to allow key files from the | |
113 .Nm tarsnap | |
114 backup system to be passphrase protected. | |
OLD | NEW |