
   ---------------------------------------------------------------------
               Iozone's simple rotorary encryption mechanism.
   ---------------------------------------------------------------------

     Think of a cylinder with letters 0 to 255 on its surface, in randomized 
   order.  Now stack a series of cylinders next to each other, such that 
   they mechanically interact as below.

   Take an input character and find the offset to that letter on the cylinder. 
   This offset is then used as the input for the next cylinder.  At the end of 
   the stack of cylinders out pops a value that is the offset on the last 
   cylinder of a value.  This value can then be used to decode the previous 
   cylinder, and so on, until one arives at the first cylinder. There one 
   will find the original letter that was input.

    Each cylinder contains 0 through 255 (all possible ascii characters). These
   values are then shuffled on the cylinder, so that their offsets within the
   cylinders are randomzed.  Each cylinder is randomized from a series of 
   shuffles that are based on rand().  Rand gets it's seed from the user of 
   this application.  That way, every message can have differently randomized
   disks. As each character is processed the seed is incremented, and one
   of the cylinders (randomly selected) is re-shuffled, at a user specified
   frequency (cog), and partial shuffle per input character  :-) 

   Rotor # 0                         Rotor #1   ---->

   Index       _____Output____>                          __Output__>
               ^               |                         ^          |
               |               |                         |          |
   0   1   2   3   4   5       |     0   1   2   3   4   5          |
   -   -   -   -   -   -       |     -   -   -   -   -   -          |
   Input ----> 65              |__Input________________> 3          |___> 5


  The letter 'A' is decimal 65.  The first rotor converts this to 
  the index value of 3.  The second rotor converts the input value of 3 into
  the index of 5.  This continues through all of the randomized rotors.

    All one needs to save an encrypted file is this program and:
	The key used to prime the random number generator.
	The number of rotors that will be used. ( or leave as default )
 	The re-shuffle frequency. (cog)
	An input character to encrypt.

   All that one needs to decode the original message is this program and:
	The key used to prime the random number generator.
	The number of rotors were used.		( or leave as default )
 	The re-shuffle frequency. (cog)
	The encrypted character to decrypt.

--------------------------------------------------------------------------
API:
        Call _start_encryption( x,y,z )
		where 
		x = Key
		y = number of rotors
		z = How often to reshuffle.

	Call val = _crypt_char( char )
		Input is a character. Return value is encryted char.

	Call val = _decrypt_char( char )
		Input encrypted char. Return value is decrypted char.

	Call _end_encryption()
		Shuts down the cipher machine and releases resources.

--------------------------------------------------------------------------


   Example usage: /* Key = 1234, Num_rotors=7, Re-shuffle freq = 5 */

 	start_encryption( 1234, 7 , 5)
	val = 'a';
	printf("Input >%c< char\n",val);
	val = crypt_char(val);
	printf("Encrypted value >%c< char\n",val);
	val = decrypt_char(val);
	printf("Returned >%c< char\n",val);
	end_encryption();

---------------------------------------------------------------------
Note:  This is an encryption mechanism and may come under some form 
       of distribution restrictions.  See:
   http://en.wikipedia.org/wiki/Export_of_cryptography_from_the_United_States	


