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