home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
virus
/
pccryp60.zip
/
PC-CRYP6.DOC
< prev
next >
Wrap
Text File
|
1993-06-08
|
13KB
|
268 lines
Cover
PC-CRYP6
Data Encryption and Decryption Program
Version 6.0 1 June 1993
Copyright 1993 by
James T. Demberger
9862 Lake Seminole Drive West
Seminole, FL 34643
813-397-2930
PC-CRYP6 is a user supported program. If you use PC-CRYP6 and
find it of value, your contribution of any amount will be
appreciated. You are are encouraged to copy and share this program
with other users so long as the program is not distributed in
modified form and this notice is not bypassed or removed.
PC-CRYP6 is NOT a public domain program. The program
PC-CRYP6.EXE and the documentation PC-CRYP6.DOC may be freely copied
for archive or working copies for personal non-profit use as
outlined in copyright regulations. PC-CRYP6 may be made available
thru clubs or user groups, program libraries or on remote access
data bases or bulletin boards. Commercial use of PC-CRYP6 is
prohibited unless license is obtained from the author - contact
author for details regarding license.
Index
Introduction Cover
System Requirements Cover
Vernam Encryption 1
Running PC-CRYP6 Interactive 1
Command Line 3
Select Keyword 1
PC-CRYP6 Menu 2
Encrypt & Decrypt Test Strings 2
Processing Disk Files 3
Transmitting Encrypt Files 3
Double Encryption 4
Miscellaneous 4
Introduction
The program has two main functions: demonstration of the Vernam
encryption and decryption process using test character strings and the
encryption and decryption of disk files.
System Requirements
The program requires an IBM computer or compatible running DOS
with color or monochrome display and one or more disk drives. File
storage space must be available equal to twice the size of a file
being encrypt or decrypt.
Page 1
Vernam Encryption
In 1917, long before the age of electronic computers, Gilbert
S. Vernam developed an encryption process for messages punched in
paper tape using Baudot or five channel teletype code. He used the
electro-mechanical equivalent of a logical exclusive OR operation
(XOR) on each character code in a message tape and a corresponding
random character code in a key tape to produce a third tape with the
encrypt message. Decryption used the same process except that a
tape with the encrypt message and a copy the key tape were XORed to
produce the decrypt message. PC-CRYP6 uses essentially the same
process to encrypt and decrypt data; each character or code in a
message file is XORed with a virtual file of random eight-bit codes
to produce an encrypt file, an encrypt file is XORed with the
virtual file to produce a copy of the original file.
One problem with the original Vernam process related to the key
tapes. For a secure system, the characters in the key tapes had to
be in random order and the number of characters in a key tape had to
exceed the number of characters in the message to be encrypt. A
duplicate of key tapes had to maintained by anyone who needed to
decrypt messages. The physical security of the miles of paper tape
was another problem. PC-CRYP6 generates as virtual random key with
a length in excess of 14,000,000 bytes. There is no need to store
the virtual key since it is regenerated when PC-CRYP6 is run with
the same keyword.
The exclusive or function (XOR) performed by Vernam encryption/
decryption and PC-CRYP6 are "blind" as to input and output. Anything
used as input is XORed to output: unencrypted input is changed to
encrypt output and encrypt input is changed to unencrypt output so
long as the same key tape or keyword is used.
Running PC-CRYP6 Interactive
From DOS ready key [dr:][\path\]PC-CRYP6 then press the Enter key.
A default option is shown for the response to most prompts
displayed by the program. As an example, a prompt for a yes or no
response will display "y/N". Press Enter to take the no default option
indicated by the uppercase N. Either a lower case y or an uppercase Y
must be pressed for the yes response. If only lower case options or no
option is shown, an entry other than the Enter key must be used.
The first two displays are a "SHAREWARE" commercials. These
displays are followed by the keyword entry display:
SELECT KEYWORD
Press V for a visible display of Keyword or
press Enter for non-visible display _
Old Keyword is
Enter New Keyword
Press any key to continue
Page 2
Any keyword of one or more characters will be accepted however
it is recommended that keywords use at least eleven upper or lower
case characters or numbers. Keywords may be more than eleven
characters long however only the left-most eleven characters or
spaces are used by PC-CRYP6 to generate the virtual keys peculiar to
different keywords. For security, keywords may be keyed in a
non-display mode. Press V for the first prompt for a visible
display of the keywords. Upper or lower case letters, numbers,
spaces or symbols may be used when keying keywords.
After the initial entry of a keyword, the PC-CRYP6 menu is
displayed:
PC-CRYP6 Menu
P Select Keyword
T Turn Timer On/Off
S Encrypt & Decrypt Test Strings
F Process Disk Files
X Exit/End Program
The New Keyword option may be selected if you wish to change
the keyword originally entered during the initial Select Keyword
display.
Turning the timer on activates statements that accumulate the
total number of characters encrypt or decrypt and the total time
required. The program uses these totals to compute and display the
thruput in characters per second.
Encrypt & Decrypt Test Strings
The Encrypt & Decrypt Test Strings option displays a submenu
from which you may select four different types of strings for
encryption and decryption. The original, encrypt and decrypt
strings are displayed. This option is primarily used to look at the
pattern of characters produced when you encrypt strings of upper
case, lower case and numeric characters. Keyboard input of test
records accepts ASCII codes entered with the Alt key and numeric
keys.
In some cases, a character may be encrypt as the same
character. This is not an error; it makes any attempt at
unauthorized decryption more rather than less difficult. Character
strings or records to be encrypt may have characters with character
codes 0 thru 255.
Page 3
Process Disk Files
When you select the Direct file processing option the following
prompts and message will be displayed:
Enter Input dr:filename.ext
Enter Output dr:filename.ext
Processing ___ bytes
A period (.) is printed as each 512 bytes of a file is encrypt
or decrypt. After the files is encrypt or decrypt, total time and
bytes per second is displayed if the timer has been turned on.
Running PC-CRYP6 from Command Line
If your only need is to encrypt or to decrypt existing files,
PC-CRYPT6 may be run from the DOS command line by entering the
keyword, the input filename and the output filename. A command
line example follows:
PC-CRYP6 /KW=keyword /FI=dr:\path\fname.ext /FO=dr:\path\fname.ext
The command line parameters must be entered in the order shown;
/KW=keyword, /FI=filename for the file to be encrypt or the file
to be decrypt, and /FO=filename for the encrypt file or the decrypt
file. There is no output shown on the display nor is any other
input required other than the parameters entered on the command line.
Transmitting Encrypt Files
An encrypt data file may be sent to another system for
decryption using a communications link or as a disk file. Since
encrypt data files may contain characters or character strings
corresponding to transmission control codes, encrypt files should be
transmitted as eight bit binary files using XMODEM or some
equivalent transmission protocol for binary files. File compression
utilities will probably not compress encrypt files or only compress
these files by a very small percentage. PC-CRYP6 can be used to
encrypt files created with PKZIP - an encrypt ZIP file can be
considered to be twice as secure since the ZIP process is in effect
encryption as well as compression.
Any of several schemes may be used to insure that the receiving
operator knows the keyword required for decryption. Different file
names and extensions could be used as a pointer to a page and word
in some book available to both the sender and receiver. Keywords
could be tied to the creation date of an encrypt file with a
keyword calender.
Page 4
Double Encryption
Unauthorized decryption can be made even more improbable if the
encrypt data is encrypt a second time. A keyword different from
that used for the first encryption must be used for the second
encryption. This same keywords must be used to decrypt the double
encrypt data; the resulting single encrypt data is decrypt with the
keyword that was used for the first encryption.
The following steps outline the files and conversion prompt
responses required for double encryption and decryption when using
sequential file processing:
Encryption
Step A Same keyword used for this step and for Step D.
1 Input file - text file to be encrypt
2 Output file - single encrypt file for input to Step B 1
Step B Same keyword used for this step and for Step C.
1 Input file - single encrypt file from Step A 2
2 Output file - double encrypt file for input to Step C 1
Decryption
Step C Same keyword used for this step and for Step B.
1 Input file - double encrypt file from step B 2
2 Output file - single encrypt file for input to Step D 1
Step D Same keyword used for this step and for Step A.
1 Input file - single encrypt file from Step C 2
2 Output file - copy of file used as input to Step A 1
Double encryption of files does not require that the two
keywords be used in the same sequence for both encryption and
decryption; either keyword may be used for step C so long as the
other keyword is used for step D.
Miscellaneous
Always keep a record of the keyword used to encrypt any file
that contain critical data. If the keyword used to encrypt a file
is not known, the file is nothing more than computer generated
garbage.
How secure is the data in files encrypt with PC-CRYP6? I don't
know since I don't have any indepth of knowledge in cryptography.
Since very few encrypt files will be long enough to require
recycling the 14,000,000 byte random key, it is probably impossible
to find a pattern that would be of any use in decrypting the data.
While there may be some method or technique that can be used to
decrypt files that have been encrypt by PC-CRYP6, the method or
technique would probably be too time consuming to be of any value.
For all practical purposes, encrypt data is probably totally secure
so long as the keyword used for encryption is not known.