My Personal Website

Encryption Preliminaries

A PRNG is used to assemble the hash function, calculate the rotation index and form a message number.  The PRNG begins with an initial value (IV) and is allowed to cycle for a fixed number of operations, calculating a new 64-bit random number (Xi) each time.  The number of operations in each cycle depends on the value of Xi and the number of milliseconds indicated by the system clock at the beginning of the cycle.  At the end of the each cycle, the polarity of the random number is reversed switching to a new part of the Xn sequence that can only be predicted from the value of Xi at the end of the cycle.  After ten such cycles, the system clock is checked to see if it indicates a multiple of 10ms.  If not, the cycles continue until the end of a cycle when a multiple of 10 ms is indicated.  The value of Xi is then used to calculate the hash function.  The process continues in a similar manner to generate rotation index and the message number.  Each of the above numbers is a 32 bit number that is converted to an 8 byte hexadecimal value.

Before the encryption process can begin the file names must be identified.  The input file name is captured for use in the message header, so that the original file name can be recovered during decryption.  The name of the encrypted file is a composite of the system date and the message number created by the random process, separated by a period and followed by ".dat".  The embedded keys are then assigned to the various registers.  The keys are embedded as hexadecimal pairs, each of which has to be converted to an integer value before being assigned to a register element.  There are 1024 hexadecimal pairs corresponding to 256 elements in each of the four registers.  As each element contains an 8 bit number, the key set is essentially an 8192 bit key.

Next, the message data must be read from the message file.  This is achieved by reading the data in 64kB blocks.  As each block is read it is inserted into the message data stream, which takes the form of a single string (character) variable.  Currently, the size limit for the message is 3 X 107 characters, which is about 7,500 pages of A4 script or 5 million words.  It is possible to increase the maximum size of the message by more than an order of magnitude, should the need arise.  The data reading process is illustrated in Figure 3.

Figure 3:  Arrangement for reading message data in blocks