COHERENT manpages
This page displays the COHERENT manpage for crypt [Encrypt/decrypt text].
List of available manpages
Index
crypt -- Command
Encrypt/decrypt text
crypt [password]
The command crypt encrypts data. It emulates a rotor-encryption machine,
such as the Enigma or Hagelin C-48 cipher machines. Unlike these machines,
crypt uses only one rotor, with a 256-character alphabet and a keying
sequence of period 2^32.
crypt reads text from standard input and writes the encrypted text to
standard output. password is used to construct the model of the machine
and to start the keying sequence. If no password is given, crypt prompts
for a password on the terminal and disables echo while it is being typed
in. The password may be up to ten characters long, but must not be empty;
all characters past the first ten are ignored. All characters are legal,
although it may not be possible to input certain characters from the
terminal.
crypt uses the same password for both encryption and decryption. For
example, the commands
crypt COHERENT <file1 >file2
crypt COHERENT <file2 >file3
leave file3 identical to file1.
Encrypted files produced by ed with its -x option may be read by crypt, and
vice versa, as ed uses crypt to perform its encryption.
Security of a cryptosystem depends on several factors:
1. Brute-force attempts to break the system should be infeasible.
Passwords should be at least five characters long; although the
construction of the machine model from the password takes a substantial
fraction of a second, it is still plausible that encrypted files could
be read by a brute-force search of a portion of the password space (say,
all passwords less than four characters long).
2. Cryptanalysis of the basic encryption scheme should be very hard.
Analysis of rotor machines is understood, but it is difficult and in
most cases probably not worth the trouble.
3. Passwords must be kept secret. crypt erases password as soon as it can,
to avoid the possibility that it could appear in the output of ps.
4. Privileged access to the system must be guarded. Under COHERENT, the
security of crypt can be no better than the security governing access to
superuser status, because the superuser can do practically anything.
This is probably crypt's most vulnerable point.
Files
/dev/tty -- Typed passwords
See Also
commands,
passwd,
security,
shadow