1crypt(1) User Commands crypt(1)
2
3
4
6 crypt - encode or decode a file
7
9 crypt [password]
10
11
13 The crypt utility encrypts and decrypts the contents of a file. crypt
14 reads from the standard input and writes on the standard output. The
15 password is a key that selects a particular transformation. If no pass‐
16 word is given, crypt demands a key from the terminal and turns off
17 printing while the key is being typed in. crypt encrypts and decrypts
18 with the same key:
19
20 example% crypt key < clear.file > encrypted.file
21 example% crypt key < encrypted.file | pr
22
23
24
25
26 prints the contents of clear.file.
27
28
29 Files encrypted by crypt are compatible with those treated by the edi‐
30 tors ed(1), ex(1), and vi(1) in encryption mode.
31
32
33 The security of encrypted files depends on three factors: the funda‐
34 mental method must be hard to solve; direct search of the key space
35 must be infeasible; "sneak paths" by which keys or cleartext can become
36 visible must be minimized.
37
38
39 crypt implements a one-rotor machine designed along the lines of the
40 German Enigma, but with a 256-element rotor. Methods of attack on such
41 machines are widely known, thus crypt provides minimal security.
42
43
44 The transformation of a key into the internal settings of the machine
45 is deliberately designed to be expensive, that is, to take a substan‐
46 tial fraction of a second to compute. However, if keys are restricted
47 to (say) three lower-case letters, then encrypted files can be read by
48 expending only a substantial fraction of five minutes of machine time.
49
50
51 Since the key is an argument to the crypt command, it is potentially
52 visible to users executing ps(1) or a derivative command. To minimize
53 this possibility, crypt takes care to destroy any record of the key
54 immediately upon entry. No doubt the choice of keys and key security
55 are the most vulnerable aspect of crypt.
56
58 /dev/tty for typed key
59
60
62 See attributes(5) for descriptions of the following attributes:
63
64
65
66
67 ┌─────────────────────────────┬─────────────────────────────┐
68 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
69 ├─────────────────────────────┼─────────────────────────────┤
70 │Availability │SUNWcsu │
71 └─────────────────────────────┴─────────────────────────────┘
72
74 des(1), ed(1), ex(1), ps(1), vi(1), attributes(5)
75
76
77
78SunOS 5.11 8 Mar 2005 crypt(1)