1998-10-30 18:24:54 +00:00
|
|
|
.\"
|
|
|
|
.\" enigma (aka. crypt) man page written by Joerg Wunsch.
|
|
|
|
.\"
|
|
|
|
.\" Since enigma itself is distributed in the Public Domain, this file
|
|
|
|
.\" is also.
|
|
|
|
.\"
|
1999-08-28 01:08:13 +00:00
|
|
|
.\" $FreeBSD$
|
1998-10-30 18:24:54 +00:00
|
|
|
.\" "
|
2004-05-14 19:29:39 +00:00
|
|
|
.Dd May 14, 2004
|
1999-08-15 08:25:34 +00:00
|
|
|
.Dt ENIGMA 1
|
2010-04-14 19:08:06 +00:00
|
|
|
.Os
|
1998-10-30 18:24:54 +00:00
|
|
|
.Sh NAME
|
1999-06-24 06:22:24 +00:00
|
|
|
.Nm enigma ,
|
|
|
|
.Nm crypt
|
1998-10-30 18:24:54 +00:00
|
|
|
.Nd very simple file encryption
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl s
|
|
|
|
.Op Fl k
|
|
|
|
.Op Ar password
|
|
|
|
.Nm crypt
|
|
|
|
.Op Fl s
|
|
|
|
.Op Fl k
|
|
|
|
.Op Ar password
|
|
|
|
.Sh DESCRIPTION
|
2002-04-19 23:44:58 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility, also known as
|
1998-10-30 18:24:54 +00:00
|
|
|
.Nm crypt
|
|
|
|
is a
|
|
|
|
.Em very
|
|
|
|
simple encryption program, working on a
|
|
|
|
.Dq secret-key
|
2004-07-02 22:22:35 +00:00
|
|
|
basis.
|
|
|
|
It operates as a filter, i.e.,
|
|
|
|
it encrypts or decrypts a
|
1998-10-30 18:24:54 +00:00
|
|
|
stream of data from standard input, and writes the result to standard
|
2004-05-14 18:46:16 +00:00
|
|
|
output.
|
|
|
|
Since its operation is fully symmetrical, feeding the encrypted data
|
|
|
|
stream again through the engine (using the same secret key) will
|
|
|
|
decrypt it.
|
1998-10-30 18:24:54 +00:00
|
|
|
.Pp
|
2004-07-02 22:22:35 +00:00
|
|
|
There are several ways to provide the secret key to the program.
|
|
|
|
By
|
1998-10-30 18:24:54 +00:00
|
|
|
default, the program prompts the user on the controlling terminal for
|
|
|
|
the key, using
|
|
|
|
.Xr getpass 3 .
|
|
|
|
This is the only safe way of providing it.
|
|
|
|
.Pp
|
|
|
|
Alternatively, the key can be provided as the sole command-line
|
|
|
|
argument
|
|
|
|
.Ar password
|
2004-07-02 22:22:35 +00:00
|
|
|
when starting the program.
|
|
|
|
Obviously, this way the key can easily be
|
1998-10-30 18:24:54 +00:00
|
|
|
spotted by other users running
|
|
|
|
.Xr ps 1 .
|
|
|
|
As yet another alternative,
|
|
|
|
.Nm
|
|
|
|
can be given the option
|
|
|
|
.Fl k ,
|
|
|
|
and it will take the key from the environment variable
|
|
|
|
.Ev CrYpTkEy .
|
|
|
|
While this at a first glance seems to be more secure than the previous
|
2005-02-13 22:25:33 +00:00
|
|
|
option, it actually is not since environment variables can also be
|
1998-10-30 18:24:54 +00:00
|
|
|
examined with
|
|
|
|
.Xr ps 1 .
|
|
|
|
Thus this option is mainly provided for compatibility with other
|
|
|
|
implementations of
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm .
|
1998-10-30 18:24:54 +00:00
|
|
|
.Pp
|
|
|
|
When specifying the option
|
|
|
|
.Fl s ,
|
|
|
|
.Nm
|
|
|
|
modifies the encryption engine in a way that is supposed to make it a
|
|
|
|
little more secure, but incompatible with other implementations.
|
|
|
|
.Pp
|
|
|
|
.Ss Warning
|
|
|
|
The cryptographic value of
|
|
|
|
.Nm
|
2004-07-02 22:22:35 +00:00
|
|
|
is rather small.
|
|
|
|
This program is only provided here for compatibility
|
2004-05-14 19:29:39 +00:00
|
|
|
with other operating systems that also provide an implementation
|
|
|
|
(usually called
|
|
|
|
.Xr crypt 1
|
|
|
|
there).
|
|
|
|
For real encryption, refer to
|
|
|
|
.Xr bdes 1 ,
|
|
|
|
.Xr openssl 1 ,
|
2005-07-14 20:29:08 +00:00
|
|
|
.Xr pgp 1 Pq Pa ports/security/pgp ,
|
2004-05-14 19:29:39 +00:00
|
|
|
or
|
2005-07-14 20:29:08 +00:00
|
|
|
.Xr gpg 1 Pq Pa ports/security/gnupg .
|
2004-05-14 19:29:39 +00:00
|
|
|
However, restrictions for exporting,
|
1998-10-30 18:24:54 +00:00
|
|
|
importing or using such tools might exist in some countries, so those
|
|
|
|
stronger programs are not being shipped as part of the operating
|
|
|
|
system by default.
|
|
|
|
.Sh ENVIRONMENT
|
2006-12-24 19:55:38 +00:00
|
|
|
.Bl -tag -offset indent -width ".Ev CrYpTkEy"
|
1998-10-30 18:24:54 +00:00
|
|
|
.It Ev CrYpTkEy
|
|
|
|
used to obtain the secret key when option
|
|
|
|
.Fl k
|
|
|
|
has been given
|
|
|
|
.El
|
|
|
|
.Sh EXAMPLES
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
man enigma | enigma > encrypted
|
|
|
|
Enter key: (XXX \(em key not echoed)
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
This will create an encrypted form of this man page, and store it in
|
|
|
|
the file
|
2006-12-24 19:55:38 +00:00
|
|
|
.Pa encrypted .
|
1998-10-30 18:24:54 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
enigma XXX < encrypted
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
This displays the previously created file on the terminal.
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr bdes 1 ,
|
2004-05-14 19:29:39 +00:00
|
|
|
.Xr gpg 1 ,
|
|
|
|
.Xr openssl 1 ,
|
1998-10-30 18:24:54 +00:00
|
|
|
.Xr pgp 1 ,
|
|
|
|
.Xr ps 1 ,
|
|
|
|
.Xr getpass 3
|
|
|
|
.Sh HISTORY
|
|
|
|
Implementations of
|
|
|
|
.Nm crypt
|
|
|
|
are very common among
|
|
|
|
.Ux
|
2004-07-02 22:22:35 +00:00
|
|
|
operating systems.
|
|
|
|
This implementation has been taken from the
|
1998-10-30 18:24:54 +00:00
|
|
|
.Em Cryptbreakers Workbench
|
|
|
|
which is in the public domain.
|