BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / crypt.0
CRYPT(1) UNIX Programmer's Manual CRYPT(1)
N\bNA\bAM\bME\bE
crypt - encode/decode
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
c\bcr\bry\byp\bpt\bt [ password ]
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bC_\br_\by_\bp_\bt reads from the standard input and writes on the stan-
dard output. The _\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd is a key that selects a particu-
lar transformation. If no _\bp_\ba_\bs_\bs_\bw_\bo_\br_\bd is given, _\bc_\br_\by_\bp_\bt demands
a key from the terminal and turns off printing while the key
is being typed in. _\bC_\br_\by_\bp_\bt encrypts and decrypts with the
same key:
crypt key <clear >cypher
crypt key <cypher | pr
will print the clear.
Files encrypted by _\bc_\br_\by_\bp_\bt are compatible with those treated
by the editor _\be_\bd in encryption mode.
The security of encrypted files depends on three factors:
the fundamental method must be hard to solve; direct search
of the key space must be infeasible; `sneak paths' by which
keys or cleartext can become visible must be minimized.
_\bC_\br_\by_\bp_\bt implements a one-rotor machine designed along the
lines of the German Enigma, but with a 256-element rotor.
Methods of attack on such machines are known, but not
widely; moreover the amount of work required is likely to be
large.
The transformation of a key into the internal settings of
the machine is deliberately designed to be expensive, i.e.
to take a substantial fraction of a second to compute. How-
ever, if keys are restricted to (say) three lower-case
letters, then encrypted files can be read by expending only
a substantial fraction of five minutes of machine time.
Since the key is an argument to the _\bc_\br_\by_\bp_\bt command, it is
potentially visible to users executing _\bp_\bs(1) or a deriva-
tive. To minimize this possibility, _\bc_\br_\by_\bp_\bt takes care to
destroy any record of the key immediately upon entry. No
doubt the choice of keys and key security are the most
vulnerable aspect of _\bc_\br_\by_\bp_\bt.
F\bFI\bIL\bLE\bES\bS
/dev/tty for typed key
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
ed(1), crypt(3), makekey(8)
Printed 7/9/88 July 14, 1987 1
CRYPT(1) UNIX Programmer's Manual CRYPT(1)
B\bBU\bUG\bGS\bS
There is no warranty of merchantability nor any warranty of
fitness for a particular purpose nor any other warranty,
either express or implied, as to the accuracy of the
enclosed materials or as to their suitability for any par-
ticular purpose. Accordingly, Bell Telephone Laboratories
assumes no responsibility for their use by the recipient.
Further, Bell Laboratories assumes no obligation to furnish
any assistance of any kind whatsoever, or to furnish any
additional information or documentation.
Printed 7/9/88 July 14, 1987 2