Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ crypt(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ed(1)

edit(1)

ex(1)

makekey(1)

pg(1)

ps(1)

stty(1)

vi(1)

crypt(1)                                                           crypt(1)

NAME
     crypt - encode/decode text

SYNOPSIS
     crypt [-c] [key]                                              Format 1

     crypt [-k]                                                    Format 2

DESCRIPTION
     crypt encodes and decodes the contents of files. crypt reads from
     standard input and writes to standard output. Files encrypted without
     the -c option are compatible with those created or edited by the edi-
     tors ed, edit, ex and vi in encryption mode.

OPTIONS
   Format 1:

     -c   (compatible) If the -c option is set, then

          -  files encrypted on systems in the MIPS range can be decrypted
             on systems in the Intel range

          -  files encrypted on systems in the Intel range can be decrypted
             on systems in the MIPS range

     key  You may enter any string (1 - 8 characters) of your choice as the
          key with which you define the encryption or decryption mechanism.

          key not specified:

          You enter the required encryption key at the terminal. Your input
          will not be echoed to the screen.

   Format 2:

     -k   crypt uses the value of the CrYpTkEy variable as the encryption
          or decryption key (see ENVIRONMENT VARIABLE). The case of the
          letters in the variable name must be exactly as shown here.

     Security criteria

     The security of encrypted files essentially depends on the following
     factors:

     -  The underlying encryption method must not be detectable.

     -  It must be impossible to directly search for the sequence of keys-
        trokes entered for encryption.







Page 1                       Reliant UNIX 5.44                Printed 11/98

crypt(1)                                                           crypt(1)

     Caution:
        If you concatenate two or more files separately encrypted with the
        same key into a single file and then try to decrypt the result,
        only the contents of the first of the original files will be
        decrypted correctly.

ENVIRONMENT VARIABLE
     CrYpTkEy
          The CrYpTkEy variable defines the encryption/decryption key for
          crypt. The case of the letters in the variable name must be
          exactly as shown here.

EXAMPLES
     Example 1

     The file Grandma.ltr contains the following message:

     Dearest Granny,
     I am sending you a secret message today so that the big bad wolf
     won't be able to find out when I'll be visiting you again in the
     forest with wine, cakes, and other goodies.
     Love, Little Red Riding Hood.

     It is now vital that this letter be encrypted! To do this, Little Red
     Riding Hood uses the key abcd.

     Encryption and redirection to topsecret-file:

     $ crypt abcd < Grandma.ltr > topsecret-file

     topsecret-file now contains unreadable garbage made up of special
     characters and meaningless character sequences.

     Grandmother can now decrypt the secret file, but only because Red Rid-
     ing Hood first asked the good hunter to give her the keyword, and he
     has told her that it is abcd:

     Decryption and output on the screen:

     $ crypt < topsecret-file
     Enter key: abcd
     Dearest Granny,
     I am sending you a secret message today so that the big bad wolf
     won't be able to find out when I'll be visiting you again in the
     forest with wine, cakes, and other goodies.
     Love, Little Red Riding Hood.

     If Little Red Riding Hood encrypted her message on a system in the
     MIPS range and Grandmother has an Intel-based machine (!), Grandmother
     needs to enter:

     $ crypt -c < topsecret-file


Page 2                       Reliant UNIX 5.44                Printed 11/98

crypt(1)                                                           crypt(1)

     Example 2

     The contents of letter are encrypted, and the encrypted output is
     stored in letter.secr. crypt is called with the -k option. The keyword
     defined with the CrYpTkEy variable is the string flatnix.

     $ CrYpTkEy=flatnix; export CrYpTkEy

     $ crypt -k < letter > letter.secr

SEE ALSO
     ed(1), edit(1), ex(1), makekey(1), pg(1), ps(1), stty(1), vi(1).










































Page 3                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026