Method of cryptographically transforming electronic digital data from one form to another5003596Abstract A cryptographic system creates a key table from a single key such that the relationship between the keys in the key table cannot be determined even if the system implementation is known. The system uses variable functions in which the determinants are changed by the variable function chosen by the determinant. Thus, the functions used in creating the key table do not have to be one-to-one functions. From the key table, four blocks of bytes of additional key based determinants are formed which are called masks. The original key does not exist in either the key table or the mask table. The system preferably uses the key table in a multiple round encryption process. The keys chosen from the table for a key addition operation are a function of the plaintext, the current state of the ciphertext, and the mask values. Therefore, the order in which the keys are chosen is not predetermined or patterned. The system also selects the other encryption functions, including permutations and substitutions, by the plaintext, current state of the ciphertext and the mask values. The cryptographic system also can include a function referred to as the enclave function. This function operates on lookup tables and creates complete inter-symbol dependency on the block of bytes. Claims I claim: Description BACKGROUND OF THE INVENTION
______________________________________
Whole:
0 1 2 3 4 5 6 7 8 9 10
Mod 3:
0 1 2 0 1 2 0 1 2 0 1
______________________________________
Thus, 10 modular 3, Which is commonly abbreviated as 10 mod 3, is equal to 1. Modular arithmetic can more easily be done by successively subtracting the modular from the number in question until the result is between zero and the modulus minus 1. For example: 10-3=7; 7-3=4; and 4-3=1. Thus, 10 mod 3 since the last subtraction resulted in an answer between 0 and 2, with 2 modulus 1. The general format for a modular arithmetic function is (whole number) mod (modulus)=whole number smaller than the modulus. As shown in FIG. 1, the system commences at the start, reference 10, and then control passes to reference 12 for the initialization of various tables in memory. As will be explained hereinafter in more detail, a number of tables are supplied to the system and a number of tables are created within the system. This takes place initially before any plaintext or ciphertext is encrypted or decrypted. Control then passes to reference 14 where the first block of plaintext is selected. Although FIG. 1 is shown in connection with the encipherment of blocks of plaintext, the same steps would also be followed for decrypting selected blocks of ciphertext. Control then passes to reference 16 where the selected block of plaintext is encrypted in accordance with the cryptographic system of the present invention. If there is more plaintext left to be encrypted, as determined by query 18, the next block of plaintext is selected at reference 20 and the next block is encrypted. If there is no more plaintext, then the system stops operation at reference 22. The step of initializing the tables in memory is shown in more detail in FIG. 2. A permutation table, an S-box table and an enclave table are initially loaded into the system's memory at reference 30. The permutation table includes a plurality of addressable entries which dictate in a particular fashion how the position of the bytes in the block of data undergoing encryption will be scrambled, or will be descrambled for decryption. This is a commonly used cryptographic technique. The S-box table is an arrangement for a plurality of substitution entries which dictate, as directed by a particular entry, how the actual values of each byte of the block undergoing transformation will be changed to another value. While this could be included in the form of a standard substitution table, the S-box table arrangement is more efficient computationally and is well-known in the field of cryptography. The enclave table, loaded into the memory at reference 30, will be explained hereinafter in more detail. The initial key is then loaded into the system at reference 32. For purposes of this application, a key is any secret value or data block which is not expressly stated or set forth in the system implementation, algorithm or tables, but is installed or loaded into the system to direct the cryptographic process. Basically, a key is a secret value or values upon which the cryptographic process acts, but is not a part of the algorithmic implementation. The system then decides at query 34 whether an initializing vector is included. The use of an initializing vector is common in the field and is typically used when transmitting data across telephone lines and the like. The initializing vector is sent across the lines before the enciphered data and is used in further decryption of the data. As shown at reference 36, the key is combined with the initializing vector in an Exclusive OR operation, in a bit by bit manner, to modify the initial key which is then used at reference 38 to generate the key table. Rather than use an Exclusive OR function, the values of each byte in the key could be added to the value of each byte in the initializing vector to modify the initial key. These are both standard techniques in cryptography for using an initializing vector in connection with a key. If no initializing vector is used, then control passes directly to reference 38 where the key table is generated from the unchanged initial key. Once the key table is created, then control passes to reference 40 where the mask table is generated from the entries generated in the key table. The particular processes used to generate the key table and mask table entries from the initial key are explained hereinafter in detail. In accordance with a preferred embodiment of the present invention, the block size of the data undergoing cryptographic transformation is selected to be ten bytes long, with each byte including eight digital bits therein. Seven of the bits in each byte are used for the data values and the eighth bit is a parity bit as is well-known in the field. In the preferred embodiment here, the key has been selected to be the same length as the block of data undergoing encryption and decryption. However, the key could be other lengths, if desired. It is necessary that the key be long enough to make guessing the key by an exhaustive attack very difficult. When using seven value bits in each byte, it is preferred that each key include between eight and twenty bytes. While key lengths longer than twenty bytes can be used, it would make the computation in the cryptographic system much more difficult and time consuming and would increase the length of the various tables used in the system, correspondingly increasing the memory space required. The same considerations are applicable in selecting the block of plaintext undergoing encryption, particularly when small blocks of information will be sent through the system. The block size should include an even number of bytes if the enclave function of the present invention is used. However, the block size could be an odd number of bytes if the enclave function was not used. A major element of the cryptographic system of the present invention is that the particular permutation, substitution or enclave table used in performing a particular cryptographic function on the data is a function of certain values or elements in the data undergoing transformation. This aspect of the present invention is being referred to as a variable function, which is any function where two or more possible choices exist. This aspect of the present invention is also used initially in generating, from an initial key, a key table which is later used in the encryption/decryption process. Generally, one or more elements from the key are selected and the result of a predetermined mathematical function is used to choose a variable function table. The function is performed on the present state of the key in accordance with the selected table to generate a new key. The result of the mathematical function could also be used to pick, from many available possibilities, the particular function used in conjunction with a particular table. In the preferred embodiment of this invention, the particular type of function is preset and only the table used in conjunction with that function is selected by means of the data undergoing encryption/decryption. A particular arrangement for producing the elements of the key table, which uses substitution, permutation and enclave functions, is set forth in FIG. 3. The ten bytes of the key undergoing transformation are shown in element 50 as K.sub.n 1-K.sub.n 10. In selecting the substitution table used, the values of the last five bytes of the key are added together using modular arithmetic at element 51 to generate a digital number stored in memory register Y at element 52. The modulus of the modular arithmetic used at element 51 would be determined by the size of the substitution table used in the system. In a preferred embodiment, the substitution table would include 32 tables for 128 byte values and, therefore, the arithmetic used at element 51 would have a modulus of 32. In an example included hereinafter in this application, the substitution table has, for ease of understanding, only 16 tables and element 51 would be modular 16. While FIG. 3 shows the addition of the values in the last five bytes of the key undergoing transformation to generate the number used in selecting the substitution table, it is to be understood that any combination of the ten bytes in the key, including all ten, could be used to generate the Y value at element 52. In selecting the permutation table used in FIG. 3, the first five values of the key are added together using modular arithmetic at element 53 to generate a digital number stored in memory register X at element 54. Similar to the substitution table calculation, the modular arithmetic used at element 53 for generating the permutation table X would be dependent upon the size of the permutation table used in the system. In a preferred embodiment, there are 128 entries in the permutation table and, therefore, the modular arithmetic at element 53 would be modular 128. The value Y generated at element 52 is used to select the substitution table which is used to modify the current state of the key. The key is then substituted in accordance with this table. Thereafter, the value X generated at element 54 is used to select the particular permutation table. The key, which previously underwent a substitution operation, is now permutated in accordance with the selected table. This operation, which transforms key.sub.n to an intermediate state referred to as PSK.sub.n, is set forth in element 55 in FIG. 3. The transformed key, after undergoing first the substitution and then the permutation, is represented in FIG. 3 as element 56, including bytes PSK.sub.n 1-PSK.sub.n 10. A sample permutation table entry is shown in FIG. 4. The position of the eight bit bytes at the top of FIG. 4 will be scrambled as directed by the various arrows to the new position shown at the bottom of FIG. 4. Working from the top to the bottom gives an encryption of the data. To decrypt the data, the positioning is rearranged from the bottom to the top to recapture the initial arrangement of the data. This is a standard technique used in many cryptographic systems and need not be explained in further detail in this application. Likewise, a typical entry in the substitution table is shown in FIG. 5. If a particular plaintext value appears in any of the bytes of the data undergoing transformation, then the substitution table used will direct that the plaintext value be substituted by a new value. For instance, if the plaintext value is P.sub.0, then, in accordance with the table shown in FIG. 5, it will be substituted by the new value of S.sub.1. Working backwards through the substitution table, the encrypted data can then be decrypted to recapture the original plaintext values. Once again, this is a standard cryptographic technique and need not be explained in further detail. It must be understood that the particular arrangements shown in FIGS. 4 and 5 are only representative of the many possibilities of permutation and substitution table entries and that many other entries would be included in the tables used in the cryptographic system of the present invention. In FIG. 3, the intermediate state of the key at element 56 is further modified in accordance with a newly developed function, referred to as an enclave function by the applicant. The enclave process is also a variable function in which certain values of the data undergoing transformation are used to generate a number which in turn is used to select which of a plurality of enclave tables will be used to perform the further transformation of the data. In the embodiment shown in FIG. 3, certain values of the intermediate state of the key in element 56, bytes 3, 4, 5, 6 and 7 as shown, are added together using modular arithmetic at element 57 to create a digital number identified as Z and stored in memory register Z in element 58. In a preferred embodiment, the enclave table includes 32 entries and, accordingly, the arithmetic performed at element 57 would be modular 32. Thereafter, the intermediate state of the key is further transformed according to the particular enclave table selected and this transformed key is entered into the key table at element 59. The enclave function will be described in detail hereinafter in connection with FIGS. 6 and 7. In accordance with the notation used in the present application, "Key" is used to represent the initial key. The initial key is used to generate the first key in the key table, which is identified as Key.sub.0. Key.sub.0 is stored in the key table and is then used to generate the next entry in the key table, namely, Key.sub.1. Key.sub.1 is created from Key.sub.0 by following the same steps set forth in FIG. 3 for generating Key.sub.0 from the original key. The remaining keys in the key table are generated in turn from the immediately preceeding key until the key table is filled. The generation of a key from its predecessor in the key table is represented as element 59 in FIG. 3 where Key.sub.n is used to generate Key.sub.n+1. The number of entries in the key table should be a factor, or divide evenly into the alphabet space. In the preferred embodiment described herein, the alphabet space is 2.sup.7 or 128. If the number of entries is not a factor of the alphabet space, then the statistical chance of certain keys being used is greater than other keys. This discrepancy could aid a cryptanalyst and should be avoided. The maximum number of entries in the key table is the size of the alphabet space and the maximum has been used in the preferred embodiment. In general, each key in the key table is generated as a result of a variable function performed on the previous key, with the particular variable function determined by information extracted from the prior installed or generated key. The initial key would be the installed key and the generated keys have been referred to as Key.sub.0, Key.sub.1, etc. In this manner, the key table does not include the initial secret key and, therefore, it is impossible to solve for the initial key from knowledge of information in the key table. As will be explained hereinafter in more detail, a different set of keys will be selected in each round of the encryption and this makes it impossible to search for or solve mathematically for one key used repetitively. This simulates a one time tape when an initializing vector is used with every transmission in connection with the initial key. Also, knowing one key in the key table cannot give the attacker the previous key since a cryptanalyst cannot work backward through the key table. Therefore, this arrangement is much better than a pseudo-random key generator. It must be noted that the arrangement set forth in FIG. 3 is just one possible implementation of the present invention. There are almost an infinite number of variations possible without changing the spirit or scope of the invention. Any process using the initial key or an installed data block to choose a variable function to create a key table such that the variable function table chosen cannot be determined from the new key created would fall within the scope of this invention. FIG. 6 represents a block diagram of the enclave function used in the present invention. The enclave function is used both in generating the key table in FIG. 3 and is also used in the encryption process shown hereinafter in FIG. 8. The block undergoing transformation is referred to as element 60 in FIG. 6. The block is divided into two portions, namely, a first or left half- block 61 including the first five bytes and a second or right half-block 62 including the last five bytes. Other arrangements for dividing the block into half-blocks can be used, including using the even bytes for the first half-block and the odd bytes for the second half-block, and other arrangements. The block undergoing transformation must include an even number of bytes for the enclave function. An autoclave function is a known technique in cryptographic systems for changing a block by a function performed on itself. The enclave process of the present invention uses an autoclave type of function in conjunction with other manipulations on the data block to provide complete inter-symbol dependency throughout the entire ten byte block. Complete inter-symbol dependency is achieved when every byte of the block is a function of every other byte of the block and itself. In the arrangement shown in FIG. 6, the right half-block 62 is transformed by an autoclave function referred to as E.sub.na to a new data block referred to as element 63. The particular autoclave function used at E.sub.na will be described hereinafter in more detail in connection with FIG. 7. The right half-block at element 63 then undergoes a second autoclave transformation, referred to as E.sub.nb, to generate the half-block at element 64. This half-block is then combined by a bit by bit Exclusive OR function with the unchanged left half-block 61 at element 65 to generate a new left half-block at element 66. The left half-block at element 66 then undergoes an autoclave function E.sub.nc to generate a transformed left half-block at element 67. Thereafter, the left half-block in element 67 undergoes a subsequent autoclave transformation E.sub.nd to generate a modified left half-block at element 68. Then the left half-block in element 68 is combined by an Exclusive OR function with the previously transformed right half-block at element 64. This Exclusive OR function generates a new right half-block at element 70. Then the left half-block at element 68 is joined to the right half-block at 70 to create an entire block at element 71 which has undergone the enclave function of the present invention. After the right half-block 62 has undergone the two autoclave functions in accordance with E.sub.na and E.sub.nb, the right half-block has achieved complete inter-symbol dependency within itself. When the left half-block 61 and the current right half-block 64 are combined by an Exclusive OR function at element 65, the left half-block is completely inter-symbol dependent with the right half-block. When the left half-block at element 66 is then transformed by the two autoclave functions E.sub.nc and E.sub.nd, the left half-block at element 68 will be completely inter-symbol dependent with itself and with the right half-block. Therefore, the left half-block has achieved complete inter-symbol dependency with the entire ten byte block. After the right half-block at element 64 is combined by an Exclusive OR function with the current left half-block at element 69, the right half-block is entirely inter-symbol dependent on the entire ten byte block. When the left half-block at element 68 and the right half-block at element 70 are merged together to form the complete block at element 71, every byte of the block is a function of every other byte of the block and of itself. The particular autoclave function used in the enclave function shown in FIG. 6 is a process where the element or byte in the half-block undergoing transformation is added to two other elements in the half-block. This process is repeated until each element in the half-block has been so modified. To create the complete inter-symbol dependency within each half-block, it is necessary that at least two elements be added to the element being changed. In addition, this autoclave process is carried out twice on the entire half-block to insure that all of the bytes in the half-block are functions of themselves and of every other byte. E.sub.na, E.sub.nb, E.sub.nc, and E.sub.nd are represented by a plurality of enclave tables, each of which includes an entry a, an entry b, an entry c and an entry d. A sample table E.sub.n is set forth below:
______________________________________
E.sub.na E.sub.nb E.sub.nc
E.sub.nd
______________________________________
3 1 5 5 4 3 4 1 3 3 4 5
5 3 4 2 3 1 3 2 5 5 2 1
4 2 1 4 2 5 1 5 2 4 1 3
1 4 2 3 1 2 2 3 4 2 5 4
2 5 3 1 5 4 5 4 1 1 3 2
______________________________________
Each sub-table has five columns and the autoclave function is performed in five steps from top to bottom. The height of the column of each of the sub tables must be equal in length to the half-block undergoing transformation. In the preferred embodiment, the height of the columns are five since the blocks are ten bytes long and the half-blocks are five bytes long. Every column must include a number signifying every byte in the half-block. In the preferred embodiment, the numbers 1-5 designate the bytes since there will be five bytes in each half-block. Every byte must be accounted for in every column. The row length must be greater than one-half the half-block length and every row must contain a distinct numerical value between one and five. In other words, none of the numbers one through five should be repeated in any row of a sub- table. The total number of tables E.sub.n should be a factor of the encryption space. In summary, the vertical rows of each sub table of E.sub.n must have a different number from one through five and each horizontal row must all have different numbers from one through five. In addition, each of the second and third elements of the sub-table in a particular row must be different from the first entry. The first entry (i.e., in the first row) gives the identity of the byte of the block undergoing transformation and the second and third entries (in the second and third rows) represent the bytes which are arithmetically joined to the byte undergoing transformation to come up with the new value. This autoclave function can be represented better in connection with FIG. 7 which shows the transformation of the right half-block in accordance with the specific sample table E.sub.na set forth above. The first entry in E.sub.na is "3 1 5" which means that the third byte of the half-block (i.e., byte 8 or B8) is added to the value of the first byte (B6) and the fifth byte (B10) to generate the new value of the third byte (B8). Modular arithmetic for each addition is used in accordance with the size of alphabet space. Here, modular 128 would be used in the arithmetic step since the alphabet space is 2.sup.7 or 128 as determined by the seven data bits in each byte in the preferred embodiment. The next entry in E.sub.na is "5 3 4" which means that the fifth byte (B10) is added to the third byte (B8 which had previously been transformed) and also to the fourth byte (B9). The third entry is "4 2 1", which means that the fourth byte (B9) is added to the second byte (B7) and the first byte (B6). The fourth entry, "1 4 2", instructs that the first byte (B6) is added to the fourth byte (B9) and the second byte (B7). The fifth entry in table E.sub.na is "2 5 3" which means that the second byte (B7) is added to the fifth byte (B10) and the third byte (B8) to generate the new second byte (B7). As discussed above, the autoclave function is repeated with another table, E.sub.nb, to create complete inter-symbol dependency within the particular half-block undergoing transformation. E.sub.na, E.sub.nb, E.sub.nc and E.sub.nd could all be identical to each other, but it is better if each of the sub-tables within a particular enclave table E.sub.n are different from each other. The particular enclave table E.sub.n selected is determined in accordance with a number generated previously through an arithmetic function on the data undergoing transformation. In connection with the creation of the key table, the enclave table selected is determined by the number Z which is generated at element 58 in FIG. 3. The notation "n" in connection with the enclave process in FIG. 6 is to be distinguished from the notation "n" used in connection with generating the entries of the key table in FIG. 3. The last step shown in the initializing routine set forth in FIG. 2 is the creation of the Mask table at step 40. The Mask values are determinants which are used in the encryption and decryption process to aid in selecting particular entries within tables to perform a transformation on the data. The function of the Masks, which will be apparent later, is to add another distinguishing factor so that a cryptanalyst cannot work backward through the cryptographic algorithm and calculate the original key used in the system. Generally, the Mask values are the arithmetic result of two or more values from the key table or the original key. The preferred embodiment contains four Mask values with a notation of Mask.sub.n where n can be from one to four. The maximum range for n is equivalent to the number of variable functions included in the cryptographic system. In the preferred embodiment, the system includes permutation, key addition, enclave, and substitution variable functions and, accordingly, the maximum n for the Masks will be four. Each Mask table entry is a block of ten bytes. Therefore, each of these bytes can be addressed as Mask.sub.n,b with b ranging from one to ten. In the preferred embodiment, the Masks are created as follows: The first byte in Mask.sub.1, referred to as Mask.sub.1,1, is generated by summing the values of the first byte in the first 32 keys of the key table. These values are summed up using modular arithmetic, herein modular 128, as determined by the alphabet space. The subsequent bytes of the first Mask are each in turn generated by summing up the corresponding byte in each of the first 32 keys in the key table. The second Mask, referred to as Mask.sub.2, is generated by a similar summation of the bytes in the next 32 keys in the table, i.e., Key.sub.32 . . . Key.sub.63. Similarly, the third Mask is created by operations on the next 32 keys in the key table, namely, Key.sub.64 through Key.sub.95. Lastly, the fourth Mask is created by using Key.sub.96 through Key.sub.127. The Mask creation can be represented mathematically by the following equations (with 1 less than or equal to b which is less than or equal to 10): MASK.sub.1,b =Key.sub.0,b +Key.sub.1,b +. . . +Key.sub.31,b MASK.sub.2,b =Key.sub.32,b +Key.sub.33,b +. . . +Key.sub.63,b MASK.sub.3,b =Key.sub.64,b +Key.sub.65,b +. . . +Key.sub.95,b MASK.sub.4,b =Key.sub.96,b +Key.sub.97,b +. . . +Key.sub.127,b Other options are available for creating the key table and Masks. The Masks could be generated by just generating four more keys in the key table creation and using these four additional keys as the four Masks. Also, the keys in the key table could be created by the same method used in generating the Masks. Also, the key table could be generated by making the third key a function of the first two keys with or without the use of variable functions after the first two entries in the key table had been generated. Thus, succeeding keys can be created by any of the previously generated keys. A flow chart showing the encryption process in accordance with the preferred embodiment of the present invention is shown in FIG. 8. Since the preferred embodiment includes a number of rounds of encryption on each block of data, the letter "R" will be used to designate the round number hereinafter. Initially, the round number is set to zero at step 100. Then the round number R is incremented by one at step 102. The data undergoing encryption is represented by a ten byte block at step 104. During the first round of encryption, the data in element 104 will be the plaintext undergoing encryption. In subsequent rounds, this data will be an intermediate product different from the initial plaintext data but not yet the final ciphertext output. The data is initially subjected to a variable permutation operation at step 106. As explained hereinafter in more detail in connection with FIG. 9, an entry is selected from the permutation table memory 108 and a value is selected from the Mask table memory 110 to conduct the variable permutation. Control then passes to step 112 where a choice component, referred to as "C", is equated with the round number R. Control then passes to step 114 where a first variable key addition operation is carried out on the data. As explained hereinafter in more detail in connection with FIG. 10, a key is selected from the key table memory 116 and a value is selected from the Mask table memory 110 to carry out the variable key addition. Control then passes to step 118 where the choice component C is set to a value one greater than the round number. Following the operation at step 118, control passes to query 120 where it is determined whether the choice component C is equal to 11. If it is not, then control passes directly to step 122 where a second variable key addition operation is carried out on the data, using a key from the key table memory 116 and using a value from the Mask table memory 110. If following the addition at step 118, the choice component C is equal to 11, then control is passed to step 124 where the choice component is set to a value of one. Then control is passed to the second variable key addition operation at step 122. Following the second variable key addition function at step 122, control is passed to step 126 where a variable enclave is performed on the data. This variable enclave function was described above in connection with FIGS. 6 and 7, where it was shown that an entry is selected from the enclave table memory 128. The particular enclave table selected is determined by Mask.sub.3,R which is obtained from the Mask table memory 110. This can be represented by the equation n=Mask.sub.3,R where n is the enclave table memory selected for the operations in FIGS. 6 and 7. As will be explained hereinafter in more detail, Mask.sub.1 was used in connection with the variable permutation operation at step 106, Mask.sub.2 was used in connection with the variable key additions at steps 114 and 122, and Mask.sub.4 will be used in the subsequent variable substitution operations. Control then passes to step 130 where the choice component C is once again equated to the round number R. Thereafter, the data undergoes transformation in accordance with a first variable substitution at step 132. As will be explained hereinafter in more detail, the variable substitution uses a value from the Mask table memory 110 and selects an appropriate S-Box table from the S-Box and S'-Box memory 134. Control then passes to step 136 where the value of the choice component C is incremented by one. A decision is made at query 138 as to whether the choice component is equal to 11. If it is not, then control is passed directly to a second variable substitution at step 140. If the choice component after step 136 is equal to 11, then control is passed by query 138 to step 142 where the choice component is set to a value of one. Thereafter, control is passed to the second variable substitution at step 140. Like the first variable substitution at step 140, the second variable substitution is described in more detail in FIG. 11 and uses a value from the Mask table memory 110 and uses a table from the S-Box and S'-Box memory 134 to transform the data. Control thereafter passes to query 144 where it is determined whether the round number has reached a value of 10. If the round number has reached ten, then the encryption process is completed and the ciphertext is represented as an output at step 146. If the round number has not yet reached ten, control is passed back to step 102 where the round number is incremented by one. Then all of the above identified steps, including the variable permutation 106, the first variable key addition 114, the second variable key addition 112, the variable enclave 126, the first variable substitution 132 and the second variable substitution 140, are carried out. The variable permutation of FIG. 8 is explained in more detail in the block diagram in FIG. 9. The data undergoing transformation is represented as bytes B1 through B10 at element 150. In order to select which table in the permutation table memory 108 is used to carry out the permutation, the values in the ten bytes of the data are added together at element 152 to generate a value stored in memory register Z at element 154. A value is generated by combining in a bit by bit Exclusive OR function the value in register Z generated at element 154 with Mask.sub.1,R from the Mask table memory 110. This value is stored in memory register W at element 156. For example, during the first round of encryption, Mask.sub.1,1 would be used at element 156 to generate W by the Exclusive OR operation with Z. Since there are ten rounds of encryption in the preferred embodiment, each of the ten values in Mask.sub.1 will be used in turn during the encryption rounds. Control then passes to element 158 where a standard permutation is carried out on the block of data using the directions from permutation table W, represented by P.sub.W. The block of data after it has been permutated is shown in FIG. 9 at element 160 as bytes b1 through b10. It is important to use all ten bytes of the data undergoing encryption to select the permutation table used for the transformation since this renders it possible to decrypt the same data by the same steps. If only some of the bytes in the block were used to determine the permutation table used, then it would be impossible to determine during the decryption process which permutation table was selected. Rather than combining Z with Mask.sub.1,R by an Exclusive OR operation to generate W, it is also possible to sum the values of Z and Mask.sub.1,R modular arithmetic, to determine the permutation table used. This is also true throughout the remainder of the application where two digital values are combined together using an Exclusive OR operation. While an Exclusive OR operation is computationally easier to implement on a digital computer, the same result could be obtained in the present invention by merely arithmetically summing the values rather than carrying out the Exclusive OR operation. The variable key addition function of the present invention, as shown in steps 114 and 122 of FIG. 8, is shown diagramatically in FIG. 10. Each variable key addition, whether the first at step 114 or the second at step 122, are identical except that the value of the choice component C is one higher in the second variable key addition than in the first key addition, except during the tenth round of encryption when the value of the choice component C is set at one. Otherwise, the steps followed in the variable key addition at step 114 and step 122 in FIG. 8 are identical as set forth in FIG. 10. The particular key selected from the key table memory 116 for the variable key addition is determined by byte C (referred to as BC) and Mask.sub.2,R. This is shown by element 172 in FIG. 10 where the value Z is equated to BC and by element 174 where W is equated to Z XOR Mask.sub.2,R. The value W is used to select the key from the key table memory 116 for use during that particular round of the variable key addition. The ten bytes of Key.sub.W are shown as element 176 in FIG. 10. Thereafter, every byte in the block of bytes in element 170 is combined by an Exclusive OR function with the corresponding byte in Key.sub.W through the series of Exclusive ORs at element 178. For example, B1 XOR Key.sub.W1 generates b.sub.1. Likewise, B2 XOR Key.sub.W2 generates b2. The only exception is that byte C (BC) in the block undergoing transformation is not combined with its corresponding byte in Key.sub.W but remains unchanged and becomes directly bC. This is represented by the series of querys at element 180 associated with each byte of the data undergoing transformation at element 170. If C is equal to the byte number, then that byte is not combined with the corresponding key byte. The block of data after it has undergone a round of the variable key addition is shown as element 182 in FIG. 10. The variable substitution for the encryption process shown in FIG. 8 is shown in more detail in FIG. 11. Similar to the variable key addition, the first variable substitution at step 132 is identical to the second variable substitution at step 140 except that the choice component C is changed for the second variable substitution. Otherwise, the steps followed in each are the same. In the substitution process, the S-Box chosen Z is determined by byte C in the data undergoing transformation and Mask.sub.4,R. This is shown in FIG. 11 where Z is equated to BC at element 192 and W is equated to Z XOR Mask.sub.4,R at element 194. The value of W generated in element 194 is used to select the particular S-Box used for the substitution at element 196. After the selection of the S-Box, every byte of the block undergoing transformation at element 190 is substituted with the chosen value according to S-Box.sub.W, except for byte C (BC) which remains unchanged during this round of transformation. It is important both in the variable key addition and in the variable substitution that byte C (BC) remains unchanged. In this way, it is possible to use the same transformation to work backwards in the decryption operation. A series of querys at element 198 connected to each byte of the block undergoing transformation in element 190 show how byte C remains unchanged and is passed directly and unchanged to the corresponding output byte in element 200. For example, when the choice component C is equal to 1, then B1 in element 190 would equal b1 in element 200. Otherwise, the remaining bytes in element 200 will have values different from the initial values in element 190 in accordance with the substitution protocol set forth S-Box.sub.W. The same technique could be used for selecting the permutation table, i.e., use one of the bytes and leave that byte unchanged. The steps followed in decrypting a block of ciphertext is shown in FIG. 12. Since the decryption is essentially a backwards iteration through the encryption steps followed in FIG. 8, the round number is initially set at ten in step 210. The block of data undergoing decryption is selected and is represented in element 212 as a block of ten data bytes. During the first round of decryption, the data at step 212 will be the initial ciphertext. Control is then passed to step 214 where the choice component C is set to a value one greater than the round number. A decision is made at query 216 whether the choice component is equal to 11. If it is not, then control is passed directly to step 218 where a first inverse variable substitution is carried out on the data. The inverse variable substitution is described in more detail in FIG. 13. The first inverse variable substitution 218 uses data from the Mask table memory 110 and from the S'-Box memory 134. If query 216 determines that the choice component C is equal to 11, then the choice component set to one at step 220 and control then passes to the first inverse variable substitution at element 218. Control then passes to step 222 where the choice component is equated to the round number, following which a second inverse variable substitution is carried out at step 224. Subsequent to the second inverse variable substitution at step 224, the data is subjected to an inverse variable enclave function at element 226. This function is described in more detail hereinafter in connection with FIGS. 14 and 15 However, it must be noted here that Mask.sub.3,R is selected from the Mask table memory 110 and that value is used to select the particular enclave table memory used from the enclave table memory 128. Control is then passed to step 228 where the choice component is incremented by one and then a decision is made at query 230 whether the choice component has reached the value of eleven. If the choice component has not yet reached a value of eleven, then control passes to the first inverse variable key addition at step 232. If the choice component has reached the value of eleven, it is reset at step 234 to a value of one and control is passed directly to the first inverse variable key addition at step 232. The first inverse variable key addition uses data from the Mask table memory 110 and the key table memory 116 to transform the data. This operation is shown in more detail in connection with FIG. 16. Control is then passed to step 236 where the choice component is equated with the round number. Then the data is subjected to a second inverse variable key addition at step 238. Other than the difference of the values of the choice component, the first inverse variable key addition at step 232 is identical to the second inverse variable key addition at step 238. Control is then passed to the inverse variable permutation at step 240. The data is then subjected to a particular inverse permutation using an entry from the Mask table memory 110 and an entry from the permutation table memory 108. The inverse variable permutation is described in more detail in connection with FIG. 17. Control is then passed to query 242. If the round number for the decryption has reached a value of one, then no further decryption takes place and the current state of the data is output at step 244 as the plaintext output. If the round number has not yet reached a value of one, then the round number is decreased by 1 at step 246. Control is passed to step 212 for a further round of decryption in accordance with the first inverse variable substitution 218, the second inverse variable substitution 224, the inverse variable enclave 226, the first inverse variable key addition 232, the second inverse variable key addition 238, and the inverse variable permutation 240. The inverse variable substitution is shown in more detail in FIG. 13. The data undergoing decryption is represented by bytes b1 through b10 in element 250. The inverse substitution box (S'-Box) chosen is determined by bC XOR Mask.sub.4,R. This is represented in FIG. 13 where Z is equated to bC at element 252 and W is equated to Z XOR Mask.sub.4,R at element 254. W is then used to select the particular inverse substitution box (S'-Box.sub.W) at element 256. Every byte in the block in element 250 is then substituted in accordance with the protocol of the chosen S'-Box except for byte bC. The result of the inverse variable substitution is a ten byte data block B1 through B10 at element 260. The arrangement by which byte bC is not substituted is shown by a series of querys 258 associated with each byte of the data undergoing decryption in element 250. For example, in the first round of decryption, where R is ten, b10 is both used to select the S'-Box used for the inverse substitution and is also unchanged during the inverse substitution. Since the tenth byte remained unchanged during the final variable substitution carried out on the data during the encryption process shown in FIG. 8, it is possible to recreate and work backwards through the encryption process through the ciphertext data. The same is true for the inverse variable key addition of FIG. 16. The inverse variable enclave function is shown in detail in FIG. 14 and in conjunction with the particular autoclave function used in the inverse variable enclave in FIG. 15. The steps carried out in FIG. 14 are essentially the inverse of the steps taken in the variable enclave for encryption shown in FIG. 6. The block of data undergoing decryption at element 270 is split into a left half-block 272 and a right half-block 274. These two half-blocks are combined by a bit by bit Exclusive OR function at element 276 to produce a subsequent right half-block 278. The left half-block at element 272 is first transformed by an inverse autoclave function E'.sub.nd to left half-block element 280 and then is transformed by an inverse autoclave function E'.sub.nc to left half-block 282. Right half-block element 278 is then combined through an Exclusive OR function at element 284 with left half-block 282 to form the final left half-block element 286. The right half-block at element 278 is first transformed by an inverse autoclave function E'.sub.nb to right half-block element 288 and then is transformed by an inverse autoclave function E'.sub. na to the final right half-block at element 290. The left half-block element 286 and right half-block element 290 are joined together to form the final ten byte block at 292 which is the result of the inverse enclave function. A particular autoclave function used in the inverse enclave of FIG. 14 is shown, for one example, in FIG. 15. In general, the enclave tables, as described above, are used during the inverse autoclave function. However, the entries are read from the bottom of each column to the top and the byte undergoing transformation, identified by the entry in the first row, has its value reduced by the values of the other two bytes, identified by the second and third rows in the enclave table entry. An example of an inverse autoclave function used in the inverse enclave is set forth in FIG. 15 for the same autoclave function used in connection with FIG. 7. The last entry in the enclave table used is used first for the transformation in FIG. 15. Since this entry is "2 5 3", this means that the fifth byte (B10) and the third byte (B8) are subtracted from the second byte (B7) to generate the new value of the second byte. As in the enclave function used for encryption, the arithmetic is carried out by modular arithmetic. The next entry up from the bottom in the enclave table used in FIG. 15 is "1 4 2", which means that the fourth byte (B9) and the second byte (B7) are subtracted from the first byte (B6) to give the new value of the first byte (B6). Similarly, the third entry is "4 2 1", which means that the second byte (B7) and the first byte (B6) are subtracted from the fourth byte (B9) to give the new value of the fourth byte (B9). The next entry in the enclave table used is "5 3 4", which means that the third byte (B8) and the fourth byte (B9) are subtracted from the fifth byte (B10) to give the new value of the fifth byte (B10). Finally, the first entry in the enclave table is "3 1 5", which is used last in the inverse autoclave function. This entry means that the first byte (B6) and the fifth (B10) are subtracted from the third byte (B8) to give a new value for the third byte. The result of all of these modular arithmetic calculations is shown in FIG. 15 as the last block, including bytes B6 through B10. The inverse variable key addition is shown diagramatically in FIG. 16. The particular key selected from the key table memory 116 for the inverse variable key addition is determined by byte C (referred to as bC) and Mask.sub.2,R. This is shown by element 302 in FIG. 16, where the value Z is equated to bC, and by element 304 where W is equated to Z XOR Mask.sub.2,R. The value W is used to select a key from the key table memory 116 for use during that particular round of the inverse variable key addition. The ten bytes of key.sub.W are shown as element 306 in FIG. 16. Thereafter, every byte in the block of bytes in element 300 is combined by an Exclusive OR function with the corresponding byte in Key.sub.W through the series of Exclusive ORs at element 310. For example, b1 XOR Key.sub.W1 generates B1. Likewise, b2 XOR Key.sub.W2 generates B2. The only exception is that byte C in the block undergoing transformation is not combined with its corresponding byte in Key.sub.W, but remains unchanged and directly becomes BC. This is represented by the series of querys at elements 310 associated with each byte of the data undergoing transformation at element 300. If C is equal to the byte number, then that byte is not combined with the corresponding key byte. The block of data after it has undergone a round of the inverse variable key addition is shown as element 312 in FIG. 16. The inverse variable permutation of FIG. 12 is explained in more detail in the block diagram in FIG. 17. The data undergoing transformation is represented as bytes b1 through b10 at element 320. In order to select which table in the permutation table memory 108 is used to carry out the inverse permutation, the values in the ten bytes of the data are added together using modular arithmetic at element 322 to generate a value Z at element 324. At element 326, a value W is generated by combining in a bit by bit Exclusive OR function the value Z generated at element 324 with Mask.sub.1,R from the Mask table memory 110. For example, during the first round of decryption, Mask.sub.1,1 would be used at element 326 to generate W by the Exclusive OR operation with Z. Control then passes to element 328 where a standard inverse permutation, which is merely a working backward through the permutation table entry as shown earlier in connection with FIG. 4, is carried out on the block of data, using the directions from the permutation table W, represented by P'.sub.W. The block of data after it has undergone the inverse permutation operation is shown in FIG. 17 at element 330 as bytes B1 through B10. Since during the encryption process all ten bytes of the data undergoing encryption were used to select a permutation table for the transformation, this rendered it possible to decrypt the same data by once again adding together all ten bytes of the ciphertext data to determine which permutation table should be used. This is possible since the permutation operation merely rearranged the order of the values. The information used in the encryption stage can be extracted by once again summing together the values in the data. EXAMPLE An example of the encryption of a ten byte block of plaintext data using the embodiment of the encryption system of the present invention discussed above will now be shown in detail. The system must be initialized with a permutation table, a substitution table and an enclave table. Tables used in this example, and created in accordance with the guidelines set forth above, are shown below in Tables I, IIA and B, and III, respectively. Then a ten byte initial key is selected for creating the key table and Mask table. For this example, the initial key is selected to be:
______________________________________
key = 27 115 21 1 12 41 2 92 17 81
______________________________________
Sum the first five values of the initial key (mod 128): (27+115+21+1+12) mod 128=176 mod 128=48 Therefore, permutation table 48 will be used. Sum the last five values of the initial key (mod 16): (41+2+92+17+81) mod 16=233 mod 16=9 Therefore, substitution table 9 will be used.
______________________________________
Take key:
27 115 21 1 12 41 2 92 17 81
Substitute
50 56 15 124 102 99 109 74 26 73
(tbl 9):
Permutate
56 74 50 73 109 15 102 26 124 99
(tbl 48):
______________________________________
Sum values 3-7 of the current key block (mod 32): (50+73+109+15+102) mod 32=349 Mod 32=29 Therefore, enclave table 29 will be used for the next step.
______________________________________
Current key
56 74 50 73 109 15 102 26 124 99
block:
Enclave 30 34 55 63 9 73 74 107 109 33
(tbl 29):
Therefore
30 34 55 63 9 73 74 107 109 33
key =
______________________________________
It can be seen that the initial key was used to create the first key, identified as key.sub.0, in the key table. The above steps are reproduced using key.sub.0 to generate key.sub.1, key.sub.1 to generate key.sub.2, etc., until key.sub.126 is used to generate key.sub.127. The completed key table, using the initial key identified above, is shown in Table IV below. Next, the Mask table is generated using the previously generated key table. To generate the first byte or first value in Mask.sub.1, the first mask, the values of the first bytes in key.sub.0 to key.sub.31 are summed (mod 128): 0+10+26+0+102+105+111+91+95+68+6+70 +95+67+55+39+109+23+39+31+120+50+46 +71+34+48+105+51+45+123+4+1=1840 mod 128=48. Therefore, the first value or the first byte in Mask.sub.1 is 48. Value 2 in Mask.sub.1 is the sum of the values of byte 2 in Key.sub.0 to Key.sub.31 (mod 128). Value 3 in Mask.sub.1 is the sum of the values of byte 3 in Key.sub.0 to Key.sub.31 (mod 128). Value 4 in Mask.sub.1 is the sum of the values of byte 4 in Key.sub.0 to Key.sub.31 (mod 128). Value 5 in Mask.sub.1 is the sum of the values of byte 5 in Key.sub.0 to Key.sub.31 (mod 128). Value 6 in Mask.sub.1 is the sum of the values of byte 6 in Key.sub.0 to Key.sub.31 (mod 128). Value 7 in Mask.sub.1 is the sum of the values of byte 7 in Key.sub.0 to Key.sub.31 (mod 128). Value 8 in Mask.sub.1 is the sum of the Values of byte 8 in Key.sub.0 to Key.sub.31 (mod 128). Value 9 in Mask.sub.1 is the sum of the values of byte 9 in Key.sub.0 to Key.sub.31 (mod 128). Value 10 in Mask.sub.1 is the sum of the values of byte 10 in Key.sub.0 to Key.sub.31 (mod 128). Similarly, the ten bytes or values of Mask.sub.2 are created from Key.sub.32 to Key.sub.63, the values of Mask.sub.3 are created from Key.sub.64 to Key.sub.95 and the values of Mask.sub.4 are created from Key.sub.96 to Key.sub.127. The completed mask table, generated from the key table in Table IV, is set forth below:
__________________________________________________________________________
Mask.sub.1 =
48 2 121 18 60 105 33 50 11 60
Mask.sub.2 =
26 78 24 72 69 13 77 43 9 99
Mask.sub.3 =
64 113
72 61 37 13 49 71 24 60
Mask.sub.4 =
104 62 69 87 18 31 102
101 32 125
__________________________________________________________________________
Now that the key and mask tables have been generated from the initial key (which is not included in either table), data can be encrypted using additionally the permutation, enclave and substitution tables in Tables I, IIA and IIB, and III below. A particular block of plaintext data will be encrypted under the system of the present invention and for ten rounds of encryption. ROUND 1
__________________________________________________________________________
BLOCK =
104 101
108
108 111
32 116 104
101
114
__________________________________________________________________________
(a) Variable Permutation. Add all values in block (mod 128): 104+101+108+108+111+32+116+104+101+114 =999 mod 128=103 Mask.sub.1 value for round 1 (Mask.sub.1,1)=48 Permutation Table=Sum of the block XOR Mask.sub.1,1 : 103 XOR 48=87 Therefore, permutation table 87 shall be used for the permutation.
__________________________________________________________________________
Block before permutation:
104
101
108
108
111
32
116
104
101
114
Block after permutation:
108
104
101
101
104
114
32
108
111
116
__________________________________________________________________________
(b) First Key Addition Mask.sub.2 value for round 1 (Mask.sub.2,1)=26 First key=Value 1 in the block XOR Mask.sub.2,1 : 108 XOR 26=118 Therefore, Key.sub.118 shall be used for the first key addition.
__________________________________________________________________________
Block before key addition:
108
104
101
101
104
114
32 108
111
116
Block after key addition:
108
113
85
74
105
102
85 91
124
55
__________________________________________________________________________
(c) Second Key Addition. Second key=Value 2 in the block XOR Mask.sub.2,1 : 113 XOR 26=107 Therefore, Key.sub.107 shall be used for the second key addition.
__________________________________________________________________________
Block before key addition:
108
113
85
74
105
102
85
91
124
55
Block after key addition:
72
113
120
64
94
93
56
118
30
47
__________________________________________________________________________
(d) Variable Enclave. Enclave table=value of Mask.sub.3,1 (mod 32)=64 2 mod 32=0 Therefore, enclave table 04 shall be used for the enclave.
__________________________________________________________________________
Block before enclave:
72
113
120
64
94 93 56
118
30
47
Block after enclave:
2
108
96
114
88 16 101
106
118
56
__________________________________________________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 1 (Mask.sub.4,1)=104 First substitution table=Value 1 in block XOR Mask.sub.4,1 : 2 XOR 104=10 Therefore, substitution table 10 shall be used for the first substitution.
__________________________________________________________________________
Block before substitution:
2 108
96
114
88
16
101
106
118
56
Block after substitution:
2 60
34
59
75
98
127
61
29
73
__________________________________________________________________________
(f) Second Variable Substitution. Second substitution table=Value 2 in block XOR Mask.sub.4,1 : 60 XOR 104=4 Therefore, substitution table 4 shall be used for the second substitution.
__________________________________________________________________________
Block before substitution:
2 60 34 59
75
98
127
61 29 73
Block after substitution:
103
60 82 74
18
38
11
49 50 110
__________________________________________________________________________
ROUND 2
______________________________________
BLOCK = 103 60 82 74 18 38 11 49 50 110
______________________________________
(a) Variable Permutation. Add all values in block (mod 128): 103+60+82+74+18+38+11+49+50+110=595 mod 128=83 Mask.sub.1 value for round 2 (Mask .sub.1,2)=2 Permutation table=Sum of the block XOR Mask.sub.1,2 : 83 XOR 2=81 Therefore, permutation table 81 shall be used for the permutation.
__________________________________________________________________________
Block before permutation:
103
60
82 74
18 38 11 49
50 110
Block after permutation:
103
60
50 38
18 11 49 74
82 110
__________________________________________________________________________
(b) First Key Addition. Mask.sub.2 value for round 2 (Mask.sub.2,2)=78 First key=Value 2 in the block XOR Mask.sub.2,2 : 60 XOR 78=114 Therefore, Key.sub.114 shall be used for the first key addition.
__________________________________________________________________________
Block before key addition:
103
60 50
38 18
11 49
74
82 110
Block after key addition:
52
60 9
5 68
30 46
117
52 11
__________________________________________________________________________
(c) Second Key Addition. Second key=Value 3 in the block XOR Mask.sub.2,2 : 9 XOR 78=71 Therefore, Key.sub.71 shall be used for the second key addition.
__________________________________________________________________________
Block before key addition:
52
60
9 5 68
30 46
117
52
11
Block after key addition:
35
108
9 12 107
21 112
115
84
112
__________________________________________________________________________
(d) Variable Enclave. Enclave table=value of Mask.sub.3,2 (mod 32)=113 mod 32=17 Therefore, enclave table 17 shall be used for the enclave.
__________________________________________________________________________
Block before enclave:
35
108
9 12 107
21 112
115
84 112
Block after enclave:
43
37
14 65 92
20 110
59
17 111
__________________________________________________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 2 (Mask.sub.4,2)=62 First substitution table=Value 2 in block XOR Mask.sub.4,2 : 37 XOR 62=11 Therefore, substitution table 11 shall be used for the first substitution.
______________________________________
Block before substitution:
43 37 14 65 92 20 110 59 17 111
Block after substitution:
46 37 68 9 126 35 73 8 83 6
______________________________________
(f) Second Variable Substitution. Second substitution table=Value 3 in block XOR Mask.sub.4,2 : 68 XOR 62=10 Therefore, substitution table 10 shall be used for the second substitution.
______________________________________
Block before substitution:
46 37 68 9 126 35 73 8 83 6
Block after substitution:
99 122 68 9 114 0 53 51 92 49
______________________________________
ROUND 3
______________________________________
BLOCK = 99 122 68 9 114 0 53 51 92 49
______________________________________
(a) Variable Permutation. Add all values in block (mod 128): 99+122+68+9+114+0+53+51+92+49=657 mod 128=17 Mask.sub.1 Value for round 3 (Mask.sub.1,3)=121 permutation table=Sum of the block XOR Mask.sub.1,3 : 17 XOR 121=104 Therefore, permutation table 104 shall be used for the permutation.
______________________________________
Block before permutation:
99 122 68 9 114 0 53 51 92 49
Block after permutation:
68 53 51 114 122 0 9 99 49 92
______________________________________
(b) First Key Addition. Mask.sub.2 value for round 3 (Mask.sub.2,3)=24 First key=Value 3 in the block XOR Mask.sub.2,3 : 51 XOR 24=43 Therefore, Key.sub.43 shall be used for the first key addition.
______________________________________
Block before key addition:
68 53 51 114 122 0 9 99 49 92
Block after key addition:
84 59 51 126 4 30 98 119 73 113
______________________________________
(c) Second Key Addition. Second key=Value 4 in the block XOR Mask.sub.2,3 : 126 XOR 24=102 Therefore, Key.sub.102 shall be used for the second key addition.
______________________________________
Block before key addition:
84 59 51 126 4 30 98 119 73 113
Block after key addition:
19 31 85 126 117 39 113 77 17 82
______________________________________
(d) Variable Enclave. Enclave table=value of Mask.sub.3,3 (mod 32)=72 mod 32=8 Therefore, enclave table 8 shall be used for the enclave.
______________________________________
Block before enclave:
19 31 85 126 117 39 113 77 17 82
Block after enclave:
127 113 18 67 108 90 103 103 96 85
______________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 3 (Mask.sub.4,3)=69 First substitution table=Value 3 in block XOR Mask.sub.4,3 : 18 XOR 69=7 Therefore, substitution table 7 shall be used for the first substitution.
______________________________________
Block before substitution:
127 113 18 67 108 90 103 103 96 85
Block after substitution:
76 38 18 30 46 28 71 71 60 112
______________________________________
(f) Second Variable Substitution. Second substitution table=Value 4 in block XOR Mask.sub.4,3 : 30 XOR 69=11 Therefore, substitution table 11 shall be used for the second substitution.
______________________________________
Block before substitution:
76 38 18 30 46 28 71 71 60 112
Block after substitution:
3 100 107 30 13 54 58 58 36 14
______________________________________
ROUND 4
______________________________________
BLOCK = 3 100 107 30 13 54 58 58 36 14
______________________________________
(a) Variable permutation. Add all values in block (mod 128): 3+100+107+30+13+54+58+58+36+14=473 mod 128=89 Mask.sub.1 value for round 4 (Mask.sub.1,4)=18 Permutation Table=Sum of the block XOR Mask.sub.1,4 : 89 XOR 18=75 Therefore, permutation table 75 shall be used for the permutation.
______________________________________
Block before permutation:
3 100 107 30 13 54 58 58 36 14
Block after permutation:
30 58 14 100 54 13 36 3 58 107
______________________________________
(b) First Key Addition. Mask.sub.2 value for round 4 (Mask.sub.2,4)=72 First key=Value 4 in the block XOR Mask.sub.2,4 : 100 XOR 72=44 Therefore, Key.sub.44 shall be used for the first key addition.
______________________________________
Block before key addition:
30 58 14 100 54 13 36 3 58 107
Block after key addition:
99 35 0 100 36 104 12 71 25 43
______________________________________
(c) Second Key Addition. Second key=Value 5 in the block XOR Mask.sub.2,4 : 36 XOR 72=108 Therefore, Key.sub.108 shall be used for the second key addition.
______________________________________
Block before key addition:
99 35 0 100 36 104 12 71 25 43
Block after key addition:
77 95 115 53 36 35 19 119 56 69
______________________________________
(d) Variable Enclave. Enclave Table=value of Mask.sub.3,4 (mod 32)=61 mod 32=29 Therefore, enclave table 29 shall be used for the enclave.
______________________________________
Block before enclave:
77 95 115 53 36 35 19 119 56 69
Block after enclave:
117 76 52 98 12 13 113 26 108 92
______________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 4 (Mask.sub.4,4)=87 First substitution table=Value 4 in block XOR Mask.sub.4,4 : 98 XOR 87=5 Therefore, substitution table 5 shall be used for the first substitution.
______________________________________
Block before substitution:
117 76 52 98 12 13 113 26 108 92
Block after substitution:
64 80 83 98 58 48 50 31 49 43
______________________________________
(f) Second Variable Substitution. Second substitution table=Value 5 in block XOR Mask.sub.4,4 : 58 XOR 87=13 Therefore, substitution table 13 shall be used for the second substitution.
______________________________________
Block before substitution:
64 80 83 98 58 48 50 31 49 43
Block after substitution:
122 28 81 29 58 127 22 16 26 49
______________________________________
ROUND 5
______________________________________
BLOCK = 122 28 81 29 58 127 22 16 26 49
______________________________________
(a) Variable Permutation. Add all values in block (mod 128): 122+28+81+29+58+127+22+16+26+49=558 mod 128=46 Mask.sub.1 value for round 5 (Mask.sub.1,5)=60 Permutation Table=Sum of the block XOR Mask.sub.1,5 : 46 XOR 60=18 Therefore, permutation table 18 shall be used for the permutation.
______________________________________
Block before permutation:
122 28 81 29 58 127 22 16 26 49
Block after permutation:
49 122 127 81 28 16 26 22 29 58
______________________________________
(b) First Key Addition. Mask.sub.2 value for round 5 (Mask.sub.2,5)=69 First key=Value 5 in the block XOR Mask.sub.2,5 : 28 XOR 69=89 Therefore, Key.sub.89 shall be used for the first key addition.
______________________________________
Block before key addition:
49 122 127 81 28 16 26 22 29 58
Block after key addition:
40 118 40 87 28 74 102 101 88 57
______________________________________
(c) Second Key Addition. Second key=Value 6 in the block XOR Mask.sub.2,5 : 74 XOR 69=15 Therefore, Key.sub.15 shall be used for the second key addition.
______________________________________
Block before key addition:
40 118 40 87 28 74 102 101 88 57
Block after key addition:
15 50 22 72 90 74 7 76 15 92
______________________________________
(d) Variable Enclave. Enclave Table=value of Mask 3,5 (mod 32)=37 mod 32=5 Therefore, enclave table 5 shall be used for the enclave.
______________________________________
Block before enclave:
15 50 22 72 90 74 7 76 15 92
Block after enclave:
98 69 120 65 54 18 6 17 59 14
______________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 5 (Mask.sub.4,5)=18 First substitution table=Value 5 in block XOR Mask.sub.4,5 : 54 XOR 18=4 Therefore, substitution table 4 shall be used for the first substitution.
______________________________________
Block before substitution:
98 69 120 65 54 18 6 17 59 14
Block after substitution:
38 0 92 68 54 89 122 4 74 106
______________________________________
(f) Second Variable Substitution. Second substitution table=Value 6 in block XOR Mask.sub.4,5 : 89 XOR 18=11 Therefore, substitution table 11 shall be used for the second substitution.
______________________________________
Block before substitution:
38 0 92 68 54 89 122 4 74 106
Block after substitution:
100 24 126 122 108 89 39 45 93 28
______________________________________
ROUND 6
______________________________________
BLOCK = 100 24 126 122 108 89 39 45 93 28
______________________________________
(a) Variable Permutation. Add all values in block (mod 128): 100+24+126+122+108+89+39+45+93+28=774 mod 128=6 Mask.sub.1 value for round 6 (Mask.sub.1,6)=105 permutation Table=Sum of the block XOR Mask.sub.1,6 : 6 XOR 105=111 Therefore, permutation table 111 shall be used for the permutation.
______________________________________
Block before permutation:
100 24 126 122 108 89 39 45 93 28
Block after permutation:
126 45 122 89 93 108 24 28 39 100
______________________________________
(b) First Key Addition. Mask.sub.2 value for round 6 (Mask.sub.2,6)=13 First key=Value 6 in the block XOR Mask.sub.2,6 : 108 XOR 13=97 Therefore, Key.sub.97 shall be used for the first key addition.
______________________________________
Block before key addition:
126 45 122 89 93 108 24 28 39 100
Block after key addition:
39 78 56 40 24 108 99 80 4 77
______________________________________
(c) Second key Addition. Second key=Value.sub.7 in the block XOR Mask.sub.2,6 : 99 XOR 13=110 Therefore, Key.sub.110 shall be used for the second key addition.
______________________________________
Block before key addition:
39 78 56 40 24 108 99 80 4 77
Block after key addition:
94 63 13 94 121 33 99 70 118 11
______________________________________
(d) Variable Enclave. Enclave Table=value of Mask.sub.3,6 (mod 32)=13=mod 32 =13 Therefore, enclave table 13 shall be used for the enclave.
______________________________________
Block before enclave:
94 63 13 94 121 33 99 70 118 11
Block after enclave:
89 102 105 113 44 117 86 106 57 50
______________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 6 (Mask.sub.4,6)=31 First Substitution Table=Value 6 in block XOR Mask.sub.4,6 : 117 XOR 31=10 Therefore, substitution table 10 shall be used for the first substitution.
______________________________________
Block before substitution:
89 102 105 113 44 117 86 106 57 50
Block after substitution:
78 65 30 125 17 117 57 61 89 38
______________________________________
(f) Second Variable Substitution. Second substitution table=Value 7 in block XOR Mask.sub.4,6 : 57 XOR 31=6 Therefore, substitution table 6 shall be used for the second substitution.
______________________________________
Block before substitution:
78 65 30 125 17 117 57 61 89 38
Block after substitution:
6 92 76 30 120 66 57 51 58 80
______________________________________
ROUND 7
______________________________________
BLOCK = 6 92 76 30 120 66 57 51 58 80
______________________________________
(a) Variable Permutation. Add all values in block (mod 128): 6+92+76+30+120+66+57+51+58+80=636 mod 128=124 Mask.sub.1 value for round 7 (Mask.sub.1,7)=33 Permutation Table=Sum of the block XOR Mask.sub.1,7 : 124 XOR 33=93 Therefore permutation table 93 shall be used for the permutation.
______________________________________
Block before permutation:
6 92 76 30 120 66 57 51 58 80
Block after permutation:
66 57 120 92 30 80 58 51 6 76
______________________________________
(b) First Key Addition. Mask.sub.2 value for round 7 (Mask.sub.2,7)=77 First key=Value 7 in the block XOR Mask.sub.2,7 : 58 XOR 77=119 Therefore, Key.sub.119 shall be used for the first key addition.
______________________________________
Block before key addition:
66 57 120 92 30 80 58 51 6 76
Block after key addition:
55 9 30 92 21 117 58 32 16 97
______________________________________
(c) Second Key Addition. Second key=Value 8 in the block XOR Mask.sub.2,7 : 32 XOR 77=109 Therefore, Key.sub.109 shall be used for the second key addition.
______________________________________
Block before key addition:
55 9 30 92 21 117 58 32 16 97
Block after key addition:
37 117 11 121 62 60 69 32 110 42
______________________________________
(d) Variable Enclave. Enclave Table=value of Mask.sub.3,7 (mod 32)=49 mod 32 =17 Therefore, enclave table 17 shall be used for the enclave.
______________________________________
Block before enclave:
37 117 11 121 62 60 69 32 110 42
Block after enclave:
80 95 116 23 78 60 94 113 112 2
______________________________________
(e) First Variable Substitution. Mask.sub.4 value for round 7 (Mask.sub.4,7)=102 First substitution table=Value 7 in block XOR Mask.sub.4,7 : 94 XOR 102=8 Therefore, substitution table 8 shall be used for the first substitution.
______________________________________
Block before substitution:
80 95 116 23 78 60 94 113 112 2
Block after substitution:
1 9 24 39 52 98 94 99 108 35
______________________________________
(f) Second Variable Substitution. Second substitution table=Value 8 in block XOR Mask.sub.4,7 : 99 XOR 102=5 Therefore, substitution table 5 shall be used for the second substitution.
______________________________________
Block before substitution:
1 9 24 39 52 98 94 99 108 35
Block after substitution:
85 98 36 57 83 51 90 99 49 9
______________________________________
ROUND 8
______________________________________
BLOCK = 85 98 36 57 83 51 90 99 49 9
______________________________________
(a) Variable Permutation. Add all values in block (mod 128): 5+98+36+57+83+51+90+99+49+9=657 mod 28=17 Mask.sub.1 value for round 8 (Mask.sub.1,8)=50 | ||||||
