home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
w
/
wpcryp.zip
/
WPCRYPT.DOC
< prev
next >
Wrap
Text File
|
1991-06-26
|
7KB
|
144 lines
WPCRYPT 1.0 WordPerfect 5.x file encryptor/decryptor
Copyright 1991 Daniel W. Emmer
WPCRYPT is a useful little utility that provides somewhat
improved (I think...) password protection for sensitive WordPerfect
5.x documents. WordPerfect's own file encryption method is rather
sloppy; relatively simple analysis of many supposedly "locked"
files can reveal their passwords (my own WPPASS utility does this,
and if I can do it, ANYONE can...). WPCorp's major slip: their
encryption scheme begins encoding a file very near the beginning,
encrypting assorted system codes that precede the actual body of
the document. Some of these codes are ALWAYS the same in ANY WP
5.x document file, and some others vary but are somewhat
predictable. This gives the cryptographer / decryption program
just what he/she/it needs: a set of known bytes encrypted by
exactly the same method as the rest of the document. Working
backward from these known bytes, it's not too difficult to break
the code and access the rest of the file.
WPCRYPT uses an encryption algorithm somewhat like
WordPerfect's, but it begins encrypting at the beginning of your
document's text, leaving the all-too-predictable prefatory codes exactly
as they were. As a result, WPCRYPT-encoded files are considerably
harder to crack. An experienced cryptographer could undoubtedly do
it (though it would be much more difficult than unlocking a file
protected by WordPerfect), but this isn't something that most of us
have to worry about....
USAGE
Syntax: WPCRYPT
WPCRYPT infile
WPCRYPT infile password
WPCRYPT infile password outfile
where infile = name of file to be en/decrypted
password = password (case sensitive)
outfile = name for the newly en/decrypted file
***MUST*** be different than infile
If you don't specify all three parameters, WPCRYPT will prompt
you for the rest. However, WPCRYPT assumes that command-line
parameters come in order, so the four variations above are the only
acceptable options (my fault -- sloppy programming). File names
can include a path name if you're using DOS 2.0 or higher. Wildcards
are not supported.
ENCRYPTION vs. DECRYPTION
There's NO DIFFERENCE IN SYNTAX between an encryption and a
decryption. If you send in a file that's already encrypted, the
output file will be decrypted and vice versa. As far as the
program is concerned, it's exactly the same operation. For
example, if FILE.XXX is a WP document:
WPCRYPT FILE.XXX ARTICHOKE FILE.YYY
encrypts FILE.XXX using password ARTICHOKE and puts the result into
FILE.YYY. Then:
WPCRYPT FILE.YYY ARTICHOKE FILE.ZZZ
decrypts FILE.YYY into FILE.ZZZ, which will be identical to
FILE.XXX. It's best to use a unique extension for all encrypted
files (something obvious like .ENC), just to keep track of what's
what.
Please note: if you attempt to decrypt a file with the WRONG
password, you will get no instructive error messages or annoying
beeps, just an output file full of gibberish. This is the major
reason that WPCRYPT doesn't allow you to replace the input file
with an output file of the same name; if a typo or momentary
memory lapse turns your output file into nonsense, you can always
try again from the original. WordPerfect will retrieve an
improperly decrypted file, but it won't be of much use....
In fact, WordPerfect will allow you to retrieve ANY file
encrypted by WPCRYPT, since the files aren't "locked" by WP's
method. However, there's a strong possibility that WordPerfect
will be hopelessly confused by the encoded (or improperly decoded)
data and will "lock up" your system. No harm is done, but
you will have to re-boot the system. I'm not sure whether to call
this a "bug" (since it can be inconvenient) or a "feature" (since
it can be REALLY inconvenient for someone who's trying to access
encrypted files without the appropriate passwords).... To see if a
document has decrypted properly, use the Look option on the List
Files menu before retrieving the file.
If you want to make WPCRYPT a bit easier to use for encrypting
a number of files, create a simple batch file that takes all three
parameters, calls WPCRYPT, and deletes the unencrypted original:
@ECHO OFF
WPCRYPT %1 %2 %3
DEL %1
Please try this only if you've tested WPCRYPT thoroughly and trust
it to retrieve your originals without error.
PASSWORDS
Anything that you can get the program to accept should work.
Passwords are case sensitive and must be reproduced EXACTLY to get
an exact decryption. Extended ASCII characters (generated by ALT-
keypad #) are perfectly acceptable. You might get SOME
intelligible text something close to the right password, but you
probably won't get much. Please remember that ANY encryption done
with WPCRYPT can be reversed by WPCRYPTing again with the same
password. Without the password, good luck....
ADMINISTRATIVE NONSENSE
This is hardly a "professional-quality" program, with all the
proverbial "bells and whistles" that accompany expensive software
packages. The ideas on which the program is based are, of course,
stolen, but the code (such as it is) is entirely my own. Source
code is neither included nor available, since my programming skills
leave much to be desired and I, like many others, prefer to avoid
public ridicule. I also take NO responsibility for the results of
any use (or misuse) of the program. WordPerfect, as you might
expect, is a trademark of WordPerfect, Inc.
If you find this program useful, I'd be thrilled beyond belief
if you'd send a donation of $5 or $10 (or whatever you feel is
appropriate) to the address below, or, better still, send a few
dollars to your favorite charitable and/or non-profit organization
on my behalf. If you're a student in any accredited (or
unaccredited, for that matter) academic program, I hereby official-
ly exempt you from any fee if you use this program in conjunction
with your course of study. If you haven't found it useful yet,
feel free to keep a copy lying around in case the need should
arise. I any case, I'd appreciate E-mail at any of the addresses
below if you have any comments or complaints about the program.
Daniel W. Emmer
University at Buffalo Internet: v393vlqr@ubvms.cc.buffalo.edu
Department of Anthropology BITNET: V393VLQR@UBVMS
380 MFAC CompuServe: 73520,3206
Buffalo, NY 14261