BSD 4_4 release
[unix-history] / usr / src / Domestic / src / crypt / crypt.1
CommitLineData
ad787160 1.\" @(#)crypt.1 6.4 (Berkeley) 4/22/91
c38495d9 2.\"
ad787160 3.TH CRYPT 1 "April 22, 1991"
c38495d9
KM
4.AT 3
5.SH NAME
6crypt \- encode/decode
7.SH SYNOPSIS
8.B crypt
9[ password ]
10.SH DESCRIPTION
d789c05d 11.ft B
02fdc0fc 12This interface is obsoleted by bdes(1).
d789c05d
KB
13.ft R
14.PP
c38495d9
KM
15.I Crypt
16reads from the standard input and writes
17on the standard output.
18The
19.I password
20is a key that selects a particular transformation.
21If no
22.I password
23is given,
24.I crypt
25demands a key from the terminal and turns
26off printing while the key is being typed in.
27.I Crypt
28encrypts and decrypts with the same key:
29.PP
30 crypt key <clear >cypher
31.br
32 crypt key <cypher | pr
33.PP
34will print the clear.
35.PP
36Files encrypted by
37.I crypt
38are compatible with those treated by the editor
39.I ed
40in encryption mode.
41.PP
42The security of encrypted files depends on three factors:
43the fundamental method must be hard to solve;
44direct search of the key space must be infeasible;
45`sneak paths' by which keys or cleartext can become
46visible must be minimized.
47.PP
48.I Crypt
49implements a one-rotor machine designed along the lines
50of the German Enigma, but with a 256-element rotor.
51Methods of attack on such machines are known, but not widely;
52moreover the amount of work required is likely to be large.
53.PP
54The transformation of a key into the internal
55settings of the machine is deliberately designed to
56be expensive, i.e. to take a substantial fraction of
57a second to compute.
58However,
59if keys are restricted to (say)
60three lower-case letters,
61then encrypted files can be read by expending only
62a substantial fraction of
63five minutes of machine time.
64.PP
65Since the key is an argument to the
66.I crypt
67command,
68it is potentially visible to users executing
69.IR ps (1)
70or a derivative.
71To minimize this possibility,
72.I crypt
73takes care to destroy any record of the key
74immediately upon entry.
75No doubt the choice of keys and key security
76are the most vulnerable aspect of
77.I crypt.
78.SH FILES
79/dev/tty for typed key
80.SH "SEE ALSO"
81ed(1),
91b81c27 82crypt(3),
c38495d9
KM
83makekey(8)
84.SH BUGS
85There is no warranty of merchantability nor any warranty
86of fitness for a particular purpose nor any other warranty,
87either express or implied, as to the accuracy of the
88enclosed materials or as to their suitability for any
89particular purpose. Accordingly, Bell Telephone
90Laboratories assumes no responsibility for their use by the
91recipient. Further, Bell Laboratories assumes no obligation
92to furnish any assistance of any kind whatsoever, or to
93furnish any additional information or documentation.