pad encryption method and software5799090Abstract A pad encryption software architecture includes space on a floppy for storing the pad to be used with the encryption software. The pad is XOR generated with random numbers subject to redetermined offsets. If the pad is smaller than the text to be encrypted, then XOR takes several cycles with redetermined offsets used in XORing the pad with the remaining plain text to be encrypted. The offset is determined from a user selected password. New offsets are determined from old offsets by adding the current offset to the value of the byte in the pad located at the offset value. Claims What is claimed is: Description FIELD OF INVENTION
______________________________________
BYTE ONE = 10100100
BYTE TWO = 11001110
XOR = 01101010
______________________________________
In short, any bit match between the two bytes yields FALSE, any bit mismatch yields TRUE. The XOR operation can be undone in two ways, to regenerate BYTE ONE, or BYTE TWO, as desired. In particular, BYTE ONE is regenerated by XORing the first XOR result with BYTE TWO, as follows:
______________________________________
XOR = 01101010
BYTE TWO = 11001110
BYTE ONE = 10100100
______________________________________
Similarly, BYTE TWO is regenerated by XORing the first XOR result with BYTE ONE, as follows:
______________________________________
XOR = 01101010
BYTE ONE = 10100100
BYTE TWO = 11001110
______________________________________
The random pad created is stored 14 at the blank space on the floppy disk or other storage location selected, according to an embodiment of the present invention. The random pad which has been created can additionally be stored 14 on a flash card which has been prepared by burning a PCMCIA program onto it, according to an embodiment of the present invention. According to the present invention, once encryption has been completed and the encrypted text has been stored on a hard disk on a computer or elsewhere, the pad number or sequence must be separated from the encrypted number. If the pad number or sequence is stored proximally to the encrypted text, there is no security for the encrypted text, because a third party having access to the encrypted text also can use the pad to decrypt the encrypted text. Having the pad on a PCMCIA card, a medium which is non-volatile and more robust than the typical floppy disk, permit the encrypting user to separately maintain the encrypted text and the key, i.e., the pad, which can be used to access the encrypted text. Typically, it is desired to have a back-up for the pad stored on the PCMCIA card. Accordingly, it is one embodiment of the present invention to store the pad at a predetermined location within the pad & encryption program, preferably on the installation disk used to install the pad & encryption program on the PC hard drive for operation, including generation of a pad. According to one embodiment of the present invention, the pad & encryption program is mounted on a selected memory medium, which may be magnetic or optical. According to one embodiment, the pad & encryption program is stored on a magnetic floppy disk and is installable on a magnetic hard drive. According to one embodiment, the pad & encryption program includes software modules including but not limited to a pad creation module, an encryption module, an installation module, and an initially blank or zeroed pad sequence storage module or region. FIG. 2 is a flow diagram of a method according to the present invention, showing creation of successive random characters by XORing pseudo random numbers with corresponding characters of a selected seed file. In particular according to the present invention, characters for a pad are generated by selecting a seed file and entering 20 the seed file at a first byte thereof. A seed file is any selected file containing elements, bits, values, or characters. It is called the "seed file" for convenience herein, because it is the file from which bits for example are obtained which after a particular logical operation give birth to the desired pad which is used for encryption purposes according to the present invention. The first byte is stored 21 in a memory (e.g., RAM memory) momentarily, serving as a first value from the seed file. Further, a pseudo random number is generated 23, and the pseudo random number is logically combined, by exclusive OR, i.e., XOR, operation, with the first value extracted from the seed file, to generate a first random character of the pad. To generate a next random character of the pad, the process of FIG. 2 is repeated, and successive values, e.g., bytes, are extracted from the selected seed file for logical combination with successively generated pseudo random numbers. Each pseudo random number is generated in succession, and each next pseudo random number is combined logically with the next value from the selected seed file to generate a next random character of the pad. This process repeats itself until a desired number of pad characters have been developed or produced. For purposes of this invention, created, produced and generated have the same meaning. According to an embodiment of the present invention, logical combination by exclusive OR, i.e., XOR, is performed to generate the random characters of the pad. According to an embodiment of the present invention, the pad produced can have on the order of approximately 20,000 random characters. According to an embodiment of the present invention, random number generation produces pseudo random numbers by pseudo random number generation. FIG. 3 is a flow diagram of a method according to the present invention, showing the determination of an offset or setoff applied to the pad before XORing with a corresponding character of plain text to be encrypted. According to one embodiment of the present invention, the offset determines which character of a pad string will correspond with a counterpart character of plain text during XOR operation, to raise the security level of encryption. Thus, for a zero offset, the first character of a pad string will be XORed with the first character of plain text to be encrypted. A second character of a pad string will be XORed with the second character of plain text to be encrypted and so on. With an initial setoff of two, on the other hand, the third character of a pad string will be XORed with the first character of plain text to be encrypted. A fourth character of a pad string will be XORed with the second character of plain text to be encrypted and so on. The beneficial use in enhancing security of plain text to be encrypted with the use of a changed pad setoff arises from the fact that to avoid susceptibility of the encrypted text to undesired decryption, the pad must be as long as the plain text to be decrypted. If the plain text is longer than the pad, security requires that a new pad be used, otherwise the encryption can be broken, by relying upon the establishment of a pattern with reuse of the same pad for the remainder of the plain text left over after the first portion has been encrypted with the pad. According to the present invention, this disadvantage is avoided by using a first pad setoff for encryption of a first portion of the plain text being encrypted and a second, independent pad setoff for another portion of the plain text, which is left over after the first portion has been encrypted. According to the present invention, XOR logical conversion of a particular pad generated and plain text selected for a first encryption level is performed 30 with a first offset. A new offset can be determined 31 by adding the value of an older offset with a selected non-negative integer value derived from the pad 32 relative to the older offset valve, and applying the offset to determine the pad characters to be XORed with further plain text characters. Accordingly, in order to continue first level encryption with the remainder of the plain text, one enters the pad at the location specified by the new offset valve. For subsequent offsets in further cycles, the process is repeated. Thus, according to one embodiment of the present invention, the offset can be redetermined for each cycle in accordance with the flow chart of FIG. 3. A cycle is defined as the point when a pad string has been completely used in XOR operation to perform a first order encryption of a portion of a plain text file. For example, if the pad string contains n characters or bytes, and the offset is 5, then the first character of the plain text is logically combined with a character from the pad defined by the offset 5. The characters initially skipped can be eliminated entirely from use, according to one embodiment, or they can be used at the end of a particular cycle. FIG. 4 is a flow diagram of a method according to the present invention, showing user selection 40 of plain text and a password for encryption. FIG. 4 further shows calculation of an offset from the selected password for establishing character correspondence between plain text and pad prior to XORing 42 (byte-sized, according to one embodiment of the present invention) plain text characters, to generate desired output ciphertext. The offset is significant, because the plain text is a file of sequential characters. Similarly, the pad is a sequential grouping of bits or characters. According to the present invention, an initial offset is established by establishing a correspondence at an initial offset value of the pad sequence which will be XORed with the first character of the plain text. According to the present invention, a user selects 40 plain text to be encrypted 41 and selects 44 a password of desired length. According to one embodiment of the present invention, a five character password is selected. According to one embodiment of the present invention, selecting 41 plain text to be encrypted includes or is followed by compressing the plain text by a selected compression technique. Many compression techniques are well-known. Some of these are commercially available. Any one of these may be used in connection with the present invention. Alternatively, compression can be applied to the output ciphertext, within the meaning of the present invention. Next in FIG. 4, the user XORs 42 particular characters, i.e., bytes, of the selected plain text with corresponding pad characters or pad derivative (e.g., the pad XORed with a password) characters. The pad characters XORed are taken from a pad of selected relative size (compared to the size of the plain text being XORed) at a determined pad character offset. The result of XORing the offset pad characters with corresponding plain text characters is to produce output cipher text. According to one embodiment of the invention, the offset at which pad characters are taken for XORing with corresponding plain text, can be determined by selecting a password which may have five characters, for example, and programming 44 the selected password by combination with a randomly determined pad. The offset is determined 45 with reference to the selected password. An example of how to determine the offset from a selected password is according to the following code: char code; int offset; int y; for (y=0; y<5;y++) do offset +=*(code+y); The character of the pad to be selected in accordance with the offset is identified by moving 46 a pointer for example to the location of the next character in the pad. Next, the character of the pad identified with reference to the offset is extracted 47 and then XORed with the password 43. Finally, the result of XOR logical combination 43 is XORed with corresponding plain text 42 to produce output ciphertext. If the plain text is larger in number of characters than the pad, the pad is reused at a redetermined offset for XORing the not yet enciphered portions of the plain text. According to one embodiment of the present invention, the offset is a function of a user selected password. According to one embodiment of the present invention, the pad includes the user selected password or a derivative thereof. According to the present invention, a pad is created with a software program stored on a selected memory medium on which space is reserved for storage of the pad created. Once the pad is created, it is stored at the reserved space. According to one embodiment of the present invention, the pad is additionally stored at another location for security. According to one embodiment of the present invention, the pad is stored on a flash card. According to one embodiment of the present invention, the software program is stored on a floppy disk. According to one embodiment of the present invention, the pad is stored at a reserved space on the floppy disk. According to one embodiment of the present invention, the software program is installed on a hard disk. According to one embodiment of the present invention, the pad is created by the software program with a seed file located on a hard disk drive, i.e., a hard drive. FIG. 5 is a flow diagram of a method according to the present invention, showing creation of ciphertext by XORing with the result of a pad XORed at an offset location with a selected password, the offset itself being a function of the selected password. In particular, a password is selected 50. Next, an offset is calculated 51 or otherwise determined. A move is then made 52 to the offset determined location. Then, the character of the pad at the offset location is extracted 53. The particular pad character is XORed 54 with the first character of the password, to produce a result, which in turn is XORed 55 with corresponding characters of plain text to produce ciphertext. For purposes of the present invention, random is defined as an unpatterned, probabilistically unbiased sequence greater than or equal to one of elements (preferably bits, but for example also characters or numbers). Pseudo random means substantially but not completely random, for example but not limited to 99 percent random. By definition, a computer generated number is considered to be pseudo random. Appendix A. below provides an example of C++ code according to an embodiment of the present invention. ##SPC1## Appendix B. below provides an example of C++ code according to the present invention. ##SPC2## Appendix C. below provides an example of C++ code according to the present invention. ##SPC3## Appendix D. below provides an example of C++ code according to the present invention. ##SPC4##
|
Same subclass Same class Consider this |
||||||||||
