home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / virus / strng25.zip / STRNG25.DOC < prev    next >
Text File  |  1993-08-15  |  26KB  |  501 lines

  1.  
  2.                ----------------->   ATTENTION  <-----------------
  3.  
  4.         YOU MUST READ THIS SECTION BEFORE PROCEEDING TO USE THIS PROGRAM
  5.  
  6.  
  7.                       You use the program at your own risk.
  8.  
  9.       Since we do not have any control over the use of this program, we
  10.       will not be held responsible for any costs, time, or any other losses
  11.       which you may incur as a result of your use of this program. Due to
  12.       the nature of this program we cannot give any warranty of suitability
  13.       for any purpose, and we thus cannot offer any warranty including that
  14.       of merchantability.
  15.  
  16.       Your only remedy is a refund of the purchase price from the vendor
  17.       you purchased it from. ( and since this program is provided to the
  18.       non-commercial and non-governmental public at no cost.....)
  19.  
  20.       You are specifically prohibited from the use of this program for any
  21.       purpose that is contrary to applicable laws or regulations, and this
  22.       program must not be used for any such purpose.
  23.  
  24.       Any commercial, or governmental, use of this program, including
  25.       investigation of the algorithm(s) incorporated within it, must be
  26.       disclosed to, and negotiated with, the author prior to such use.
  27.  
  28.       If you cannot agree to the above, then don't use this program.
  29.  
  30.                                  S/W Consultants
  31.                            San Ramon, California 94583
  32.  
  33.            S / W Consultants Can Be Reached On
  34.                                    Genie:      L. WEINMAN
  35.                                    Compuserve: 76530,1142
  36.                                    Internet  : 76530.1142@compuserve.com
  37.                                                L.WEINMAN@genie.geis.com
  38.          -----------------------------------------------------------------
  39.          -----------------------------------------------------------------
  40.  
  41.                      Hello, and Welcome to StrangeCryp V 2.5
  42.                           A program for data security.
  43.          __________________________________________________________________
  44.  
  45.  
  46.       Note: When we speak of keys in this document, or program, we may be
  47.       referring to either the keys that the users enter as their "key" to
  48.       the encryption, or to the generated sequence that serves as the
  49.       encryption "key" for the data. The meaning should be clear from the
  50.       context.
  51.  
  52.       First, we should give a very brief lesson in data security.
  53.  
  54.       There are only two ways in which data may be kept secure against
  55.       unwanted dissemination:
  56.  
  57.       1. Do not allow the data to fall into unwanted hands.
  58.  
  59.       2. Do not keep, or transmit, the data in a form which will be
  60.          intelligible to anyone who you have not authorized to read it.
  61.  
  62.          Simple, isn't it?
  63.  
  64.       As a matter of fact there is a fairly large industry, plus
  65.       governmental departments devoted to this problem.  The first way
  66.       leads to safes, guards, armored vans, and endless problems for an
  67.       individual or small business. Even with all of these precautions, the
  68.       security of the data may be comprimised.
  69.  
  70.       StrangeCryp provides the following:
  71.  
  72.       1. Very long encryption keys, or sequences.
  73.  
  74.       2. Very many different key sequences.
  75.  
  76.       3. Facilities to encrypt a file to printable text.
  77.  
  78.       4. A complex running block transposition / substitution algorithm.
  79.  
  80.       5. Available source code so you can judge the strength of the system.
  81.  
  82.       Known Disadvantages:
  83.  
  84.       This program utilizes a secret key that must be kept secret, and is
  85.       definiteley not as fast as DES.
  86.  
  87.       Data Encryption.
  88.  
  89.       Over the past 2000 years or so, many different schemes have been
  90.       proposed to accomplish this. There is even a method named after
  91.       Julius Caesar, who is supposed to have invented it.  Most of the
  92.       older methods involved substitutions and transpositions based on a
  93.       relatively small key and some, more or less complex, algorithm to
  94.       accomplish the encryption.  Relatively recently the United States
  95.       Government Bureau of Standards contracted IBM to develop the Data
  96.       Encryption Standard or DES, and proposed that it be utilized for all
  97.       private commercial encryption.  Interestingly, however, the
  98.       Government does not allow classified data relating to national
  99.       security to be so encrypted, unless it is also kept physically
  100.       secure.  If it is kept physically secure it does not have to be
  101.       encrypted.  There has been more than a bit of speculation that data
  102.       encrypted with the DES can be decrypted by the National Security
  103.       Agency, and perhaps others.  More recently your friends in the
  104.       Government have proposed the "Clipper" encryption chip - with a
  105.       secret algorithm known only to them. You may reach your own
  106.       conclusion.
  107.  
  108.       There does exist, however, a system that is the ultimate in security.
  109.       That system is the "one time", the invention of which has been
  110.       attributed to Joseph Mauborgne of the United States Signal Corps. This
  111.       method involves the use of a different pseudorandom key to encrypt
  112.       each character of data.  Since there is no short repetative key
  113.       involved, there is no method to decrypt the data without having
  114.       access to the key that was used to encrypt it. Provided, however, the
  115.       sequence, or key, is approximately as long as the data to be
  116.       encrypted, and is suitably random in nature.  At the time, the problem
  117.       of generating large quantities of random numbers presented a major
  118.       problem. The large quantities are needed because if the sequence of
  119.       random numbers is too short and repeats during the data length, the
  120.       encrypted data becomes subject to analysis and decryption.  As you
  121.       might suspect, an embassy, or military base might easily have to
  122.       encrypt many tens or even hundreds of thousands of characters a day.
  123.       Many random numbers are needed.
  124.  
  125.       When we speak of random numbers, what we really mean is pseudorandom
  126.       numbers, or, a sequence of properly distributed apparently random
  127.       numbers that may be duplicated when required. For security reasons,
  128.       we also would like many different sequences available, so that
  129.       different messages, or compilations of data, may be encrypted with
  130.       different keys.
  131.  
  132.       Cryptanalysis, or decryption by someone not authorized by the
  133.       encryptor, is accomplished by examining the distribution(s) for
  134.       different items in the set of encrypted data.  StrangeCryp operates
  135.       by joining the set representing the plain data and a set of
  136.       pseudo-random numbers. Provided that the set of pseudo-random numbers
  137.       exhibits no detectable pattern (is suitably random), is reasonably
  138.       uniformly distributed, and is of size equal to the size of the data
  139.       to be encrypted, there is no feasible way to recover the original
  140.       data from the encrypted data without the key(s). A little thought
  141.       will confirm this. If any letter could be any other letter, with no
  142.       way to determine any probablity distribution, then the message "SEND
  143.       ME MONEY" could be intrepreted as "GIVE ME HONEY", or equally, "LEND
  144.       ME SONNY".  In this example the word "ME" and the spacing was
  145.       deliberately shown the same in each case, but the message could also
  146.       be "KILL BASTARDS" or "LOVES MOTHERS" since the ASCII character for a
  147.       space may also be encrypted, and each message contains the same
  148.       number of characters.
  149.  
  150.       One of the strong points of the StrangeCryp program is the large
  151.       number of different key sets that are available: probably in excess
  152.       of 10^100.  Or put another way, if someone were to test one hundred
  153.       billion keys per second ( at present very unlikely), it would still
  154.       take about a hundred zillion years to test them all. This sort of
  155.       thing, in itself, discourages any thought of even attempting key
  156.       exhaustion as a means of cryptanalysis on data known to be so
  157.       encrypted. And, at the present time, even for a "known plaintext
  158.       attack" there has not been an analytic method published for the
  159.       recovery of the key file.
  160.  
  161.       Instructions for use:
  162.  
  163.       Installation:
  164.  
  165.       Hardware:
  166.  
  167.       No special hardware is required, except for reasonable IBM
  168.       compatability. However, if you do not have a VGA or EGA Adapter , you
  169.       will not be able to graph the distribution of the encryption key
  170.       stream. The program has been tested on a "vanilla 8 Mhz 286 clone",
  171.       and the equivalents in 386 and 486. The resulting data files were
  172.       compatible. The 286 ran acceptably, the faster machines would allow
  173.       faster operation. Earlier versions utilized an 80x87 chip if it was
  174.       available. This sometimes caused a compatability problem with various
  175.       machines with and without the chip. This version does all the
  176.       computation in software. Although it is a bit slower, this should
  177.       alleviate the incompatabilities. (We hope!)
  178.  
  179.       Speed:
  180.  
  181.       This version, on a 80486DX-33 PC clone du-jour with 256k cache, 
  182.       processes data, in either direction, at the rate of approximately 
  183.       150 bytes per second.
  184.  
  185.       Software:
  186.  
  187.       No special installation is required.  We strongly suggest that you
  188.       immediately make a backup of your StrangeCryp disk. Use the backup
  189.       disk and keep the original disk in a safe place.  You may write
  190.       protect the use disk, if you wish, to avoid accidental erasure. If
  191.       you have a hard disk, copy the StrangeCryp program to it, and use the
  192.       program from the hard disk. If you have a computer with only 1 floppy
  193.       disk drive and no hard disk, we suggest that you copy the StrangeCryp
  194.       program to its own bootable disk, but you may not write protect the
  195.       disks if you wish to store any data.
  196.  
  197.       This program contains a facility to enable the keys and setup to be
  198.       saved to a file for future use. We most strongly suggest that this
  199.       -not- be done for any data of a very sensitive nature, since it would
  200.       be possible to decrypt the information by stealing, or otherwise
  201.       obtaining, this file.  The purpose of this facility is solely to
  202.       enable routine communications to be performed using encrypted data.
  203.       Routine meaning that you do not care if it is comprimised by theft of
  204.       the key file.
  205.  
  206.       We most strongly urge that you develop an algorithm to generate keys,
  207.       and that this algorithm never be written or stored in any way except
  208.       in your, and the intended recipients, head.
  209.  
  210.          What we mean here, by an algorithm, is a simple to remember set of
  211.          rules.
  212.  
  213.       As an example, suppose that you wish to correspond frequently with
  214.       Secret Agent Joe., You and Joe then agree on the following:
  215.  
  216.           Key   M     = 1234567890123
  217.           Key   O     = the month + 3
  218.           Key   R     = the day of the month + 1
  219.           Key   B     = 3.joes telephone number
  220.           Key   D     = . your telphone number
  221.           Key   X     = 11 + sequence of winners at Bay Meadows racetrack
  222.           Key   Y     = 5 + the money take of a certain televangelist
  223.           Key   Z     = 33 + volume of shares on the NY Stock Exchange
  224.           Begin       = sum of the closing prices of Intel and AMD stocks
  225.           Block Size  = day of the year + 43
  226.  
  227.          This  sort of algorithm is easy to memorize and allows a different
  228.          key  to  be used for each message which is extremely important. Do
  229.          not, of course, use exactly this one, since it is now known.
  230.  
  231.  
  232.       A feature of StrangeCryp is the "begin key", which determines how
  233.       many dummy iterations are done before the encryption/decryption will
  234.       actually start.  We would not recommend that you set this to an
  235.       extremely high number for speed reasons.  It could be used to enable
  236.       the repetitive use of a set of keys, if all the messages were
  237.       relatively short and the begin key was greater than the sum of all
  238.       the previous messages. We do not really condone this because if one
  239.       of the messages encrypted using the same set of keys were to fall
  240.       into an opponents hands, it could theoretically comprimise all the
  241.       other messages in the set.
  242.  
  243.       When possible the input and output files should be located on a "ram
  244.       disk" for maximum speed.  This will also ensure security since the
  245.       decrypted file will go away when the computer is powered off, and
  246.       cannot then be used for an attempted cryptanalysis.
  247.  
  248.       Note that a "warm boot" will not definitely erase the data in memory.
  249.  
  250.       If you have reason to suspect extremely sophisticated opponents, you
  251.       should also obtain either a TEMPEST qualified system, or install a
  252.       Faraday shielded room in which to work. Either of these will greatly
  253.       reduce, or eliminate, the possibility of anyone monitoring you by
  254.       means of the electromagnetic radiation given off by most computer
  255.       systems.
  256.  
  257.       Remember that the level and degree of security is up to you.
  258.  
  259.       Finally - remember the following for maximum security:
  260.  
  261.       1. Do not permanently record anything, including: the range of
  262.       numbers you use, the keys, an encryption sequence that you have used,
  263.       any unencrypted text for which a copy of the encrypted text exists, a
  264.       copy of your personal method for choosing keys, & etc.
  265.  
  266.       2. Always use a different key to encrypt each data file or message.
  267.       If one plaintext is available to an opponent in combination with the
  268.       coresponding encrypted material, it may be, at least in theory,
  269.       possible to reconstruct the encryption sequence and thereby decrypt
  270.       any messages that have been encrypted using the same key set.
  271.  
  272.       Encryption Method:
  273.  
  274.       This program utilizes an implementation of the chaotic random number
  275.       generator described by Carroll, Verhagen, and Wong - Cryptologia XVI
  276.       #1 Jan. '93
  277.  
  278.       1. The selected blocksize of bytes is converted into a string of
  279.          bits (7, or 8, times the length of the block).
  280.  
  281.       2. The first encryption stream moves every bit in the block to some
  282.          other position.
  283.  
  284.       3. The second encryption stream is XORed with every bit.
  285.  
  286.       4. The third encryption stream again shuffles the bits.
  287.          The third stream comes "free" with the pseudorandom generator, and
  288.          is used to incorporate more of the initial key into the encrypted
  289.          data.
  290.  
  291.       5. The last input data block is always padded to the selected block
  292.          size, and a printable file is also padded to an even line length.
  293.  
  294.       6. The printable output data file comprises columns of hexidecimal
  295.          digits, and will be somewhat more than twice the size of the
  296.          input file. (This is not required if the file is not
  297.          printable.)
  298.  
  299.       Decryption is the inverse of the above. After decryption the output
  300.       may have some "garbage" at the bottom caused by padding of the
  301.       original file. It is a good idea to end the input file with at least
  302.       one carrage return/line feed (enter key).
  303.  
  304.       StrangeCryp was specifically designed to produce printable output
  305.       that looks like "secret code". However, if you choose, you may use
  306.       the binary output mode, which, while producing a much smaller, albeit
  307.       unprintable file, lacks a certain esthetic value.
  308.  
  309.       How to actually use the program:
  310.  
  311.       It is good practice to "compress" the file before encryption using a
  312.       program such as LHA or PkZip. This not only reduces the size of the
  313.       file, but more importantly from a cryptologic viewpoint, it also
  314.       reduces the redundancy inherent in the language and file. After
  315.       decryption the end padding will cause no problem and the beginning
  316.       padding, if used, may be clipped off before expanding the file.
  317.  
  318.       NOTE: Padding should not be requested for a non-text input file, as
  319.             the intitial "garbage" may result in the decrypted file being
  320.             unusable until the padding is removed.
  321.       NOTE: This program has an input plaintext file size limit of 10,000
  322.             bytes.
  323.  
  324.       When you first enter StrangeCryp the opening screen will cover the
  325.       program initializing itself. When ready, the message to "press any key
  326.       to continue" will appear.
  327.  
  328.       The next screen presents the choices that are available.
  329.  
  330.       You must initialize the program with a set of keys before continuing.
  331.  
  332.       After pressing 1, you will be asked if you wish to enter the keys via
  333.       the keyboard, or use an existing file. The first time you use the
  334.       program you must enter the keys by hand, unless you choose to use the
  335.       included sample keys file.
  336.  
  337.       The "reminder" information that appears is to help you remember what
  338.       sort of numbers the keys should be.
  339.  
  340.                                     (Screen)
  341.  
  342.           M - Large, Odd, Prime(?), O & R - Small Integers, B - Small Real
  343.           D - Small Fractional, X - Large >> Y > Z, Begin - Integer,
  344.           Block Size - Integer > 16 and < 1001"
  345.  
  346.           Key   M     =
  347.           Key   O     =
  348.           Key   R     =
  349.           Key   B     =
  350.           Key   D     =
  351.           Key   X     =
  352.           Key   Y     =
  353.           Key   Z     =
  354.           Begin       =
  355.           Block Size  =
  356.  
  357.           Large means up to about 15 digits for M, and 14 for X, with Y
  358.           being about 100 to 1000 less than X, and Z somewhat less than Y.
  359.  
  360.           A small integer is less than about 100.
  361.  
  362.           A small real is less than about 10, plus up to 12 digits after
  363.           the decimal point.
  364.  
  365.           A small fractional is less than 1 but more than about .3 with up
  366.           to about 14 digits.
  367.  
  368.           Begin is the number of "dummy" iterations before
  369.           encryption/decryption begins. This integer number is only
  370.           dependant on the speed of your machine, and your patience.
  371.  
  372.           Block Size is the number of bytes that are encrypted as a block.
  373.           The upper limit for this is 1000, and the lower limit is 16.
  374.           Remember that a 1000 byte block will result in a block of 8000
  375.           bits being shuffled. However, the total time for a file, except
  376.           for possible required end padding, is essentially no different
  377.           for any block size.
  378.  
  379.           If the question about "printable" is answered in the affirmative,
  380.           the output file will be printable using any standard printer. If
  381.           answered negatively, the ouput may not be printed, but will be
  382.           sigificantly smaller.
  383.  
  384.           Bits 7/8 means whether the input plaintext file is a plain
  385.           vanilla 7 bit ASCII file or if there is information contained in
  386.           the 8th bit. Any file, plain ASCII or not, may be processed using
  387.           the 8 bit mode, but it will be theoretically more secure if the
  388.           8th bit is suppressed if it is not needed. The only input files
  389.           that may use 7 bit processing are those not containing a
  390.           character above ASCII 127. ZIP, or LHA, files require 8 bit
  391.           processing.
  392.  
  393.           If the question concerning "padding" is answered in the
  394.           affirmative, the input file will be padded with a random number
  395.           of random printable characters, both at the beginning and at the
  396.           end. This is prior to any padding required for the algorithm, or
  397.           file printing formatting. There will, in general, be no problem
  398.           in distinguishing the padding from the plain text after
  399.           decryption. Do not use padding with a non-text input file, as the
  400.           decrypted file may require the padding to be removed before use.
  401.  
  402.           Note: We have observed that on occasion, the operation of the
  403.           program is different when the values are entered from the
  404.           keyboard versus from a file. It may be required on your
  405.           machine(s) to select one method, until testing has proven that
  406.           either method is acceptable. However, any key file may be edited
  407.           to the desired set of keys.
  408.  
  409.           Note 2: We have recently found that the problem noted in the note
  410.           above is caused by some compiler/machine problem that can be
  411.           remedied by observing what YOUR saved key file looks like, as
  412.           compared to the values that you entered through the keyboard. In
  413.           particular, it may prove useful to enter the full allowed 16
  414.           digits after the decimal point for key D.
  415.  
  416.           Version, 1.2 fixes some embarassing errors that existed in
  417.           version 1.1 & 1.11, and adds 2 new features -
  418.  
  419.                1. Negative Stream Error checking and correction:
  420.  
  421.                     The use of certain, but not predeterminable, values for
  422.                     the encryption keys may result in an encryption stream
  423.                     value that exhibits negative values. In use these,
  424.                     rare, values are forced to a positive value, but
  425.                     intuitively too much forcing is not a good idea. Hence,
  426.                     the program now incorporates a means for checking for
  427.                     an excessive number of these values. A percentage of
  428.                     errors less than about 0.25% should be no cause for
  429.                     concern.
  430.  
  431.                     V 2.1 - It now seems that the negative stream error may
  432.                     be caused by the lack of a 80x87. It has only ever
  433.                     shown up once on a machine with an 80x87. (or at least
  434.                     reported to me)
  435.  
  436.                2. Padding of the plaintext file before encryption:
  437.  
  438.                     The repetative use of a standardized header, or ending,
  439.                     on a message provides a potential tool to assist
  440.                     cryptanalysis. Padding provides a random length header,
  441.                     and footer, to the file of random characters. The
  442.                     penalty for padding is a somewhat larger encrypted
  443.                     file. If your messages do not always begin, or end, the
  444.                     same you need not use the padding option. Padding will
  445.                     usually also occur at the end of the file anyway,
  446.                     because the files, if they require it, are padded out
  447.                     to an integer multiple of the selected blocksize and to
  448.                     yield a full output line.
  449.  
  450.       Version 2.1 fixes still more embarassing errors, adds a larger
  451.       encryption block size, establishes a minimum block size, and
  452.       incorporates the ability to output a binary/non-printable file. The
  453.       code is now specific for 80286, and higher, machines. Any key files
  454.       saved by prior versions may still be used if a last line is added to
  455.       them - see a new version key file for guidance.
  456.  
  457.       Version 2.2 fixes a major bug(?) by supplying 2 different programs.
  458.       The first is called Strng87.Exe, and the other Strngalt.Exe. The
  459.       problem was probably the root cause of the other above mentioned
  460.       problem - the difference between the funtion and emulation of the
  461.       Intel 80x87 math coprocessor, and that of other manufacturers. If all
  462.       the machines that will crypt and decrypt messages use Intel chips,
  463.       then there should be no problem, and if they all have the
  464.       coprocessors then the Strng87.Exe program will be the fastest, and
  465.       Strng87.Exe can emulate the Intel chip in software (albeit very
  466.       slowly). However, if incompatibilites seem to show up when the
  467.       program is run on different machines, then the use of Strngalt.Exe is
  468.       suggested. This version utilizes a different math library, and while
  469.       it doesn't run quite as quickly as Strng87, it is much quicker than
  470.       Strng87 in the emulation mode. The two programs, however, do not
  471.       produce files that are compatible with each other. Another approach
  472.       is to set an environment variable ( SET NO87=TRUE ) from the dos
  473.       prompt, that will tell the Strng87 program to only use the emulation
  474.       mode. The files that are produced using the emulation mode seem (so
  475.       far) to be compatible with the 80x87 mode using an Intel chip.
  476.                     Note: V 2.2 was never distributed.
  477.  
  478.       Version 2.5 removes the ability to use the 80x87 ability completely,
  479.       as it was causing too much trouble. The new version is only slightly
  480.       slower than the version using the coprocessor. The problem was that
  481.       this program utilizes the full range of precision of the chip, and
  482.       rounding/overflow seemed to be variable among different machines.
  483.       Hopefully, the rounding/overflow in the software only version will be
  484.       more consistant from machine to machine. It also adds 7/8 bit
  485.       processing, and a few other minor changes.
  486.  
  487.       HELP: We are ready to help you with any problems you may have with
  488.       this program. For questions you may leave a message on
  489.  
  490.                     Genie       L.WEINMAN
  491.                     Compuserve  76530,1142
  492.                     Internet    L.WEINMAN@genie.geis.com
  493.                                 76530.1142@compuserve.com
  494.  
  495.           ATTENTION: A copy of the source code for this program is
  496.                      available for a $10 copying/mailing fee. Send an
  497.                      e-mail message for more information.
  498.  
  499.  
  500.  
  501.