xref: /freebsd/usr.bin/enigma/enigma.1 (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
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.Dd May 8, 2018
8.Dt ENIGMA 1
9.Os
10.Sh NAME
11.Nm enigma ,
12.Nm crypt
13.Nd very simple file encryption
14.Sh SYNOPSIS
15.Nm
16.Op Fl s
17.Op Fl k
18.Op Ar password
19.Nm crypt
20.Op Fl s
21.Op Fl k
22.Op Ar password
23.Sh DESCRIPTION
24The
25.Nm
26utility, also known as
27.Nm crypt
28is a
29.Em very
30simple encryption program, working on a
31.Dq secret-key
32basis.
33It operates as a filter, i.e.,
34it 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.
42By
43default, the program prompts the user on the controlling terminal for
44the key, using
45.Xr getpass 3 .
46This is the only safe way of providing it.
47.Pp
48Alternatively, the key can be provided as the sole command-line
49argument
50.Ar password
51when starting the program.
52Obviously, this way the key can easily be
53spotted by other users running
54.Xr ps 1 .
55As yet another alternative,
56.Nm
57can be given the option
58.Fl k ,
59and it will take the key from the environment variable
60.Ev CrYpTkEy .
61While this at a first glance seems to be more secure than the previous
62option, it actually is not since environment variables can also be
63examined with
64.Xr ps 1 .
65Thus this option is mainly provided for compatibility with other
66implementations of
67.Nm .
68.Pp
69When specifying the option
70.Fl s ,
71.Nm
72modifies the encryption engine in a way that is supposed to make it a
73little more secure, but incompatible with other implementations.
74.Pp
75.Ss Warning
76The cryptographic value of
77.Nm
78is rather small.
79This program is only provided here for compatibility
80with other operating systems that also provide an implementation
81(usually called
82.Xr crypt 1
83there).
84For real encryption, refer to
85.Xr openssl 1 ,
86or
87.Xr gpg 1 Pq Pa ports/security/gnupg1 .
88.Sh ENVIRONMENT
89.Bl -tag -offset indent -width ".Ev CrYpTkEy"
90.It Ev CrYpTkEy
91used to obtain the secret key when option
92.Fl k
93has been given
94.El
95.Sh EXAMPLES
96.Bd -literal -offset indent
97man enigma | enigma > encrypted
98Enter key: (XXX \(em key not echoed)
99.Ed
100.Pp
101This will create an encrypted form of this man page, and store it in
102the file
103.Pa encrypted .
104.Bd -literal -offset indent
105enigma XXX < encrypted
106.Ed
107.Pp
108This displays the previously created file on the terminal.
109.Sh SEE ALSO
110.Xr gpg 1 Pq Pa ports/security/gnupg1 ,
111.Xr openssl 1 ,
112.Xr ps 1 ,
113.Xr getpass 3
114.Sh HISTORY
115Implementations of
116.Nm crypt
117are very common among
118.Ux
119operating systems.
120This implementation has been taken from the
121.Em Cryptbreakers Workbench
122which is in the public domain.
123