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