crypt-portable

Portable version of the classic crypt(1) utility
git clone git://git.sgregoratto.me/crypt-portable
Log | Files | Refs

crypt.1 (2694B)


      1 .\" enigma (aka. crypt) man page written by Joerg Wunsch.
      2 .\"
      3 .\" Since enigma itself is distributed in the Public Domain,
      4 .\" this file is also.
      5 .Dd September 19, 2019
      6 .Dt CRYPT 1
      7 .Os
      8 .Sh NAME
      9 .Nm crypt
     10 .Nd very simple file encryption
     11 .Sh SYNOPSIS
     12 .Nm
     13 .Op Fl ks
     14 .Op Ar password
     15 .Sh DESCRIPTION
     16 The
     17 .Nm
     18 utility is a
     19 .Em very
     20 simple encryption program that utilises a secret key.
     21 It encrypts or decrypts data from standard input,
     22 and writes the result to standard output.
     23 Its operation is fully symmetrical;
     24 feeding it encrypted data using the same secret key will decrypt it.
     25 .Pp
     26 By default
     27 .Nm
     28 prompts the user on the controlling terminal for the secret key.
     29 This is the only safe way of providing it.
     30 Alternatively, the key can be set with the
     31 .Ar password
     32 operand, which can easily be spotted by other users running
     33 .Xr ps 1 .
     34 The key can also be provided by setting the environment variable
     35 .Ev CrYpTkEy
     36 and specifying the option
     37 .Fl k .
     38 This option is provided for compatibility with other implementations,
     39 as environment variables can also be examined with
     40 .Xr ps 1 .
     41 .Pp
     42 When option
     43 .Fl s
     44 is passed,
     45 the encryption engine is modified in a way that is supposedly more
     46 secure, but incompatible with other implementations.
     47 .Ss Warning
     48 The cryptographic value of
     49 .Nm
     50 is worse than useless;
     51 attacks against its encryption scheme have been documented since 1984,
     52 and there are various tools that can break it in an automated process.
     53 This implementation is provided only as a learning exercise and for
     54 compatibility with systems providing their own implementation.
     55 For real encryption, use
     56 .Xr openssl 1
     57 or
     58 .Xr gpg 1 .
     59 .Sh ENVIRONMENT
     60 .Bl -tag -width "CrYpTkEy"
     61 .It Ev CrYpTkEy
     62 used to obtain the secret key when option
     63 .Fl k
     64 has been given.
     65 .El
     66 .Sh EXAMPLES
     67 Encrypt this manual with the secret key
     68 .Ar XXX
     69 and store it in the file
     70 .Pa encrypted .
     71 .Bd -literal -offset indent
     72 $ man crypt | crypt > encrypted
     73 Enter key: XXX (key not echoed)
     74 .Ed
     75 .Pp
     76 Decrypt the previously created file.
     77 .Bd -literal -offset indent
     78 $ crypt XXX < encrypted
     79 .Ed
     80 .Sh SEE ALSO
     81 .Xr gpg 1 ,
     82 .Xr openssl 1 ,
     83 .Xr ps 1
     84 .Rs
     85 .%A J. A. Reeds
     86 .%A P. J. Weinberger
     87 .%J AT&T Bell Laboratories Technical Journal
     88 .%I AT&T Bell Laboratories
     89 .%R File Security and the UNIX System Crypt Command
     90 .%D October 1984
     91 .%P pp. 1673-1683
     92 .Re
     93 .Sh HISTORY
     94 .An Robert Morris
     95 wrote the original
     96 .Nm
     97 for
     98 .At v3 .
     99 It was later updated by
    100 .An Dennis Richie
    101 and
    102 .An James Reeds
    103 for
    104 .At v7 .
    105 .Sh AUTHORS
    106 .An -nosplit
    107 The
    108 .Nm
    109 utility is maintained by
    110 .An Stephen Gregoratto Aq Mt dev@sgregoratto.me .
    111 It is based on the public domain implementation in the Crypt Breaker's
    112 Workbench by
    113 .An Robert W. Baldwin ,
    114 with changes made by the
    115 .Fx
    116 developers.