]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - usr.bin/enigma/enigma.1
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / usr.bin / enigma / enigma.1
1 .\"
2 .\" enigma (aka. crypt) man page written by Joerg Wunsch.
3 .\"
4 .\" Since enigma itself is distributed in the Public Domain, this file
5 .\" is also.
6 .\"
7 .\" $FreeBSD$
8 .\" "
9 .Dd May 14, 2004
10 .Dt ENIGMA 1
11 .Os
12 .Sh NAME
13 .Nm enigma ,
14 .Nm crypt
15 .Nd very simple file encryption
16 .Sh SYNOPSIS
17 .Nm
18 .Op Fl s
19 .Op Fl k
20 .Op Ar password
21 .Nm crypt
22 .Op Fl s
23 .Op Fl k
24 .Op Ar password
25 .Sh DESCRIPTION
26 The
27 .Nm
28 utility, also known as
29 .Nm crypt
30 is a
31 .Em very
32 simple encryption program, working on a
33 .Dq secret-key
34 basis.
35 It operates as a filter, i.e.,
36 it encrypts or decrypts a
37 stream of data from standard input, and writes the result to standard
38 output.
39 Since its operation is fully symmetrical, feeding the encrypted data
40 stream again through the engine (using the same secret key) will
41 decrypt it.
42 .Pp
43 There are several ways to provide the secret key to the program.
44 By
45 default, the program prompts the user on the controlling terminal for
46 the key, using
47 .Xr getpass 3 .
48 This is the only safe way of providing it.
49 .Pp
50 Alternatively, the key can be provided as the sole command-line
51 argument
52 .Ar password
53 when starting the program.
54 Obviously, this way the key can easily be
55 spotted by other users running
56 .Xr ps 1 .
57 As yet another alternative,
58 .Nm
59 can be given the option
60 .Fl k ,
61 and it will take the key from the environment variable
62 .Ev CrYpTkEy .
63 While this at a first glance seems to be more secure than the previous
64 option, it actually is not since environment variables can also be
65 examined with
66 .Xr ps 1 .
67 Thus this option is mainly provided for compatibility with other
68 implementations of
69 .Nm .
70 .Pp
71 When specifying the option
72 .Fl s ,
73 .Nm
74 modifies the encryption engine in a way that is supposed to make it a
75 little more secure, but incompatible with other implementations.
76 .Pp
77 .Ss Warning
78 The cryptographic value of
79 .Nm
80 is rather small.
81 This program is only provided here for compatibility
82 with other operating systems that also provide an implementation
83 (usually called
84 .Xr crypt 1
85 there).
86 For real encryption, refer to
87 .Xr bdes 1 ,
88 .Xr openssl 1 ,
89 .Xr pgp 1 Pq Pa ports/security/pgp ,
90 or
91 .Xr gpg 1 Pq Pa ports/security/gnupg .
92 However, restrictions for exporting,
93 importing or using such tools might exist in some countries, so those
94 stronger programs are not being shipped as part of the operating
95 system by default.
96 .Sh ENVIRONMENT
97 .Bl -tag -offset indent -width ".Ev CrYpTkEy"
98 .It Ev CrYpTkEy
99 used to obtain the secret key when option
100 .Fl k
101 has been given
102 .El
103 .Sh EXAMPLES
104 .Bd -literal -offset indent
105 man enigma | enigma > encrypted
106 Enter key: (XXX \(em key not echoed)
107 .Ed
108 .Pp
109 This will create an encrypted form of this man page, and store it in
110 the file
111 .Pa encrypted .
112 .Bd -literal -offset indent
113 enigma XXX < encrypted
114 .Ed
115 .Pp
116 This displays the previously created file on the terminal.
117 .Sh SEE ALSO
118 .Xr bdes 1 ,
119 .Xr gpg 1 ,
120 .Xr openssl 1 ,
121 .Xr pgp 1 ,
122 .Xr ps 1 ,
123 .Xr getpass 3
124 .Sh HISTORY
125 Implementations of
126 .Nm crypt
127 are very common among
128 .Ux
129 operating systems.
130 This implementation has been taken from the
131 .Em Cryptbreakers Workbench
132 which is in the public domain.