home *** CD-ROM | disk | FTP | other *** search
- ImCrypt v 0.2 alfa
-
- Overview
- ========
-
- ImCrypt is a utility for MS-DOS platforms to facilitate sending and
- receiving PGP encrypted messages via FidoNet (tm) style e-mail.
-
- What it basicly does is scanning the netmail directory for message addressed
- to one of your users at one of your AKA's, separating the message text from
- the headers and the kludges in messages, running PGP to encrypt or decrypt
- the message text and making new messages from the old headers and kludges
- and the modified text.
-
- ImCrypt is tuned for InterMail 2.2 or higher. For this pre-release version
- that means it will ONLY work in the InterMail environment. The final
- release version may or may not have provisions to work in other environ-
- ments that use a *.msg netmail base.
-
- IMCRYPT ? will give a short help screen.
-
-
- Copyright notice
- ----------------
-
- ImCrypt may be freely distributed by any means provided that all the files
- are distributed as a package and unchanged. No distribution fee may be im-
- posed, other then the immidiate cost involved in the distribution itself.
- Repacking to another compressed format is allowed. Adding a BBS header is
- no problem. Distributing packages with other modifications is not allowed.
-
- Noncommercial use within fidonet or a fidonet-like environment is free. For
- commercial use, please contact the author.
-
-
- The distrubution package
- ========================
-
- The distribution package contains the .EXE file, the documentation
- and the C source file. The main purpose of distributing the source file is
- to enable interested partys to verify for themselves that no dirty tricks
- have been build in to compromise the security offered by PGP. You may use
- it for any other legal non-commercial purpose if you like, but you may not
- distribute modified versions of the source without the authors permission.
- Additional information may be found in the READ.ME file.
-
-
- The environment
- ===============
-
- ImCrypt takes most of the parameters needed from the InterMail configuration
- file FD.SYS. In order to do this, it must be able to find this file.
- The environment variable "IM" must be set to do this. When ImCrypt is run
- from the main InterMail batch file, this will be no problem. When run from
- the command line, the user must ensure that the "IM" environment variable
- points to the directory where FD.SYS can be found. This can be done with
- de DOS SET command.
-
- Due to the extensive use of environment variables, it may be nessecary to
- increease the environment spave with the DOSS SHELL command.
-
- ImCrypt will find the netmail directory, the semaphore directory, your
- AKA's and your user names from FD.SYS.
-
- As explained in the overview, ImCrypt calls PGP.EXE if it needs to encrypt
- or decrypt messages. To do this, it must be able to locate PGP.EXE, the
- public and secret key rings and the PGP pass frase. For an explanation
- of these, see the documentation of PGP.
-
- There are five ways of letting ImCrypt know where to find PGP.EXE.
-
- 1) See that PGP.EXE is in the current directory.
-
- 2) Let the environment variable "PGPPATH" (without qoutes) point to it.
-
- 3) Have the DOS PATH point to it.
-
- 4) Enter the path to PGP.EXE in the config file IMCRYPT.CFG.
-
- 5) Enter the path tot PGP.EXE with the "p" option on the command line.
-
- If more than one of these options is active at the same time, the one
- later mentioned in this list has higher priority. The second method can
- only be used if PGP.EXE and the keyrings are in the same directory.
-
- More about the IMCRYPT.CFG file and command line options later.
-
-
- For PGP to work, it must be able to locate the keyrings. Therefore the
- environment variable "PGPPATH" must be properly set. Note that ImCrypt
- itself does nothing with with this variable except use is as a last resort
- to locate PGP.EXE if it can't find it anywhere else.
-
- The third thing that may be needed is the PGP pass frase. One way to do
- it, is to set the "PGPPASS" environment variable. Please read the relevant
- section in the PGP documentation. This method has its risks. These risks are
- explained in the PGP doc, much better than I could do it. Be sure to be
- aware of the risks of this method before using it.
-
- An other way to do it, is to use the "-b" option on the command line or
- in IMCRYPT.CFG. PGP will then be called in interactive mode and will prompt
- for pass frase if needed. Be sure to be present at the keyboard if you use
- this mode.
-
-
- The semaphores
- ==============
-
- Imcrypt will touch the semaphore files IERESCAN.NOW and IMRESCAN.NOW
- whenever it has changed one ore more messages in the netmail directory.
- It will also prevent another program from changing something in the netmail
- directory by handling the IMRENUM.NOW semaphore if it detects that is
- not running in a single task environment.
-
- The algorithm for detecting a multitask environment is as follows: first
- it will check if SHARE is loaded. If so, it will assume a multitask envi-
- ronment. If not, it will check if a network is perhaps present. It will
- check for the precense of MICROSOFT network, Lantastic, Starlan extended
- netbios or IPX. If either of these is active, a network is assumed if
- the semaphores are on drive F or higher. Note that the OS2 DOS box will
- trick ImCrypt into thinking SHARE is loaded.
-
- If neither of these conditions is met, a single task environment is assumed
- and the IMRENUM.NOW semaphore is not used.
-
- Checking for a multitasking environment is nessesary, because of the
- peculiar way InterMail handles the IMRENUM.NOW semaphore. It depends on
- waiting for a lock to be established on a part of the file. In case of
- a single tasking environment, a lock can never be obtained, so it would
- wait forever. Unfortunatly there is no obvious way to tell if a lock has
- failed because a file is not sharable or because it is busy.
-
- The automatic detection of a multitasking environment can be overridden
- with the "s" command line option. The detection mechanism is not perfect
- and may fail in some cases. "-s" tells IMCRYPT to always ignore IMRENUM.NOW
- and "+s" tells it to involve the locking mechanism always.
-
-
- Logging
- =======
-
- Imcrypt provides for logging. The logging mechanism is invoked with the
- "l" option on the command line or in the config file.
- A single "l" will use IMCRYPT.LOG in the current directory. A full name
- and path may be specified with "l=filespec". A minus sign before the "l"
- will overwrite the log each time ImCrypt is called, otherwise it will
- append new information to the end of an existing file. "l=*" will write
- the log information to the mailer #1 logfile. Use this only if ImCrypt
- is never called when mailer #1 is online or else a sharing violation
- may result.
-
-
- How does it work
- ================
-
- ImCrypt scans the netmail directory for messages from you and for messages
- to you. A message is considered from you if its "from field" contains one
- of the names listed in FD.SYS and originates from one of your AKA's
- listed in FD.SYS. When comparing the names, case is ignored. If it finds
- such a message, and it is not yet marked as "send", it will scan the
- message for one of the following first lines:
-
- PGP ENCRYPT
- PGP SIGN ENCRYPT
- PGP SIGN
- PGP CLEARSIG
-
- The line may be hidden with an ^A kludge character. In that case, it
- need not be the first line. As far as I know there is no editor that can
- do this, but it does no harm to be prepaired.
- If it finds one of these, it will extract the message text and write it
- to a temporary file. It will then call PGP with this temporary file as input
- and will let PGP do the obvious thing. The output of PGP will be used
- to build a new message with the original headers and kludges and the modified
- message text. The line "PGP xxx" or the PGP kludge that triggered the
- process is not written to the new message. Instead a naked ^APGP kludge is
- written to the new message.
-
- The original message will be marked as "send". The new message will get
- the "kill-send" status, so that it will be removed by the mailer after it
- is send.
-
-
- If ImCrypt finds a message addressed to you, that does not have the
- in transit flag set, it will scan the message for the characteristic
- PGP header of five dashes and the words "BEGIN PGP". If it finds these,
- it will extract the message text, write it to a temp file and call PGP
- with this temp file as input to decrypt the text.
-
- Depending on the "k" option, as explained later, it will replace the
- text in the original message or build a new message. A "PGP" kludge in
- the message will be removed. In case the original message is retained it will
- replace the first of the five dashes in the PGP header with an asterisk, so
- that it does not recognise this message as crypted during subsequent passes.
-
- ImCrypt was intended for use in the batch. Call it whenever new messages to
- you may have landed in your netmail directory, so whenever the mailer
- exits with mail received status or the tosser has finished unpacking
- the netmail. Call it also before letting your tosser pack the netmail or
- before sending mail to your up- or downlinks.
-
- If you think this is unsafe (and unless you run an end user system, you
- have good reason to think so), you may also call ImCrypt from the DOS
- command line or from your favorite editor if your editor allows you to
- that. In that case set the PGPPASS environment variable by hand or use
- the -B option to disable batch mode.
-
-
- Options
- =======
-
- The operation of ImCrypt is controled by option switches.
-
- An option is a single letter, optionally prefixed with a
- slash '/', optionally followed by a string parameter. The letter and the
- string parameter may optionally be separated by a semicolon or an equals
- sign. Both upper and lower case is allowed.
-
- A minus sign before the option is sometimes used to negate or modify an
- option. In other case a minus sign is ignored.
-
- The option 'l' can be written in the following variants.
-
- lFILENAME.EXT
- l=FILENAME.EXT
- /l:FILENAME.EXT
- /l=FILENAME.EXT
- -l
-
- Filenames may be specified with a full path. If a directory is specified
- it need not be terminated with a backslash. ImCrypt adds it automatically
- if left off.
-
- Options are specified on the command line, separated by a single space
- or in a file IMCRYPT.CFG in the current directory. A config file is a
- plain ASCII text file. It must contain one option per line with no leading
- or trailing spaces. Comment lines starting with a semicolon are allowed.
- A config file is not mandatory, but if it exists it is read before the
- command line is parsed. Therefore options on the command line will
- override options in the config file.
-
-
- The options in alfabetical order:
-
- -B Disable batch mode. PGP is called in interactive mode and will prompt
- for the pass frase or other information if needed. Do not use this
- in unattended operation.
-
- -D Skip the decryption fase.
-
- -E Skip the encryption fase
-
- K Keep encrypted messages addressed to you. The decrypted content of
- the message is written to a new message. Without this option no new
- message is created, the old message is overwritten with the decrypted
- text. Use of this parameter is recommended in the debug fase.
-
- L Enable logging. A single "L" will use IMCRYPT.LOG in the current
- directory. A path and filename may be specified with l=<filespec>.
- An asterisk for the filespec will use the #1 mailers log file. Be
- carefull with this option in a multitasker or network environment.
- Placing a minus sign in front of the "L" will cause the logfile to
- be overwritten at each call of ImCrypt. Otherwise the logfile keeps
- on growing.
-
- P Specify a path for PGP.EXE. If PGP.EXE is not in the DOS path, this
- tells ImCrypt where to find it. If this option is not used and
- PGP is not found in the DOS path, ImCrypt will look for PGP.EXE
- in the same directory as where the keys are located. The location
- of the keys must be in the PGPPATH environment variable. If all of
- this fails, the current directory will be searched for PGP.EXE.
-
- S Overrides the autodetect of a multitasker or network. +S tells
- ImCrypt to use the IMRENUM.NOW semaphore always, even if it finds
- that it may not be sharable. -S tells it to never use it, even if
- it finds that it is sharable.
-
- T Specify a directory for temporary files. Both ImCrypt and PGP make
- use of temporary files. An alternative way to specify a temp direc-
- tory is the environment variable TMP. By default ImCrypt will use
- the semaphore directory as found in FD.SYS. Use of a ramdisk for the
- temp. directory is recommended.
-
- V Set verbosity. Valid parameters are V=0, V=1 and V=2. This provides
- for extra information, mainly usefull for debugging purposes. Default
- setting is V=0.
-
-
-
- ImCrypt v0.2 is written in Turbo C and compiled with the tiny model.
- It is tested on 286 AT and 386 clones using MS DOS 5.0 and under NOVELL 3.11
- Because it does not use any fancy DOS or BIOS calls, there is no reason
- to suspect it should not work with anything above MS DOS 3.2 or any
- future versions of MS-DOS. However... no guarantee.
-
- It was tested with InterMail 2.10 and 2.25. There is no reason it should
- not work for any 2.x version. Ad regard to future versions; if the basic
- structure of the FD.SYS file remains upward compatible, it will most
- likely continue to function.
-
- This version was tested with PGP v2.3a. Compatibilty with future versions
- is not guaranteed.
-
-
- DISCLAIMER
- ==========
-
- Although all reasonable effort is made to avoid adverse side effects,
- the author accepts no responsibility whatsoever for any alleged damages
- resulting from the use of this program. It is not guaranteed to do any-
- thing else than take up disc space.
-
-
- Acknowledgements
- ================
-
- FidoNet is a trademark by Tom Jennings
-
- InterMail is a trademark by Scandinavian PC Sytems AB and InterZone
- SoftWare Inc.
-
- MS-DOS, OS/2 and Windows are trademarks of the Microsoft corporation.
-
- Lantastic is a trademark of Artisoft corporation.
-
- IPX is a product of Novell inc.
-
- PGP (Pretty Good Privacy) is copyrighted by Phillip Zimmermann.
-
-
- =======
-
- I would like to thank the following persons in no particular order for
- making helpfull suggestions, pointing out bugs and spending time and
- effort in testing:
-
- Evert Bruinsma.
-
- =====
-
- Michiel van der Vlist (2:500/9.5)
- Dec 1993
-
-
-
-
-