xref: /freebsd/usr.bin/enigma/enigma.1 (revision f7473c7e7768cfd6337bfb3b58d703289ea071d0)
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.\"
7c3aac50fSPeter Wemm.\" $FreeBSD$
85dc67cd7SJoerg Wunsch.\" "
97ed10945SEitan Adler.Dd May 8, 2018
10a4cab7d3SMike Pritchard.Dt ENIGMA 1
11aa12cea2SUlrich Spörlein.Os
125dc67cd7SJoerg Wunsch.Sh NAME
13a684cccdSMike Pritchard.Nm enigma ,
14a684cccdSMike Pritchard.Nm crypt
155dc67cd7SJoerg Wunsch.Nd very simple file encryption
165dc67cd7SJoerg Wunsch.Sh SYNOPSIS
175dc67cd7SJoerg Wunsch.Nm
185dc67cd7SJoerg Wunsch.Op Fl s
195dc67cd7SJoerg Wunsch.Op Fl k
205dc67cd7SJoerg Wunsch.Op Ar password
215dc67cd7SJoerg Wunsch.Nm crypt
225dc67cd7SJoerg Wunsch.Op Fl s
235dc67cd7SJoerg Wunsch.Op Fl k
245dc67cd7SJoerg Wunsch.Op Ar password
255dc67cd7SJoerg Wunsch.Sh DESCRIPTION
263898680cSPhilippe CharnierThe
273898680cSPhilippe Charnier.Nm
283898680cSPhilippe Charnierutility, also known as
295dc67cd7SJoerg Wunsch.Nm crypt
305dc67cd7SJoerg Wunschis a
315dc67cd7SJoerg Wunsch.Em very
325dc67cd7SJoerg Wunschsimple encryption program, working on a
335dc67cd7SJoerg Wunsch.Dq secret-key
346a3e8b0aSRuslan Ermilovbasis.
356a3e8b0aSRuslan ErmilovIt operates as a filter, i.e.,
366a3e8b0aSRuslan Ermilovit encrypts or decrypts a
375dc67cd7SJoerg Wunschstream of data from standard input, and writes the result to standard
38be06d37cSJoerg Wunschoutput.
39be06d37cSJoerg WunschSince its operation is fully symmetrical, feeding the encrypted data
40be06d37cSJoerg Wunschstream again through the engine (using the same secret key) will
41be06d37cSJoerg Wunschdecrypt it.
425dc67cd7SJoerg Wunsch.Pp
436a3e8b0aSRuslan ErmilovThere are several ways to provide the secret key to the program.
446a3e8b0aSRuslan ErmilovBy
455dc67cd7SJoerg Wunschdefault, the program prompts the user on the controlling terminal for
465dc67cd7SJoerg Wunschthe key, using
475dc67cd7SJoerg Wunsch.Xr getpass 3 .
485dc67cd7SJoerg WunschThis is the only safe way of providing it.
495dc67cd7SJoerg Wunsch.Pp
505dc67cd7SJoerg WunschAlternatively, the key can be provided as the sole command-line
515dc67cd7SJoerg Wunschargument
525dc67cd7SJoerg Wunsch.Ar password
536a3e8b0aSRuslan Ermilovwhen starting the program.
546a3e8b0aSRuslan ErmilovObviously, this way the key can easily be
555dc67cd7SJoerg Wunschspotted by other users running
565dc67cd7SJoerg Wunsch.Xr ps 1 .
575dc67cd7SJoerg WunschAs yet another alternative,
585dc67cd7SJoerg Wunsch.Nm
595dc67cd7SJoerg Wunschcan be given the option
605dc67cd7SJoerg Wunsch.Fl k ,
615dc67cd7SJoerg Wunschand it will take the key from the environment variable
625dc67cd7SJoerg Wunsch.Ev CrYpTkEy .
635dc67cd7SJoerg WunschWhile this at a first glance seems to be more secure than the previous
640227791bSRuslan Ermilovoption, it actually is not since environment variables can also be
655dc67cd7SJoerg Wunschexamined with
665dc67cd7SJoerg Wunsch.Xr ps 1 .
675dc67cd7SJoerg WunschThus this option is mainly provided for compatibility with other
685dc67cd7SJoerg Wunschimplementations of
698fe908efSRuslan Ermilov.Nm .
705dc67cd7SJoerg Wunsch.Pp
715dc67cd7SJoerg WunschWhen specifying the option
725dc67cd7SJoerg Wunsch.Fl s ,
735dc67cd7SJoerg Wunsch.Nm
745dc67cd7SJoerg Wunschmodifies the encryption engine in a way that is supposed to make it a
755dc67cd7SJoerg Wunschlittle more secure, but incompatible with other implementations.
765dc67cd7SJoerg Wunsch.Pp
775dc67cd7SJoerg Wunsch.Ss Warning
785dc67cd7SJoerg WunschThe cryptographic value of
795dc67cd7SJoerg Wunsch.Nm
806a3e8b0aSRuslan Ermilovis rather small.
816a3e8b0aSRuslan ErmilovThis program is only provided here for compatibility
82482b206bSJoerg Wunschwith other operating systems that also provide an implementation
83482b206bSJoerg Wunsch(usually called
84482b206bSJoerg Wunsch.Xr crypt 1
85482b206bSJoerg Wunschthere).
86482b206bSJoerg WunschFor real encryption, refer to
87482b206bSJoerg Wunsch.Xr openssl 1 ,
88482b206bSJoerg Wunschor
89*f7473c7eSJens Schweikhardt.Xr gpg 1 Pq Pa ports/security/gnupg1 .
905dc67cd7SJoerg Wunsch.Sh ENVIRONMENT
91b9716d68SRuslan Ermilov.Bl -tag -offset indent -width ".Ev CrYpTkEy"
925dc67cd7SJoerg Wunsch.It Ev CrYpTkEy
935dc67cd7SJoerg Wunschused to obtain the secret key when option
945dc67cd7SJoerg Wunsch.Fl k
955dc67cd7SJoerg Wunschhas been given
965dc67cd7SJoerg Wunsch.El
975dc67cd7SJoerg Wunsch.Sh EXAMPLES
985dc67cd7SJoerg Wunsch.Bd -literal -offset indent
995dc67cd7SJoerg Wunschman enigma | enigma > encrypted
1005dc67cd7SJoerg WunschEnter key: (XXX \(em key not echoed)
1015dc67cd7SJoerg Wunsch.Ed
1025dc67cd7SJoerg Wunsch.Pp
1035dc67cd7SJoerg WunschThis will create an encrypted form of this man page, and store it in
1045dc67cd7SJoerg Wunschthe file
105b9716d68SRuslan Ermilov.Pa encrypted .
1065dc67cd7SJoerg Wunsch.Bd -literal -offset indent
1075dc67cd7SJoerg Wunschenigma XXX < encrypted
1085dc67cd7SJoerg Wunsch.Ed
1095dc67cd7SJoerg Wunsch.Pp
1105dc67cd7SJoerg WunschThis displays the previously created file on the terminal.
1115dc67cd7SJoerg Wunsch.Sh SEE ALSO
112*f7473c7eSJens Schweikhardt.Xr gpg 1 Pq Pa ports/security/gnupg1 ,
113482b206bSJoerg Wunsch.Xr openssl 1 ,
1145dc67cd7SJoerg Wunsch.Xr ps 1 ,
1155dc67cd7SJoerg Wunsch.Xr getpass 3
1165dc67cd7SJoerg Wunsch.Sh HISTORY
1175dc67cd7SJoerg WunschImplementations of
1185dc67cd7SJoerg Wunsch.Nm crypt
1195dc67cd7SJoerg Wunschare very common among
1205dc67cd7SJoerg Wunsch.Ux
1216a3e8b0aSRuslan Ermilovoperating systems.
1226a3e8b0aSRuslan ErmilovThis implementation has been taken from the
1235dc67cd7SJoerg Wunsch.Em Cryptbreakers Workbench
1245dc67cd7SJoerg Wunschwhich is in the public domain.
125