CRYPT(1,C) AIX Commands Reference CRYPT(1,C)
-------------------------------------------------------------------------------
crypt
PURPOSE
crypt - encodes/decodes data
SYNTAX
+------------+
crypt ---| |---|
+- password -+
DESCRIPTION
The crypt command encodes and decodes data that you supply. You can use crypt
to keep others from reading or using sensitive data. The encoded data appears
to be gibberish. ASCII and binary files may be encoded and decoded with crypt.
The password "key" used when encoding the data must be supplied to decode the
data. Be sure to remember the password, and keep it secret.
By default, crypt reads from the standard input and writes on the standard
output. You must use redirection if you want to read and write files. For
example, to create the encoded file "secrets" from the existing ASCII file
"mydiary" with the password "rosebud", type:
crypt rosebud < mydiary > secrets
Note that the file "mydiary" will be unchanged, and thus potentially readable
by others. So, usually you will want to delete the file "mydiary". To view
the contents of the encoded file "secrets", type:
crypt rosebud < secrets
The contents will print to standard output, usually the screen. To create a
decoded version of "secrets", type:
crypt rosebud < secrets > journal
The decoded file "journal" will be written to the current directory. The file
"secrets" will remain encoded.
If you don's supply crypt with a password, crypt will prompt you for one with:
"Enter key:". Here, key means password - you may enter more than one
character. Press return to complete password entry. The password will not be
echoed to the screen while you type.
Processed November 8, 1990 CRYPT(1,C) 1
CRYPT(1,C) AIX Commands Reference CRYPT(1,C)
Files encrypted by crypt are compatible with those created by the editor ed 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.
The crypt command 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, for example, to take a substantial
fraction of a second to compute. However, 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 crypt command, it is potentially visible to
users executing ps or a derivative. To minimize this possibility, crypt 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 crypt.
FILES
/dev/tty for typed key
RELATED INFORMATION
See the following commands: "ed, red" and "makekey."
Processed November 8, 1990 CRYPT(1,C) 2