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