summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/des/des.man
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/des/des.man186
1 files changed, 186 insertions, 0 deletions
diff --git a/src/lib/libcrypto/des/des.man b/src/lib/libcrypto/des/des.man
new file mode 100644
index 0000000000..7e06a1851a
--- /dev/null
+++ b/src/lib/libcrypto/des/des.man
@@ -0,0 +1,186 @@
1.TH DES 1
2.SH NAME
3des - encrypt or decrypt data using Data Encryption Standard
4.SH SYNOPSIS
5.B des
6(
7.B \-e
8|
9.B \-E
10) | (
11.B \-d
12|
13.B \-D
14) | (
15.B \-\fR[\fPcC\fR][\fPckname\fR]\fP
16) |
17[
18.B \-b3hfs
19] [
20.B \-k
21.I key
22]
23] [
24.B \-u\fR[\fIuuname\fR]
25[
26.I input-file
27[
28.I output-file
29] ]
30.SH DESCRIPTION
31.B des
32encrypts and decrypts data using the
33Data Encryption Standard algorithm.
34One of
35.B \-e, \-E
36(for encrypt) or
37.B \-d, \-D
38(for decrypt) must be specified.
39It is also possible to use
40.B \-c
41or
42.B \-C
43in conjunction or instead of the a encrypt/decrypt option to generate
44a 16 character hexadecimal checksum, generated via the
45.I des_cbc_cksum.
46.LP
47Two standard encryption modes are supported by the
48.B des
49program, Cipher Block Chaining (the default) and Electronic Code Book
50(specified with
51.B \-b
52).
53.LP
54The key used for the DES
55algorithm is obtained by prompting the user unless the
56.B `\-k
57.I key'
58option is given.
59If the key is an argument to the
60.B des
61command, it is potentially visible to users executing
62.BR ps (1)
63or a derivative. To minimise this possibility,
64.B des
65takes care to destroy the key argument immediately upon entry.
66If your shell keeps a history file be careful to make sure it is not
67world readable.
68.LP
69Since this program attempts to maintain compatability with sunOS's
70des(1) command, there are 2 different methods used to convert the user
71supplied key to a des key.
72Whenever and one or more of
73.B \-E, \-D, \-C
74or
75.B \-3
76options are used, the key conversion procedure will not be compatible
77with the sunOS des(1) version but will use all the user supplied
78character to generate the des key.
79.B des
80command reads from standard input unless
81.I input-file
82is specified and writes to standard output unless
83.I output-file
84is given.
85.SH OPTIONS
86.TP
87.B \-b
88Select ECB
89(eight bytes at a time) encryption mode.
90.TP
91.B \-3
92Encrypt using triple encryption.
93By default triple cbc encryption is used but if the
94.B \-b
95option is used then triple ecb encryption is performed.
96If the key is less than 8 characters long, the flag has no effect.
97.TP
98.B \-e
99Encrypt data using an 8 byte key in a manner compatible with sunOS
100des(1).
101.TP
102.B \-E
103Encrypt data using a key of nearly unlimited length (1024 bytes).
104This will product a more secure encryption.
105.TP
106.B \-d
107Decrypt data that was encrypted with the \-e option.
108.TP
109.B \-D
110Decrypt data that was encrypted with the \-E option.
111.TP
112.B \-c
113Generate a 16 character hexadecimal cbc checksum and output this to
114stderr.
115If a filename was specified after the
116.B \-c
117option, the checksum is output to that file.
118The checksum is generated using a key generated in a sunOS compatible
119manner.
120.TP
121.B \-C
122A cbc checksum is generated in the same manner as described for the
123.B \-c
124option but the DES key is generated in the same manner as used for the
125.B \-E
126and
127.B \-D
128options
129.TP
130.B \-f
131Does nothing - allowed for compatibility with sunOS des(1) command.
132.TP
133.B \-s
134Does nothing - allowed for compatibility with sunOS des(1) command.
135.TP
136.B "\-k \fIkey\fP"
137Use the encryption
138.I key
139specified.
140.TP
141.B "\-h"
142The
143.I key
144is assumed to be a 16 character hexadecimal number.
145If the
146.B "\-3"
147option is used the key is assumed to be a 32 character hexadecimal
148number.
149.TP
150.B \-u
151This flag is used to read and write uuencoded files. If decrypting,
152the input file is assumed to contain uuencoded, DES encrypted data.
153If encrypting, the characters following the -u are used as the name of
154the uuencoded file to embed in the begin line of the uuencoded
155output. If there is no name specified after the -u, the name text.des
156will be embedded in the header.
157.SH SEE ALSO
158.B ps (1)
159.B des_crypt(3)
160.SH BUGS
161.LP
162The problem with using the
163.B -e
164option is the short key length.
165It would be better to use a real 56-bit key rather than an
166ASCII-based 56-bit pattern. Knowing that the key was derived from ASCII
167radically reduces the time necessary for a brute-force cryptographic attack.
168My attempt to remove this problem is to add an alternative text-key to
169DES-key function. This alternative function (accessed via
170.B -E, -D, -S
171and
172.B -3
173)
174uses DES to help generate the key.
175.LP
176Be carefully when using the -u option. Doing des -ud <filename> will
177not decrypt filename (the -u option will gobble the d option).
178.LP
179The VMS operating system operates in a world where files are always a
180multiple of 512 bytes. This causes problems when encrypted data is
181send from unix to VMS since a 88 byte file will suddenly be padded
182with 424 null bytes. To get around this problem, use the -u option
183to uuencode the data before it is send to the VMS system.
184.SH AUTHOR
185.LP
186Eric Young (eay@cryptsoft.com)