xref: /freebsd/usr.bin/enigma/enigma.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
15dc67cd7SJoerg Wunsch.\"
25dc67cd7SJoerg Wunsch.\" enigma (aka. crypt) man page written by Joerg Wunsch.
35dc67cd7SJoerg Wunsch.\"
45dc67cd7SJoerg Wunsch.\" Since enigma itself is distributed in the Public Domain, this file
55dc67cd7SJoerg Wunsch.\" is also.
65dc67cd7SJoerg Wunsch.\" "
77ed10945SEitan Adler.Dd May 8, 2018
8a4cab7d3SMike Pritchard.Dt ENIGMA 1
9aa12cea2SUlrich Spörlein.Os
105dc67cd7SJoerg Wunsch.Sh NAME
11a684cccdSMike Pritchard.Nm enigma ,
12a684cccdSMike Pritchard.Nm crypt
135dc67cd7SJoerg Wunsch.Nd very simple file encryption
145dc67cd7SJoerg Wunsch.Sh SYNOPSIS
155dc67cd7SJoerg Wunsch.Nm
165dc67cd7SJoerg Wunsch.Op Fl s
175dc67cd7SJoerg Wunsch.Op Fl k
185dc67cd7SJoerg Wunsch.Op Ar password
195dc67cd7SJoerg Wunsch.Nm crypt
205dc67cd7SJoerg Wunsch.Op Fl s
215dc67cd7SJoerg Wunsch.Op Fl k
225dc67cd7SJoerg Wunsch.Op Ar password
235dc67cd7SJoerg Wunsch.Sh DESCRIPTION
243898680cSPhilippe CharnierThe
253898680cSPhilippe Charnier.Nm
263898680cSPhilippe Charnierutility, also known as
275dc67cd7SJoerg Wunsch.Nm crypt
285dc67cd7SJoerg Wunschis a
295dc67cd7SJoerg Wunsch.Em very
305dc67cd7SJoerg Wunschsimple encryption program, working on a
315dc67cd7SJoerg Wunsch.Dq secret-key
326a3e8b0aSRuslan Ermilovbasis.
336a3e8b0aSRuslan ErmilovIt operates as a filter, i.e.,
346a3e8b0aSRuslan Ermilovit encrypts or decrypts a
355dc67cd7SJoerg Wunschstream of data from standard input, and writes the result to standard
36be06d37cSJoerg Wunschoutput.
37be06d37cSJoerg WunschSince its operation is fully symmetrical, feeding the encrypted data
38be06d37cSJoerg Wunschstream again through the engine (using the same secret key) will
39be06d37cSJoerg Wunschdecrypt it.
405dc67cd7SJoerg Wunsch.Pp
416a3e8b0aSRuslan ErmilovThere are several ways to provide the secret key to the program.
426a3e8b0aSRuslan ErmilovBy
435dc67cd7SJoerg Wunschdefault, the program prompts the user on the controlling terminal for
445dc67cd7SJoerg Wunschthe key, using
455dc67cd7SJoerg Wunsch.Xr getpass 3 .
465dc67cd7SJoerg WunschThis is the only safe way of providing it.
475dc67cd7SJoerg Wunsch.Pp
485dc67cd7SJoerg WunschAlternatively, the key can be provided as the sole command-line
495dc67cd7SJoerg Wunschargument
505dc67cd7SJoerg Wunsch.Ar password
516a3e8b0aSRuslan Ermilovwhen starting the program.
526a3e8b0aSRuslan ErmilovObviously, this way the key can easily be
535dc67cd7SJoerg Wunschspotted by other users running
545dc67cd7SJoerg Wunsch.Xr ps 1 .
555dc67cd7SJoerg WunschAs yet another alternative,
565dc67cd7SJoerg Wunsch.Nm
575dc67cd7SJoerg Wunschcan be given the option
585dc67cd7SJoerg Wunsch.Fl k ,
595dc67cd7SJoerg Wunschand it will take the key from the environment variable
605dc67cd7SJoerg Wunsch.Ev CrYpTkEy .
615dc67cd7SJoerg WunschWhile this at a first glance seems to be more secure than the previous
620227791bSRuslan Ermilovoption, it actually is not since environment variables can also be
635dc67cd7SJoerg Wunschexamined with
645dc67cd7SJoerg Wunsch.Xr ps 1 .
655dc67cd7SJoerg WunschThus this option is mainly provided for compatibility with other
665dc67cd7SJoerg Wunschimplementations of
678fe908efSRuslan Ermilov.Nm .
685dc67cd7SJoerg Wunsch.Pp
695dc67cd7SJoerg WunschWhen specifying the option
705dc67cd7SJoerg Wunsch.Fl s ,
715dc67cd7SJoerg Wunsch.Nm
725dc67cd7SJoerg Wunschmodifies the encryption engine in a way that is supposed to make it a
735dc67cd7SJoerg Wunschlittle more secure, but incompatible with other implementations.
745dc67cd7SJoerg Wunsch.Pp
755dc67cd7SJoerg Wunsch.Ss Warning
765dc67cd7SJoerg WunschThe cryptographic value of
775dc67cd7SJoerg Wunsch.Nm
786a3e8b0aSRuslan Ermilovis rather small.
796a3e8b0aSRuslan ErmilovThis program is only provided here for compatibility
80482b206bSJoerg Wunschwith other operating systems that also provide an implementation
81482b206bSJoerg Wunsch(usually called
82482b206bSJoerg Wunsch.Xr crypt 1
83482b206bSJoerg Wunschthere).
84482b206bSJoerg WunschFor real encryption, refer to
85482b206bSJoerg Wunsch.Xr openssl 1 ,
86482b206bSJoerg Wunschor
87*f7473c7eSJens Schweikhardt.Xr gpg 1 Pq Pa ports/security/gnupg1 .
885dc67cd7SJoerg Wunsch.Sh ENVIRONMENT
89b9716d68SRuslan Ermilov.Bl -tag -offset indent -width ".Ev CrYpTkEy"
905dc67cd7SJoerg Wunsch.It Ev CrYpTkEy
915dc67cd7SJoerg Wunschused to obtain the secret key when option
925dc67cd7SJoerg Wunsch.Fl k
935dc67cd7SJoerg Wunschhas been given
945dc67cd7SJoerg Wunsch.El
955dc67cd7SJoerg Wunsch.Sh EXAMPLES
965dc67cd7SJoerg Wunsch.Bd -literal -offset indent
975dc67cd7SJoerg Wunschman enigma | enigma > encrypted
985dc67cd7SJoerg WunschEnter key: (XXX \(em key not echoed)
995dc67cd7SJoerg Wunsch.Ed
1005dc67cd7SJoerg Wunsch.Pp
1015dc67cd7SJoerg WunschThis will create an encrypted form of this man page, and store it in
1025dc67cd7SJoerg Wunschthe file
103b9716d68SRuslan Ermilov.Pa encrypted .
1045dc67cd7SJoerg Wunsch.Bd -literal -offset indent
1055dc67cd7SJoerg Wunschenigma XXX < encrypted
1065dc67cd7SJoerg Wunsch.Ed
1075dc67cd7SJoerg Wunsch.Pp
1085dc67cd7SJoerg WunschThis displays the previously created file on the terminal.
1095dc67cd7SJoerg Wunsch.Sh SEE ALSO
110*f7473c7eSJens Schweikhardt.Xr gpg 1 Pq Pa ports/security/gnupg1 ,
111482b206bSJoerg Wunsch.Xr openssl 1 ,
1125dc67cd7SJoerg Wunsch.Xr ps 1 ,
1135dc67cd7SJoerg Wunsch.Xr getpass 3
1145dc67cd7SJoerg Wunsch.Sh HISTORY
1155dc67cd7SJoerg WunschImplementations of
1165dc67cd7SJoerg Wunsch.Nm crypt
1175dc67cd7SJoerg Wunschare very common among
1185dc67cd7SJoerg Wunsch.Ux
1196a3e8b0aSRuslan Ermilovoperating systems.
1206a3e8b0aSRuslan ErmilovThis implementation has been taken from the
1215dc67cd7SJoerg Wunsch.Em Cryptbreakers Workbench
1225dc67cd7SJoerg Wunschwhich is in the public domain.
123