Patent Publication Number: US-6035042-A

Title: High speed and method of providing high speed table generation for block encryption

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates in general to data processing, and more particularly, to an apparatus and method of providing high speed table generation for block encryption. 
     2. Description of the Related Art 
     Encryption techniques are generally implemented in the transmission of digital information to conceal information from unintended recipients and for authenticating messages to assure the recipient of sender identity. Encryption is also used for digital signatures, to authenticate and assure the recipient that any third party could not have created the signature. As in physical security systems, encryption provides assurance of integrity including prevention of interference in the information-conveying process or failing that, detecting interference. Interference in this context includes eavesdropping, modifying, introducing misinformation, disavowing messages and falsely claiming receipt of messages. 
     Almost all cryptosystems involve transformation of information based on one or more keys, at least one of which must be kept secret to protect against adversaries. Block substitution is an encryption process used to encrypt a clear text message which is in the form of a sequence of binary numbers. Typically, a block substitution system consists of alternating steps of encrypting conveniently-sized sub-blocks in individual substitution boxes (S-boxes) and permuting the partly encrypted data. Substitute blocks constitute the encrypted message or cipher text, each substitute block representing a non-ambiguous one-to-one transformation of a clear text block. After dividing the block of clear text into sub-blocks and encrypting the sub-blocks, the encrypted sub-blocks are typically reassembled into a block and the bits in the full block are permuted. The resulting block is again subdivided into sub-blocks for another round of encryption. As shown in FIG. 1, this process of substitution-permutation-substitution is repeated a number of times. 
     In many systems like DES and its variations, these individual S-boxes are fixed. In such systems, the tables might as well be publicly known, as they will be eventually revealed with the passage of time. In DES-like systems, the key interacts with the data. The S-boxes have the vital role of acting as a barrier to prevent the cryptanalyst from using matching clear text/cipher text pairs to find bits of the key. The S-box tables in such systems have to be designed with great care and thoroughly tested before selection as permanent parts of the algorithm. 
     An alternate approach involves the use of one-time tables in the S-boxes. These tables are selected by the key, kept secret or at least not made public, and changed as frequently as the key is changed. This approach presents several challenges. First of all, it must be possible to find a selection of S-box tables that are known to be of good quality without testing. Secondly, the supply of such tables must be very large so that duplication is unlikely. Related to the first requirement is the fact that the cryptographic community demands that cryptographic strength be assessed not only by empirical testing but also by underlying mathematical theory. The so-called spaghetti algorithms that are very complex but without any recognizable mathematical structure are viewed with skepticism. Despite having passed standard tests with flying colors there is the lingering doubt that there may be exploitable weaknesses lurking in the murky complexity. 
     U.S. Pat. Nos. 5,038,376, 5,214,704, 5,317,639 and 5,647,001 disclose cryptographic block substitution systems in which dynamic substitution devices (DSD) are used as substitution boxes (S-boxes). In these substitution systems, orthomorphic mapping is applied. In particular, U.S. Pat. Nos. 5,038,376, 5,214,704, 5,317,639 and 5,647,001 disclose methods for generating orthomorphic mapping tables of good quality, in terms of cryptographic strength, and in ample quantities. However, the method covered by the first three patents were restrictive in the sense that not all possible orthomorphisms could be generated. Some of the methods permit more rapid generation than others which is important for some but not all applications. U.S. Pat. No. 5,647,001 includes the so-called bar sinister method. It can be shown mathematically that this method can generate all possible orthomorphisms. Further, using this method, we obtain the best quality in terms of measures of cryptographic strength. However, there is one drawback to the bar sinister method, namely, that it is relatively slow in generating tables. It may take several seconds to generate a table for 8-bit numbers, which is too long for some applications. 
     Accordingly, there is a need in the technology for an apparatus and method for providing high speed table generation for block encryption. There is also a need in the technology for an apparatus and method for generating mappings in general, and for generating orthomorphisms for block encryption, which have high cryptographic strength and which can be generated quickly and efficiently. 
     BRIEF SUMMARY OF THE INVENTION 
     The present invention is an apparatus and method of encryption. A first table comprising a set of distinct 2 n  n-bit input numbers and a first set of distinct 2 n  n-bit output numbers is received. The first set of 2 n  n-bit output numbers is a one-to-one mapping of the set of 2 n  n-bit input numbers. A second table comprising of the set of distinct 2 n  n-bit input numbers and a second set of distinct 2 n  n-bit output numbers is also received. The second set of 2 n  n-bit output numbers is a one-to-one mapping of the set of 2 n  n-bit input numbers, and the second mapping of 2 n  n-bit output numbers is disjoint from the first mapping of 2 n  n-bit output numbers. The first and the second tables are combined to provide a third table having 2 n  pairs of n-bit input numbers and 2 n  pairs of n-bit output numbers. A fourth table of 2 n  pairs of (n+1)-bit numbers is generated by converting each of the 2 n  pairs of n-bit input numbers and each of the 2 n  pairs of n-bit output numbers in the third table, to (n+1)-bit numbers by inserting a bit position containing a zero in each of the 2 n  pairs of n-bit input numbers and in each of the 2 n  pairs of n-bit output numbers. A supplemental (n+1)-bit number containing a one in the same bit position and a zero in the remaining n-bit positions is then generated. The supplemental (n+1)-bit number is added to one of each pair of the 2 n  pairs of (n+1)-bit input numbers and to one of each pair of the 2 n  pairs of (n+1)-bit output numbers to obtain a fifth table. The fifth table comprises of a set of distinct 2 n+1  (n+1)-bit input numbers and a set of distinct 2 n+1  (n+1)-bit output numbers, the set of 2 n+1  -bit output numbers being a one-to-one mapping of the 2 n+1  (n+1)-bit input numbers. Clear text (n+1)-bit data is then encrypted by providing the (n+1)-bit clear text data as inputs to the fifth table to obtain cipher text (n+1)-bit numbers as outputs. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram illustrating the substitution/permutation method of encrypting data. 
     FIG. 2 illustrates one embodiment of the shuffling process of the present invention. 
     FIG. 3 illustrates one embodiment of the conversion process of the present invention. 
     FIG. 4 illustrates one embodiment of a system block diagram of an exemplary processor system in which a method of the present invention may be performed. 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention discloses an apparatus and methods for providing high speed table generation for block encryption. The methods of the present invention include generating nonlinear mappings in general, and linear and nonlinear orthomorphisms for block encryption, which have high cryptographic strength and which can be generated quickly and efficiently. 
     I. BACKGROUND 
     The present invention involves high speed table generation in which nonlinear mappings for block encryption, which have high cryptographic strength can be provided at great speed and efficiency. In general, two disjoint mappings of some common block size are selected and combined very rapidly into a single mapping of a large block size. The two disjoint mappings may be generated off-line and stored in memory prior to use. The fast combination of the two mappings may be provided in a great variety of ways, and may be controlled by a cryptographic key, thus ensuring increased cryptographic strength. 
     In one embodiment, the two disjoint mappings are orthomorphic mappings. Orthomorphisms provide a source of encryption tables which provide high cryptographic strength and uniqueness. Restricting the definition to mappings of n-bit binary numbers, Z 2   n , if ψ(x) is a 1 to 1 (bijective) mapping on Z 2   n , and f(x)=ψ(x)⊕x is also a bijective mapping, then f(x) is an orthomorphism. This is also known in the literature as a complete mapping. The symbol &#34;⊕&#34; means bit-wise addition modulo 2. These mappings are of interest because: 
     1. There is a sound mathematical basis underlying orthomorphisms. 
     2. They exist in large numbers and can be generated deterministically by proprietary methods. 
     3. Despite their abundance, they are relatively quite rare when considered as part of the totality of bijective mappings on Z 2   n  namely, 2 n  !. This translates into 256! for mappings of 8-bit numbers. Thus, orthomorphisms are most unlikely to be found by a random search. 
     4. Maximal linear orthomorphisms form transitive permutation groups which is equivalent to having a set of non-overlapping substitution tables. It is possible to shift quickly from one table to another, so that, if desired, every successive clear text block can be encrypted by a different table from that used by its predecessor. This is a nonlinear use of a linear device. 
     Orthomorphisms, linear or nonlinear, turn out to have a unique and important property from information theory. The n-bit numbers, Z 2   n , comprise an algebraic group with 2 n  -1 maximal subgroups, each of order 2 n-1 . These include such familiar subgroups as the even numbers, the numbers which all have zero in the same bit position, and many more which are not characterized so simply. When using an orthomorphic mapping for encryption, if an encrypted block belongs to a particular maximal subgroup or complement thereof, the probability that the corresponding clear text block came from the same maximal subgroup or complement is always 1/2. This means that no information can be obtained about the clear text block from the cipher text block. This property is called perfect balance and occurs if and only if the cryptographic mapping is an orthomorphism. For example, if n=8, there are 510 such maximal subgroups and complements which have this perfect balance property. 
     The methods described herein, in relation to the present invention of providing high speed table generation for block encryption, of generating nonlinear mappings and nonlinear orthomorphisms for block encryption, may readily be carried out with a microprocessor-based system under program control. Alternatively, the high speed tables could readily be preprogrammed in read only memory used essentially as look-up tables. Moreover, hardware may be developed in which the techniques of the present invention may be implemented. 
     II. HIGH SPEED TABLE GENERATION 
     In general, two disjoint mappings of some common block size are selected and combined very rapidly into a single mapping of a large block size. The two disjoint mappings may be generated off-line and stored in memory prior to use. 
     A. SELECTION OF TWO DISJOINT MAPPINGS 
     The first table comprises a set of distinct 2 n  n-bit input numbers Xi (where i=0, 1, . . . , m, m=2 n  -1 and n is an integer) and a first set of distinct 2 n  n-bit output numbers, where the first set of 2 n  n-bit output numbers being a one-to-one mapping of the set of 2 n  n-bit input numbers. For example, each number X i  is mapped by a first function f to obtain the first set of 2 n  n-bit output numbers f(X i ). 
     The second table comprises the set of distinct 2 n  n-bit input numbers and a second set of distinct 2 n  n-bit output numbers, where the second set of 2 n  n-bit output numbers being a one-to-one mapping of the set of 2 n  n-bit input numbers. For example, each number X i  is mapped by a second function g to obtain the second set of 2 n  n-bit output numbers g(X i ). The second mapping of 2 n  n-bit output numbers is disjoint from the first mapping of 2 n  n-bit output numbers. That is, f(X i )≠g(X i ). 
     B. SHUFFLING 
     FIG. 2 illustrates one embodiment of the shuffling process of the present invention. In particular, the first table (&#34;table I&#34;) includes the following sets of input and output numbers: 
     
         ______________________________________                                    
X.sub.0   →          f(X.sub.0)                                    
X.sub.1   →          f(X.sub.1)                                    
                            .                                             
                            .                                             
                            .                                             
X.sub.k   →          f(X.sub.k)                                    
                            .                                             
                            .                                             
                            .                                             
X.sub.m   →          f(X.sub.m)                                    
______________________________________                                    
 
    
     The second table (&#34;table II&#34;) includes the following sets of input and output numbers: 
     
         ______________________________________                                    
X.sub.0   →         g(X.sub.0)                                     
X.sub.1   →         g(X.sub.1)                                     
                           .                                              
                           .                                              
                           .                                              
X.sub.k   →         g(X.sub.k)                                     
                           .                                              
                           .                                              
                           .                                              
X.sub.m   →         g(X.sub.m).                                    
______________________________________                                    
 
    
     The first and the second tables are then shuffled or combined to provide a third table having 2 n  pairs of n-bit input numbers and 2 n  pairs of n-bit output numbers. The third table has a predetermined order in which identical input numbers are arranged in pairs and identical output numbers are arranged in pairs. 
     In particular, Table I and Table II are combined as shown in FIG. 3, to obtain a third table (&#34;table III&#34;) which is ordered as follows: 
     
         ______________________________________                                    
X.sub.0       Z.sub.0    (from table I)                                   
X.sub.0       Z.sub.1    (from table II)                                  
X.sub.1       Z.sub.1    (from table I)                                   
X.sub.1       Z.sub.2    (from table II)                                  
.             .                                                           
.             .                                                           
.             .                                                           
X.sub.k-1     Z.sub.k    (from table II)                                  
X.sub.k       Z.sub.k    (from table I)                                   
X.sub.k       Z.sub.0    (from table II)                                  
______________________________________                                    
 
    
     The process of shuffling to obtain a third table (&#34;table III&#34;) may be represented and described as follows: 
     
         ______________________________________                                    
X.sub.0 ←       Z.sub.0   (from table I)                             
↓                                                                  
X.sub.0 →     Z.sub.1   (from table II)                            
                     ↓                                             
X.sub.1 ←       Z.sub.1   (from table I)                             
↓                                                                  
X.sub.1 →     Z.sub.2   (from table II)                            
.                    .                                                    
.                    .                                                    
.                    .                                                    
X.sub.i ←       Z.sub.i   (from table I)                             
↓                                                                  
X.sub.i →     Z.sub.i+1 (from table II)                            
.                    .                                                    
.                    .                                                    
.                    .                                                    
X.sub.k-1                                                                 
        →     Z.sub.k   (from table II)                            
                     ↓                                             
X.sub.k ←       Z.sub.k   (from table I)                             
↓                                                                  
X.sub.k →     Z.sub.0   (from table II).                           
______________________________________                                    
 
    
     First, an n-bit output number Z 0  is selected from table I and its corresponding n-bit input number from table I is designated as X 0 , where f(X 0 )=Z 0 . Next, the same n-bit input number X 0  is selected from table II and its corresponding n-bit output number from table II, i.e., g(X 0 ) is designated as Z 1 . This process continues for k=1 to m, where m=2 n-1 . When k=m, the process of shuffling terminates. 
     In general, the combining or shuffling process may be described as follows: 
     (1) selecting an n-bit output number Z i  from table I and designating a corresponding n-bit input number from table I as X i , where f(X i )=Z i  ; 
     (2) selecting the n-bit input number X i  of step (1) from table II and designating a corresponding n-bit output number from table II g(X i ) as Z i+1  ; 
     (3) performing steps (1) through (2) for i=0 to k, where k=2 n  -1, until Z 0  =f(X k ) reappears a second time. 
     (4) determine if k=m or if all m pairs of numbers have been used; 
     (5) if so, terminating the combining step. 
     (6) if k&lt;m; 
     (7) continue the combining step by selecting a previously unused n-bit output number Z k+1  from table I and designating a corresponding input number from table I as X k+1  ; 
     (8) selecting the input number X k+1  as provided in step (7) from table II and designating a corresponding output number from table II as Z k+2 , where g(X k+1 )=Z k+2  ; 
     (9) selecting the output number Z k+2  as provided in step (8) from table I and designating a corresponding input number from table I as X k+2  ; 
     (10) selecting the input number X k+2  as provided in step (9) from table II and designating a corresponding output number from table II as Z k+3 , where g(X k+2 )=Z k+3  ; and 
     (11) repeating steps (6) to (10) until Z k+1  reappears a second time; 
     (12) determining if all m pairs of input and output numbers have been used; 
     (13) if so, terminating the combining step. 
     (14) if all m pairs of input and output numbers have not been used, continuing with the combining process until all m pairs of input and output numbers have been used. 
     The resulting Table III may be expressed as follows: 
     
         ______________________________________                                    
X.sub.0       Z.sub.0     (from table I)                                  
X.sub.0       Z.sub.1     (from table II)                                 
X.sub.1       Z.sub.1     (from table I)                                  
X.sub.1       Z.sub.2     (from table II)                                 
.             .                                                           
.             .                                                           
.             .                                                           
X.sub.i       Z.sub.i     (from table I)                                  
X.sub.i       Z.sub.i+1   (from table II)                                 
.             .                                                           
.             .                                                           
.             .                                                           
X.sub.k-1     Z.sub.k     (from table II)                                 
X.sub.k       Z.sub.k     (from table I)                                  
X.sub.k       Z.sub.0     (from table II).                                
______________________________________                                    
 
    
     C. TRANSFORMING THE SHUFFLED PAIR OF MAPPINGS INTO A SINGLE MAPPING 
     Next, each of the 2 n  pairs of n-bit input numbers and each of the 2 n  pairs of n-bit output numbers in table III are converted to (n+1)-bit numbers by inserting a bit position containing a zero to each of the 2 n  pairs of n-bit input numbers and each of the 2 n  pairs of n-bit output numbers. FIG. 3 illustrates one embodiment of the conversion process of the present invention. A supplemental (n+1)-bit number containing a one in the same bit position and a zero in the remaining n bit positions is also generated. 
     The supplemental (n+1)-bit number is added to one of each pair of the 2 n  pairs of (n+1)-bit input numbers and to one of each pair of the 2 n  pairs of (n+1)-bit output numbers to obtain a resulting table comprising a set of distinct 2 n+1  (n+1)-bit input numbers and a set of distinct 2 n+1  (n+1)-bit output numbers. 
     At this point, generation of the encryption table is completed. Clear text (n+1)-bit data may be encrypted by providing the (n+1)-bit clear text data as inputs to the encryption table to obtain cipher text (n+1)-bit numbers as outputs. 
     III. GENERATING THE ORTHOMORPHIC MAPPINGS 
     A. REPRESENTATION OF ORTHOMORPHISMS 
     The n-bit binary numbers form the well known algebraic group Z 2   n  where the group operation &#34;⊕&#34; is bit-wise addition modulo 2, also known as XOR-ing. An orthomorphism can be represented by a set of 2 n  equations, as follows. 
     In this example n=8: 
     
                       TABLE A                                                     
______________________________________                                    
X.sub.0 ⊕       X.sub.0                                               
                           =         ⊕                                
X.sub.255                                                                 
        ⊕       X.sub.1                                               
                           =         Z.sub.1                              
X.sub.1 ⊕       X.sub.2                                               
                           =         Z.sub.2                              
.       .           .      .         .                                    
.       .           .      .         .                                    
.       .           .      .         .                                    
X.sub.i-1                                                                 
        ⊕       X.sub.i                                               
                           =         Z.sub.i                              
.       .           .      .         .                                    
.       .           .      .         .                                    
.       .           .      .         .                                    
X.sub.254                                                                 
        ⊕       X.sub.255                                             
                           =         Z.sub.255                            
______________________________________                                    
 
    
     The middle column defines a permutation of Z 2   n  from which each number, except X 0  is added to its successor to obtain the numbers in the right column. The left column represents the same permutation but rotated by one position. The left column comprises the clear text data which is encrypted by adding each block to its successor in the permutation (its companion in the middle column) to obtain the corresponding cipher text block in the right column. X 0  is a fixed point of the orthomorphic permutation (but not of the mapping). The orthomorphic permutation may have some subcycles but no other fixed points. The fixed point of the mapping is that number in the left column whose successor in the orthomorphic permutation (companion in the middle column) is 0. 
     For what follows, it is convenient to have an alternate representation of the orthomorphisms of binary numbers. Z 2   n  is not only an algebraic group but it is also a linear vector space. All of the n-bit numbers can be represented in terms of a complete linearly independent set, that is, a set of n vectors (binary numbers) for which no member of the set can be expressed as a linear combination of the others. 
     Let {B 1 , B 2 , . . . B n ) be a complete linearly independent set of n-bit binary numbers. Any n-bit number can be written: X=a 1  B 1  ⊕ . . . ⊕a n  B n  where a i  =0 or 1 and &#34;⊕&#34; means bit-wise addition modulo 2. 
     For small n, one can use A, B, C, D (n=4), or A, B, C, D, E, F, G, H (n=8) to represent the complete linearly independent set and omit the addition symbol, e.g.: 
     
         A⊕C⊕E≡ACE 
    
     As one rarely uses n&gt;26, this notation is convenient. 
     As an example for n=3, let A=1 0 1, B=0 1 1, C=1 1 
     
         ______________________________________                                    
0 0 0      =                θ                                       
0 0 1      =                ABC                                           
0 1 0      =                AC                                            
0 1 1      =                B                                             
1 0 0      =                BC                                            
1 0 1      =                A                                             
1 1 0      =                AB                                            
1 1 1      =                C                                             
______________________________________                                    
 
    
     As a further example, a linear orthomorphism can be written in two equivalent ways, as follows: 
     
         ______________________________________                                    
Row                                                                       
Number                                                                    
      n = 4    X.sub.k = X.sub.k-4 ⊕ X.sub.k-1                        
______________________________________                                    
0     θ ⊕                                                       
               θ =                                                  
                        θ                                           
                              θ                                     
                                   ⊕                                  
                                       θ                            
                                            =   θ                   
1     CD ⊕ A =      ACD   X.sub.15                                    
                                   ⊕                                  
                                       X.sub.1                            
                                            =   X.sub.12                  
2     A ⊕  B =      AB    X.sub.1                                     
                                   ⊕                                  
                                       X.sub.2                            
                                            =   X.sub.13                  
3     B ⊕  C =      BC    X.sub.2                                     
                                   ⊕                                  
                                       X.sub.3                            
                                            =   X.sub.14                  
4     C ⊕  D =      CD    X.sub.3                                     
                                   ⊕                                  
                                       X.sub.4                            
                                            =   X.sub.15                  
5     D ⊕  AD =     A     X.sub.4                                     
                                   ⊕                                  
                                       X.sub.5                            
                                            =   X.sub.1                   
6     AD ⊕ ABD =    B     X.sub.5                                     
                                   ⊕                                  
                                       X.sub.6                            
                                            =   X.sub.2                   
7     ABD ⊕                                                           
               ABCD =   C     X.sub.6                                     
                                   ⊕                                  
                                       X.sub.7                            
                                            =   X.sub.3                   
8     ABCD ⊕                                                          
               ABC =    D     X.sub.7                                     
                                   ⊕                                  
                                       X.sub.8                            
                                            =   X.sub.4                   
9     ABC ⊕                                                           
               BCD =    AD    X.sub.8                                     
                                   ⊕                                  
                                       X.sub.9                            
                                            =   X.sub.5                   
10    BCD ⊕                                                           
               AC =     ABD   X.sub.9                                     
                                   ⊕                                  
                                       X.sub.10                           
                                            =   X.sub.6                   
11    AC ⊕ BD =     ABCD  X.sub.10                                    
                                   ⊕                                  
                                       X.sub.11                           
                                            =   X.sub.7                   
12    BD ⊕ ACD =    ABC   X.sub.11                                    
                                   ⊕                                  
                                       X.sub.12                           
                                            =   X.sub.8                   
13    ACD ⊕                                                           
               AB =     BCD   X.sub.12                                    
                                   ⊕                                  
                                       X.sub.13                           
                                            =   X.sub.9                   
14    AB ⊕ BC =     AC    X.sub.13                                    
                                   ⊕                                  
                                       X.sub.14                           
                                            =   X.sub.10                  
15    BC ⊕ CD =     BD    X.sub.14                                    
                                   ⊕                                  
                                       X.sub.15                           
                                            =   X.sub.11                  
______________________________________                                    
 
    
     The binary numbers in each representation can be clearly identified from row. 1, CD=X 15 , A=X 1 , and ACD=X 12  etc. A, B, C, and D can be any linearly independent set of 4-bit binary numbers. Of course, this representation holds as well for an affine or nonlinear orthomorphism. In those cases, the right column no longer is a rotated version of the permutation represented by the middle column. 
     B. SHUFFLING 
     Shuffling is the process of generating orthomorphisms in Z 2   n+1  from pairs in Z 2   n . 
     A pair of disjoint orthomorphic mappings of n-bit numbers will have the property that f(x)≠g(x) for all clear text numbers x, where f and g are the first and second orthomorphic mappings respectively. Further for any cipher text number z there are clear text numbers u≠v such that f(u)=g(v)=z. Thus, for each cipher text Z i  we can find a pair of equations from the first and second orthomorphic mappings as follows: 
     
         ______________________________________                                    
U.sub.i-1                                                                 
         ⊕    U.sub.i                                                 
                        =       Z.sub.i                                   
                                       first                              
V.sub.i-1                                                                 
         ⊕    V.sub.i                                                 
                        =       Z.sub.i                                   
                                       second                             
______________________________________                                    
 
    
     Each of these five numbers can be expressed as a linear combination of n-bit numbers from a complete linearly independent set. To change to an orthomorphic mapping on Z 2   n+1 , one must first change the linearly independent set of n-bit numbers to (n+1)-bit numbers. For example, as in Section IV, for n=3, let A=101, B=011, C=111. We can add 0 0 0 0 to each, to obtain A&#39;=0101, B&#39;=0011, C&#39;=01 11, This is an independent set in Z 2   4 , but we need a fourth number D&#39; which is independent of A&#39;, B&#39;, C&#39; to obtain a complete linearly independent set. D&#39;=1000 would meet this requirement, as would other choices. Symbolically, we retain the original literal representation and supplement it with an additional term. 
     Extending this example, if the corresponding equations for n=4 are: 
     
         ______________________________________                                    
ABCD    ⊕    C      =       ABD    first                              
BC      ⊕    ACD    =       ABD    second                             
______________________________________                                    
 
    
     We let A, B, C, and D now represent independent 5-bit numbers and supplement these with a fifth independent number E. The above pair of equations can now be modified to be consistent equations in an orthomorphism of the 5-bit numbers. 
     For example: 
     
         ______________________________________                                    
ABCDE   ⊕    C       =      ABDE   first                              
BCE     ⊕    ACDE    =      ABD    second                             
______________________________________                                    
 
    
     This could be done in several other ways. For example: 
     
         ______________________________________                                    
       ABCD    ⊕   CE   =      ABDE   first                           
       BC      ⊕   ACD  =      ABD    second                          
or                                                                        
       ABCDE   ⊕   CE   =      ABD    first                           
       BCE     ⊕   ACD  =      ABDE   second                          
______________________________________                                    
 
    
     However, there are two essentials, E must be assigned consistently, and one but only one of the Z i  =ABD terms must be modified. 
     IV. DETAILED PROCEDURES AND ANALYSIS 
     (a) The next procedure is to take the two orthomorphic mappings on Z 2   n  each of which is represented by a set of 2 n  equations, and shuffle them together, without any modifications, in such a way that subsequent modifications can be done deterministically as controlled by the key. We will designate the two original orthomorphisms, respectively as (I) and (II). For convenience, we will also redesignate the row numbers. The numbers in the left (L), middle (M), and right (R) columns will be respectively designated by the symbols X i , Y j  Z ij . The corresponding designation of the original orthomorphism, (I) or (II), will be written to the right of each unmodified equation. In the combined set of shuffled equations each number Z 2   n  will appear twice each in the L, M, and R columns. 
     First Step: Take an arbitrary equation from (I) and designate it as follows: 
     
         X.sub.0 ⊕Y.sub.0 =Z.sub.0,0                            (I) 
    
     Second Step: Follow this with the equation from (II) which also has X 0  in column L: 
     
         X.sub.0 ⊕Y.sub.0 =Z.sub.0,0                            (I) 
    
     
         X.sub.0 ⊕Y.sub.1 =Z.sub.0,1                            (II) 
    
     Since the equations are from disjoint orthomorphisms, Y 0  ≠Y 1  and Z 0 ,0 ≠Z 0 ,1 
     Third Step: Follow this with the equation from (I) which also has Y 1  in column M: 
     
         X.sub.1 ⊕Y.sub.1 =Z.sub.1,1                            (I) 
    
     
         X.sub.0 ⊕Y.sub.1 =Z.sub.0,1                            (II) 
    
     
         X.sub.1 ⊕Y.sub.1 =Z.sub.1,1                            (I) 
    
     Subsequent Steps: Continue this alternating process between columns L and M, and between (I) and (II) until Y 0  appears a second time in column M. The pattern is as follows: 
     
         ______________________________________                                    
X.sub.0                                                                   
       ⊕      Y.sub.0                                                 
                         =       Z.sub.0,0                                
                                         (I)                              
X.sub.0                                                                   
       ⊕      Y.sub.1                                                 
                         =       Z.sub.0,1                                
                                         (II)                             
X.sub.1                                                                   
       ⊕      Y.sub.1                                                 
                         =       Z.sub.1,1                                
                                         (I)                              
X.sub.1                                                                   
       ⊕      Y.sub.2                                                 
                         =       Z.sub.1,2                                
                                         (II)                             
.                                                                         
.                                                                         
X.sub.i                                                                   
       ⊕      Y.sub.i                                                 
                         =       Z.sub.i,i                                
                                         (I)                              
X.sub.i                                                                   
       ⊕      Y.sub.i+1                                               
                         =       Z.sub.i,i+1                              
                                         (II)                             
X.sub.i+1                                                                 
       ⊕      Y.sub.i+1                                               
                         =       Z.sub.i+1,i+1                            
                                         (I)                              
.                                                                         
.                                                                         
.                                                                         
X.sub.k                                                                   
       ⊕      Y.sub.k                                                 
                         =       Z.sub.k,k                                
                                         (I)                              
X.sub.k                                                                   
       ⊕      Y.sub.0                                                 
                         =       Z.sub.k,k+1                              
                                         (II)                             
______________________________________                                    
 
    
     If k=2 n  -1, the shuffling is complete. If not, we have completed a cycle of 2(k+1) equations. We choose any hitherto unused equation from (I) and resume the process with another cycle as follows: 
     
         ______________________________________                                    
X.sub.k+1                                                                 
       ⊕      Y.sub.k+1                                               
                         =       Z.sub.k+1,k+1                            
                                         (I)                              
X.sub.k+1                                                                 
       ⊕      Y.sub.k+2                                               
                         =       Z.sub.k+1,k+2                            
                                         (II)                             
.                                                                         
.                                                                         
Xl     ⊕      Y.sub.l                                                 
                         =       Z.sub.l,l                                
                                         (I)                              
Xl     ⊕      Y.sub.k+l                                               
                         =       Z.sub.l,l+1                              
                                         (II)                             
______________________________________                                    
 
    
     This process continues until all 2 n+1  equations have been used. 
     If there are multiple cycles, in each, X i  and Y i  will each appear twice, consecutively, or not at all. Z i ,i ≠Z i ,i+1 and Z i ,i+1 ≠Z i+1 ,i+1 for all i since a pair of equations cannot have two corresponding numbers the same and the third ones different. In a single cycle which is not the whole set of 2 n+1  equations, a given Z appearing in column R may also appear a second time or its second appearance may occur in a preceding or subsequent cycle. The shuffling is now complete and has consisted only of a reordering of the 2 n+1  equations without modifications. 
     (b) The second procedure is to transform the shuffled pair of orthomorphic mappings on Z 2   n  to a single orthomorphic mapping on Z 2   n+1 . The first step is to add the extra (n+1)-bit number E=1 0 0 0 . . . 0 0 (1 followed by n zeros) to one or the other of the two identical numbers Z in column R. There are 2&#34; such pairs. If E is not added to a particular Z, then O=0 0 0 . . 0 0 (n+1 zeroes) is added to it. This is done by proceeding consecutively down column R. For the first equation, add E or O to Z 0  accordingly as the key bit is 1 or 0: 
     
         X.sub.0 ⊕Y.sub.0 =Z.sub.0,0 E 
    
     or 
     
         X.sub.0 ⊕Y.sub.0 =Z.sub.0,0 O 
    
     The equation, of course, is momentarily unbalanced. Whatever choice is made, Z 0 ,0 will appear a second time further down in column R. The opposite selection of E or O must be made for the second appearance. This latter selection is deterministic. Continuing down column R, for each Z i ,i or Z i ,i+1, if this is the first appearance, add E or O as determined by the key. If this is the second appearance, the choice has already been determined. If there is only one cycle proceed in this way until all 2 n  placements of E have been completed. If there are multiple cycles, there is one constraint in each except in the last cycle. The numbers of E&#39;s (and O&#39;s) assigned in column R in each cycle must be even. The reason for this is explained below. When using the key to assign E&#39;s to Z&#39;s in each cycle, one eventually comes to the last Z in column R which occurs only once in that cycle and which did not appear in a previous cycle. In this case, E or O must be assigned such that the total number of E&#39;s in column R in that cycle is even. In the final cycle, this balance occurs automatically. An alternative way of meeting this requirement, is to arbitrarily assign E&#39;s and O&#39;s in each cycle as the key dictates, only avoiding duplications. When assignments are completed in that cycle, one counts E&#39;s to see if the number is even. If the number of E&#39;s is odd, one selects a Z which only occurred once in that cycle and did not appear in a previous cycle, and then reverses its E/0 assignment. The most efficient way to do this is to start with the smallest cycle in assigning the E&#39;s and O&#39;s in column R, and then proceed to successively larger ones. This avoids the situation in which the selection in a large cycle may completely determine that in a smaller cycle. In this latter case, one must simultaneously monitor the secondary or consequential assignments of E&#39;s and O&#39;s in the smaller cycle to avoid assignment of an odd number of E&#39;s. 
     The second step in his procedure is to assign E&#39;s and O&#39;s to columns L and M to complete the transformation to an orthomorphism on Z 2   n+1 . Consider the first equation in the first cycle. Z 0 ,0 has been modified one of two ways in the first procedure as specified by the key. For each of these two ways there is now a further choice of two ways by which to complete the transformation: 
     
         ______________________________________                                    
CASE 1:                                                                   
          X.sub.0                                                         
                 ⊕    Y.sub.0                                         
                               =     Z.sub.0,0 E                          
                                            (I)                           
becomes   X.sub.0 E                                                       
                 ⊕    Y.sub.0 O                                       
                               =     Z.sub.0,0 E                          
or        X.sub.0 O                                                       
                 ⊕    Y.sub.0 E                                       
                               =     Z.sub.0,0 E                          
CASE 2:                                                                   
          X.sub.0                                                         
                 ⊕    Y.sub.0                                         
                               =     Z.sub.0,0 O                          
                                            (I)                           
becomes   X.sub.0 E                                                       
                 ⊕    Y.sub.0 E                                       
                               =     Z.sub.0,0 O                          
or        X.sub.0 O                                                       
                 ⊕    Y.sub.0 O                                       
                               =     Z.sub.0,0 O                          
______________________________________                                    
 
    
     This choice can be made by the key. From the next equation to the end of the cycle, no further choices can be made, as the remainder of the process of assigning E&#39;s and O&#39;s is deterministic and free of conflicts. 
     
         ______________________________________                                    
Example 1:                                                                
X.sub.0 E ⊕ Y.sub.0 O = Z.sub.0,0 E                                   
X.sub.0 O ⊕ Y.sub.1 E = Z.sub.0,1 E                                   
X.sub.1 O ⊕ Y.sub.1 O = Z.sub.1,1 O                                   
X.sub.1 E ⊕ Y.sub.2 O = Z.sub.1,2 E                                   
X.sub.2 O ⊕ Y.sub.2 E = Z.sub.2,2 E                                   
X.sub.2 E ⊕ Y.sub.3 E = Z.sub.2,3 O                                   
.                                                                         
.                                                                         
Example 2:                                                                
X.sub.0 O ⊕ Y.sub.0 O = Z.sub.0,0 O                                   
X.sub.0 E ⊕ Y.sub.1 O = Z.sub.0,1 E                                   
X.sub.1 O ⊕ Y.sub.1 E = Z.sub.1,1 E                                   
X.sub.1 E ⊕ Y.sub.2 E = Z.sub.1,2 O                                   
X.sub.2 E ⊕ Y.sub.2 O = Z.sub.2,2 E                                   
X.sub.2 O ⊕ Y.sub.3 E = Z.sub.2,3 E                                   
______________________________________                                    
 
    
     In each example, having made a decision in the first equation and in all of column R, X 0  in the second equation must be the opposite of its counterpart in the first. This in turn determines what to add to Y 1  also in the second equation. This determines Y 1  in equation 3 which then determines X 1  in equation 3, thence to Y 2  in equation 4, etc. This can be shown schematically: ##EQU1## 
     (c) If there is a single cycle, the number of E&#39;s is even in each column. We now need to justify the general statement that in each cycle the number of E&#39;s in column R is even. Each cycle will contain 2k equations or rows because of the way in which they are constructed. k may be even or odd. In columns L and M there will be k E&#39;s each since the numbers X 1  and Y 1  occur in pairs. Thus the number of E&#39;s in columns L and M may be even or odd but the totality in both columns, 2k is even. There will be some number J of E&#39;s in column R. In each modified equation there will be either two E&#39;s or no E&#39;s. Thus the total number of E&#39;s occurring in the cycle is even. Since 2k+J is even, J is also even. 
     Lastly, if there is a single cycle in the shuffled set of equations, there are 2 n  pairs of equations sharing a common value in column R and 2 2 .spsp.n ways of assigning E&#39;s and O&#39;s. Since there is a single cycle, there is one initial equation in which there are two choices of how to assign E&#39;s and O&#39;s in columns L and M. There is a total of 2 2 .spsp.n ·2=2 2 .spsp.n +1  key controlled choices. 
     Next we consider the case of multiple cycles. If there are two cycles, in the first cycle some number a entries occur twice and b entries occur once in column R in that cycle for a total of 2a+b equations. b will be an even number. a may be even or odd, but an E will be assigned to each of the a numbers in one or the other of the 2a rows as determined by the key. The assignment of E&#39;s to the b single numbers is also controlled by the key but with one constraint. The number of E&#39;s assigned to the b single numbers must be even or odd accordingly as a is even or odd, so that the total of E&#39;s assigned is even. Thus there will be no choice for the last of the b single numbers. An E must be added or omitted as necessary to assure that the total number of E&#39;s is even. Thus 2 a  2 b-1  =2 a+b-1  key controlled choices will have been made in cycle 1. Next in cycle 2 there are c entries occurring twice and b entries occurring once. The assignment of E&#39;s to the b entries was determined in cycle I. There are 2 c  choices for assignment of E&#39;s to the pairs. The numbers of E&#39;s in cycle 2 will automatically be even since they were in cycle 1. As in the single cycle case, there will be a choice of how to assign E to the L and M columns in the initial equation chosen in each cycle. For the two cycles, this is 2 2  choices. The total number of choices is: 
     
         2.sup.a 2.sup.b-1 2.sup.c 2.sup.2 =2.sup.2.spsp.n.sup.-1+2 =2.sup.2.spsp.n.sup.+1 
    
     
         since a+B+C=2.sup.n 
    
     Now consider the general case where there are k cycles. Order them in increasing size from 1 to k, and let a i  be the number of entries occurring twice in the R column of cycle i. Let b i  be the number of single entries in column R, cycle i which have not appeared in any of the preceding cycles, i.e., b i  ∩b j  =.O slashed. for j&lt;i. Then in cycle i the number of choices for assignment of E&#39;s in column R is 2 a .sbsp.i 2 b .sbsp.i -1  since the final choices constrained to have an even number of E&#39;s in the R column. In cycle k, b k  =0 since all of the single numbers in that last cycle will have occurred before. Thus the number of choices in that cycle is 2 a .sbsp.k 2 b .sbsp.k =2 a .sbsp.k. Once again, in each cycle there is a single choice of how to assign E to the L or M column in the initial equation chosen. Thus the total number of choices is: ##EQU2## 
     The methods described in relation to the present invention of providing high speed table generation for block encryption, of generating nonlinear mappings and nonlinear orthomorphisms for block encryption, may readily be carried out with a microprocessor-based system under program control. Alternatively, memory could readily be preprogrammed in read only memory used essentially as look-up tables. 
     V. APPLICATION TO GENERAL CASES 
     Combining the two mappings on Z 2   n  into a single such mapping on Z 2   n+1  can be modified and simplified if the constraint that the composite mapping be an orthomorphism is removed. With reference to Table A, the numbers in the left column X i-1  (clear text) are mapped onto the numbers in the right column Z i  (cipher text). Thus, f(X i-1 )=Z i . The mapping in the middle column is equal to the sum X i-1  ⊕f(X i ). 
     As described earlier, an orthomorphism is characterized by the fact that the numbers in the middle column are distinct. Each number in Z 2   n  occurs exactly once. In other mappings, some numbers will appear more than once and others not all. Thus, without the constraint that the composite mapping be an orthomorphism, there is no need to consider the middle column, or equivalently, to consider the sum of the input and output. 
     The combined table is obtained by alternating between the left and right columns and the middle column is deleted. This is illustrated as follows: 
     
         ______________________________________                                    
X.sub.0       Z.sub.0    (from table I)                                   
X.sub.0       Z.sub.1    (from table II)                                  
X.sub.1       Z.sub.1    (from table I)                                   
X.sub.1       Z.sub.2    (from table II)                                  
.             .                                                           
.             .                                                           
.             .                                                           
X.sub.k-1     Z.sub.k    (from table II)                                  
X.sub.k       Z.sub.k    (from table I)                                   
X.sub.k       Z.sub.0    (from table II)                                  
______________________________________                                    
 
    
     If k=2 n  -1, then the shuffling is complete. If not, a cycle of 2(k+1) equations has been obtained. As before, any previously unused equation from table I is used and the shuffling process is resumed until all of the 2 n  pairs of equations have been used. 
     Also as described earlier, the n-bit numbers are converted to (n+1)-bit numbers by inserting another bit position containing a zero in each n-bit number. &#34;E&#34; may be considered an (n+1)-bit number with a 1 in that position where the remaining numbers have a 0, and an arbitrary set of l&#39;s and O&#39;s in the other bit positions. 
     Finally, an E is assigned to one of each X i  pair. Since there is no middle column to consider, this can be performed in any fashion. There will be 2 n  choices in each column for a total of 2 n+1  choices. 
     VI. APPLICATIONS 
     The methods described in relation to the present invention may readily be carried out with a microprocessor-based system under program control. FIG. 4 is a system block diagram of an exemplary processor system in which the methods of the present invention may be performed. The processor system 10 shown in FIG. 4 comprises a central processing unit (CPU) 12 and main memory 14 which is coupled to and controlled by memory controller 16. The CPU 12 and memory controller 16 are coupled to a system bus 18. The processor system may also include various Input/Output (&#34;I/O&#34;) and peripheral modules (i.e., MISC I/O #1, MISC I/O #2, . . . , MISC I/O #N) 24 which are coupled along an I/O bus 22. It should be understood however that further devices may be installed on the system bus 18 and on the I/O bus 22, as well known in the art. The bus bridge 20 provides an interface between the system bus 18 and the I/O bus 22. It is contemplated that the processor system 10, be any processor-based system. 
     In one embodiment, the tables obtained from disjoint mappings for example, tables I and II as described in the following section may be stored in main memory 14. The main memory 14 also stores instruction sequences which are executed by the CPU 12 to generate the resulting encryption table as described above. In an alternate embodiment, the nonlinear mapping process may be performed by the CPU 12 upon receipt of a set of 2 n  n-bit input numbers to obtain a set of encryption tables. 
     In one embodiment, high quality nonlinear orthomorphisms on n-bit numbers can be generated off line and stored. The bar sinister method in particular produces very high quality ones but it may take several seconds for bit size n=8. It is also relatively easy to obtain disjoint pairs since the method involves finding transversals in Latin squares. There are two particular advantages to the shuffling method: 
     Firstly, (n+1)-bit S-box tables can be generated very rapidly for applications requiring high data rates and/or frequent fast table changing. 
     Secondly, the number of distinct (n+1)-bit tables that can be derived from a single pair of disjoint n-bit orthomorphisms is 2 2 .spsp.n +1 . This means a key size of 2 n  +1 bits. In the most likely case of shuffling two orthomorphisms of the 7-bit numbers into one 8-bit nonlinear orthomorphism we would have a 129 bit key and 2 129  =6.8×10 38  possible 8-bit orthomorphic tables. 
     In an alternate embodiment, the linear or nonlinear orthomorphic mapping process may be performed by the CPU 12 upon receipt of a set of 2 n  n-bit input numbers to obtain a set of encryption tables. 
     Once the encryption table has been generated, it may be stored in main memory 14. Clear text (n+1)-bit data may then be encrypted by providing the (n+1)-bit clear text data as inputs to the encryption table to obtain cipher text (n+1)-bit numbers as outputs. 
     The present invention thus provides an apparatus and method for generating nonlinear mappings for block encryption, which has high cryptographic strength and which can be generated quickly and efficiently. In one embodiment, orthomorphisms for block encryption are used, which ensures increased cryptographic strength. 
     The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.