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