Abstract:
A method of diversification of an iterative function of an encryption algorithm. During an iteration at least one parameter other than an encryption key and an input message is modified. It is particularly advantageous that the encryption algorithm is the Advanced Encryption Standard.

Description:
TECHNICAL FIELD 
       [0001]    The present invention relates generally to cryptography, and more particularly to an algorithm for encryption and/or decryption of data. 
       BACKGROUND 
       [0002]    This section is intended to introduce the reader to various aspects of art, which may be related to various aspects of the present invention that are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present invention. Accordingly, it should be understood that these statements are to be read in this light, and not as admissions of prior art. 
         [0003]    A copy protection system intended to run on a malicious host is, by definition, prone to reverse engineering attacks because the adversary is able to view the programs execution and intermediate results generated during computation. The so-called white-box attack context was introduced as a setting where the adversary is allowed to make observations about the software and to examine or alter the software intermediate results; see S. Chow, P. Eisen, H. Johnson, P. C. van Oorschot, “A White-Box DES Implementation for DRM Application”,  Digital Rights Managerment WorkShop - DRM  2002, Lecture Notes in Computer Science, vol. 2696, 2003, pp. 1-15. 
         [0004]    In order to protect the Advanced Encryption Standard (AES) in such a context, Chow et al. implemented a white-box AES encryption algorithm; see S. Chow, P. Eisen, H. Johnson, P. C. van Oorschot, “White-Box Cryptography and an AES Implementation”,  Selected Areas in Cryptography - SAC  2002, Lecture Notes in Computer Science, vol. 2595, 2003, pp. 250-270. However, Billet et al. showed that the secret key can be extracted from Chow&#39;s implementation with time complexity of 2 30 ; see O. Billet, H. Gilbert, C. Ech-Chatbi, “Cryptanalysis of a White Box AES Implementation”,  Selected Areas in Cryptography - SAC  2004, Lecture Notes in Computer Science, vol. 3357, In H. Handschuh, A. Hasan (eds.), 2005, pp. 227-240. 
         [0005]    It can therefore be appreciated that there is a need for a solution that provides a white-box version of AES that is less vulnerable to Billet&#39;s attack. The present invention provides such a solution. The skilled person will appreciate that while the invention was made for AES, it may also be used in other iterative block cipher encryption algorithms. 
         [0006]    In order to facilitate understanding of the present invention, AES, its white-box implementation and Billet&#39;s attack will now be described. 
       AES Description 
       [0007]    AES is a standard for data encryption, at present with three versions, depending on the key length: 128 bits, 192 bits or 256 bits. The block length, i.e. the length of a basic unit of cleartext and later ciphertext, is 128 bits, and a block is represented as a (4×4) matrix of bytes, called a state. AES operates over the algebraic Galois field GF(2 8 ). The reason is computational efficiency, as GF(2 8 ) elements can be represented by bytes, which can be easily processed by computers. Without loss of generality, the description hereinafter will focus on the 128-bit version of AES, i.e. AES-128. 
         [0008]    The AES-128 algorithm comprises 10 iterations, called rounds, that each performs four transformations: 
         [0000]    SubBytes: This transformation takes the multiplicative inverse of the input in GF(2 8 ) modulo the irreducible polynomial of AES x 8 +x 4 +x 3 +x+1, the output of which is transformed by the affine transformation: 
         [0000]    
       
         
           
             
               [ 
               
                 
                   
                     
                       y 
                       0 
                     
                   
                 
                 
                   
                     
                       y 
                       1 
                     
                   
                 
                 
                   
                     
                       y 
                       2 
                     
                   
                 
                 
                   
                     
                       y 
                       3 
                     
                   
                 
                 
                   
                     
                       y 
                       4 
                     
                   
                 
                 
                   
                     
                       y 
                       5 
                     
                   
                 
                 
                   
                     
                       y 
                       6 
                     
                   
                 
                 
                   
                     
                       y 
                       7 
                     
                   
                 
               
               ] 
             
             ← 
             
               
                 
                   [ 
                   
                     
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                     
                     
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                   
                   ] 
                 
                 · 
                 
                   [ 
                   
                     
                       
                         
                           x 
                           0 
                         
                       
                     
                     
                       
                         
                           x 
                           1 
                         
                       
                     
                     
                       
                         
                           x 
                           2 
                         
                       
                     
                     
                       
                         
                           x 
                           3 
                         
                       
                     
                     
                       
                         
                           x 
                           4 
                         
                       
                     
                     
                       
                         
                           x 
                           5 
                         
                       
                     
                     
                       
                         
                           x 
                           6 
                         
                       
                     
                     
                       
                         
                           x 
                           7 
                         
                       
                     
                   
                   ] 
                 
               
               + 
               
                 [ 
                 
                   
                     
                       1 
                     
                   
                   
                     
                       1 
                     
                   
                   
                     
                       0 
                     
                   
                   
                     
                       0 
                     
                   
                   
                     
                       0 
                     
                   
                   
                     
                       1 
                     
                   
                   
                     
                       1 
                     
                   
                   
                     
                       0 
                     
                   
                 
                 ] 
               
             
           
         
       
     
         [0000]    ShiftRows: This transformation is a byte transposition that cyclically shifts each row of the state by respectively 0, 1, 2 and 3 positions to the left.
 
MixColumns: This transformation operates on the columns of the state. It is a multiplication of the column by the polynomial mc(x)=03.x 3 +01.x 2 +01.x+02 in GF(2 8 ) 4  modulo the polynomial x 4 +1. This can be described by a matrix multiplication (the matrix being denoted MC):
 
         [0000]    
       
         
           
             
               [ 
               
                 
                   
                     
                       x 
                       0 
                     
                   
                 
                 
                   
                     
                       x 
                       1 
                     
                   
                 
                 
                   
                     
                       x 
                       2 
                     
                   
                 
                 
                   
                     
                       x 
                       3 
                     
                   
                 
               
               ] 
             
             ← 
             
               
                 [ 
                 
                   
                     
                       02 
                     
                     
                       03 
                     
                     
                       01 
                     
                     
                       01 
                     
                   
                   
                     
                       01 
                     
                     
                       02 
                     
                     
                       03 
                     
                     
                       01 
                     
                   
                   
                     
                       01 
                     
                     
                       01 
                     
                     
                       02 
                     
                     
                       03 
                     
                   
                   
                     
                       03 
                     
                     
                       01 
                     
                     
                       01 
                     
                     
                       02 
                     
                   
                 
                 ] 
               
               · 
               
                 [ 
                 
                   
                     
                       
                         x 
                         0 
                       
                     
                   
                   
                     
                       
                         x 
                         1 
                       
                     
                   
                   
                     
                       
                         x 
                         2 
                       
                     
                   
                   
                     
                       
                         x 
                         3 
                       
                     
                   
                 
                 ] 
               
             
           
         
       
     
         [0000]    AddRoundKey: This transformation is an XOR operation with the round key, i.e. the key used for the particular round. 
         [0009]    Put another way, if Xis the state, each round consists of:
       X←SubBytes(X)   X←ShiftRows(X)   X←MixColumns(X)   X←Add Round Key(X i K i )
 
where K i  denotes the round key i.
       
 
         [0014]    The AES −1  algorithm, i.e. the corresponding decryption algorithm, works in the reverse direction by using the inverses of the steps: InvSubBytes, InvShiftRows, InvMixColumns and AddRoundKey. A complete description (including test vectors) can be found in National Institute of Standards and Technology (NIST): Advanced Encryption standard (AES), FIPS Publication 197, 2001. Available at URL http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf. 
       White-Box Implementation 
       [0015]    The strategy of the white-box implementation of AES, WB-AES, is to convert AES into a series of look-ups in key-dependent look-up tables and to hide the secret keys in these tables. Each table is composed of several steps of the AES and encoded with random bijections. 
         [0016]      FIG. 1  illustrates a round of WB-AES before random bijections encoding (ShiftRows is omitted). Compared to ‘ordinary’ AES, the operations of the WB-AES rounds are slightly changed without impacting the input or the output. AddRoundKey and SubBytes of the next round are combined into one step, and the subkey (calculated using AES key schedule) is integrated into SubBytes by creating bytes input/output look-up tables  r T of round r. 
         [0000]        r   T   i,j ( x )= S ( x⊕   r   K   i,j )  r≦ 1, . . . ,9  i,j= 0, . . . ,3 
         [0000]        10   T   i,j ( x )= S ( x⊕   9   K   i,j )⊕ 10   K   i,j    i,j= 0, . . . ,3  (13
 
         [0000]    where S is the AES S-box and K is the AES subkey. 
         [0017]    MixColumns operates on the AES state one column at a time. This can be implemented by multiplying a 32×32 matrix MC (thereafter MixColumns matrix) and a 32×1 vector. Multiplication of a 32-bits vector by MC is done by four separate multiplications and three 32-bits XORs. ShiftRows is implemented by providing shifted input data to the generated tables. 
         [0018]    WB-AES generally uses external and internal encodings. External encoding permits the shielding of the implementation: 
         [0000]    
       
      
       G∘E 
       K 
       ∘F 
       −1 
               
       F∘E 
       K 
       −1 
       ∘G 
       −1  
      
     
         [0019]    If external encoding is applied to the encryption operation, inverse encoding should be applied to the decryption operation and vice-versa. Otherwise, decryption cannot be possible. 
         [0020]    Internal encoding randomizes the data flow between consecutive look-up tables. For the sake of clarity, the description only considers internal encodings to give the general idea and to provide information necessary for the understanding of Billet&#39;s attack. 
         [0021]    Let us consider AES as a composition of 10 functions as follows: 
         [0000]    
       
      
       E=R 
       1 
       ∘R 
       2 
       ∘ . . . ∘R 
       9 
       ∘R 
       10  
      
     
         [0000]    where R i  represents the operations of an entire AES round coded as a look-up table. A table is delinearized using random permutations P i . The idea is to compose a round of AES operations by inserting a P i  that is annihilated in the next round: 
         [0000]    
       
         
           
             E 
             = 
             
               
                 
                   
                     
                       R 
                       1 
                     
                     ∘ 
                     
                       P 
                       1 
                     
                   
                    
                 
                 
                   OT 
                   1 
                 
               
               ∘ 
               
                 
                   
                     
                       P 
                       1 
                       
                         - 
                         1 
                       
                     
                     ∘ 
                     
                       R 
                       2 
                     
                     ∘ 
                     
                       P 
                       2 
                     
                   
                    
                 
                 
                   OT 
                   2 
                 
               
               ∘ 
               
                 P 
                 2 
                 
                   - 
                   1 
                 
               
               ∘ 
               … 
               ∘ 
               
                 P 
                 8 
               
               ∘ 
               
                 
                   
                     
                       P 
                       8 
                       
                         - 
                         1 
                       
                     
                     ∘ 
                     
                       R 
                       9 
                     
                     ∘ 
                     
                       P 
                       9 
                     
                   
                    
                 
                 
                   OT 
                   9 
                 
               
               ∘ 
               
                 
                   
                     
                       P 
                       9 
                       
                         - 
                         1 
                       
                     
                     ∘ 
                     
                       R 
                       10 
                     
                   
                    
                 
                 
                   OT 
                   10 
                 
               
             
           
         
       
     
         [0000]    AES then becomes a composition of 10 obfuscated tables OT i . 
         [0022]    This delinearization step prevents an adversary from viewing the contents of each table. It is then more difficult to extract the keys by inspecting the obfuscated tables OT. 
         [0023]    In detail, the obfuscation, illustrated in  FIG. 2 , works on a byte and each round is composed by four mappings. A mapping may be viewed as a table where  r P i,j (resp.  r Q i,j ) is the encoding of a byte using random bijections.  r P i,j  and  r Q i,j  cancel each other between two consecutive rounds. In other words: 
         [0000]        r   Q   i,j   =inv ( r+1   P   i,j )  i,j= 0, . . . 3 
       Billet&#39;s Attack 
       [0024]    A full description of the attack is found in the paper mentioned hereinbefore. What follows is a simplified description that allows an understanding of the present invention. 
         [0025]    Since it is difficult to extract the keys by local inspections of the obfuscated tables, it is more convenient to look at the input and the output of the composition of tables for a round. The attack comprises 5 steps:
       1. Recover non-linear parts of all P-boxes and Q-boxes of a round r by analyzing their input and output.   2. Remove P and Q non-linear parts thereby making them unknown affine mappings.   3. Recover the affine mappings.   4. Once the affine mappings are recovered, the bytes of a subkey round (embedded in T-boxes) can be retrieved. The bytes are however in a shuffled order.   5. Repeat step 1 to 4 for the next round r+1. This makes it possible to get another shuffled subkey. Constraints in the AES key schedule algorithm enable retrieving both subkeys in correct order. The AES master key can be recovered knowing only one subkey.       
 
         [0031]    To recover the affine mappings  r Q i,j , it is first necessary to retrieve the affine mappings  r Q i,0 =A i ⊕q i , where A i  is linear and q i  is a constant. The mappings  r Q i,0  for a vector (x,0,0,0) can be written as: 
         [0000]        r   Q   i,0 ( x, 0,0,0)= y   i ( x, 0,0,0)= A   i (α i,0   r   T   i,0 ( r   P   i,0 ( x ))⊕ r   K   i,0 )⊕ q   i    i= 0, . . . ,3
 
         [0000]    where α i,0 , with i=0, . . . , 3 are MixColumns coefficients. 
         [0032]    This can be rewritten as an x function, and for i=0 this gives: 
         [0000]        x             (   S   −1 ∘Λ δ     j     ∘A   0   −1 )( y   0 ( x, 0,0,0)⊕ c   j )= r   P   0,0 ( x )⊕ r   K   0,0  
 
         [0000]    where S is the AES S-Box. Λ δ  is the matrix over GF(2 8 ) of multiplication by δ. (δ j , c j ) are unknown constants. The value of δ j   −1  depends on MixColumns coefficients. 
         [0000]    
       
         
           
             MC 
             = 
             
               
                 ( 
                 
                   
                     
                       
                         α 
                         
                           0 
                           , 
                           0 
                         
                       
                     
                     
                       
                         α 
                         
                           1 
                           , 
                           0 
                         
                       
                     
                     
                       
                         α 
                         
                           2 
                           , 
                           0 
                         
                       
                     
                     
                       
                         α 
                         
                           3 
                           , 
                           0 
                         
                       
                     
                   
                   
                     
                       
                         α 
                         
                           0 
                           , 
                           1 
                         
                       
                     
                     
                       
                         α 
                         
                           1 
                           , 
                           1 
                         
                       
                     
                     
                       
                         α 
                         
                           2 
                           , 
                           1 
                         
                       
                     
                     
                       
                         α 
                         
                           3 
                           , 
                           1 
                         
                       
                     
                   
                   
                     
                       
                         α 
                         
                           0 
                           , 
                           2 
                         
                       
                     
                     
                       
                         α 
                         
                           1 
                           , 
                           2 
                         
                       
                     
                     
                       
                         α 
                         
                           2 
                           , 
                           2 
                         
                       
                     
                     
                       
                         α 
                         
                           3 
                           , 
                           2 
                         
                       
                     
                   
                   
                     
                       
                         α 
                         
                           0 
                           , 
                           3 
                         
                       
                     
                     
                       
                         α 
                         
                           1 
                           , 
                           3 
                         
                       
                     
                     
                       
                         α 
                         
                           2 
                           , 
                           3 
                         
                       
                     
                     
                       
                         α 
                         
                           3 
                           , 
                           3 
                         
                       
                     
                   
                 
                 ) 
               
               = 
               
                 ( 
                 
                   
                     
                       02 
                     
                     
                       01 
                     
                     
                       01 
                     
                     
                       03 
                     
                   
                   
                     
                       03 
                     
                     
                       02 
                     
                     
                       01 
                     
                     
                       01 
                     
                   
                   
                     
                       01 
                     
                     
                       03 
                     
                     
                       02 
                     
                     
                       01 
                     
                   
                   
                     
                       01 
                     
                     
                       01 
                     
                     
                       03 
                     
                     
                       02 
                     
                   
                 
                 ) 
               
             
           
         
       
     
         [0033]    The unique pair (δ j , c j ) in these mappings can be computed with a time complexity of 2 24 , provided that the inverse AES S-box and MixColumns coefficients are known. Indeed, given that two of α j,0  are 01, the other one is 02 and the last is 03, exactly two of δ j   −1  are equal. It is thus possible to get Λ δj  and then A 0 . The constant q i  of the affine mapping  r Q i,0  can be recovered at the same time. 
         [0034]    All  r Q i,j  can be recovered thanks to the mappings described above. As  r Q i,j =inv( r+1 P i,j ),  r+1 P i,j  is recovered at the same time. The subkey embedded in the T-box can then be extracted. 
       SUMMARY OF INVENTION 
       [0035]    In a first aspect, the invention is directed to a method for encrypting digital data using an iterative block cipher algorithm that is based on a Feistel network or on a substitution-permutation network. A device receives the digital data and performs a plurality of rounds of alterations on input data, wherein the plurality of rounds comprise a first round and a final round. Each round produces output data, and the input data for the first round is the digital data and the input data for any subsequent round is the output data of the round that precedes the subsequent round. Each round comprises: applying a first transformation function to the round input, wherein the first transformation function is a function that transforms at least one byte state of the round from a first representation to an equivalent cipher representation; 
         [0036]    encrypting the round input using the equivalent cipher representation and a key to obtain an encrypted value; and applying a second transformation function to the encrypted value to obtain the output data of the round, the second transformation function being the inverse of the first transformation function. Finally, the round output of the final round is 
         [0037]    output. 
         [0038]    It will be appreciated that in a symmetrical encryption algorithm, encryption is the same as decryption. 
         [0039]    In a first preferred embodiment, the iterative block cipher algorithm is implemented in the device as a white-box implementation. 
         [0040]    In a second preferred embodiment, the dual cipher has been randomly chosen from a predefined set of dual ciphers. It is advantageous that the iterative block cipher algorithm is AES and wherein, for at least one round, an S-box non-linear operation has been transformed using the first transformation function. Preferably, for at least one round, at least one of the linear or permutation operation has been transformed using the first transformation function. For at least one round, at least one round: sub-key may have been transformed using the first transformation function; at least one round sub-key may have been obtained from a main key represented in the dual cipher representation; and at least one round sub-key may have been obtained from a main key represented in the dual cipher representation. 
         [0041]    In a second aspect, the invention is directed to a device for performing a cryptographic computation on digital data, the cryptographic computation being encryption or decryption performed using an iterative block cipher algorithm based on a Feistel network or on a substitution-permutation network. The device comprises a processor adapted to: receive the digital data and perform a plurality of rounds of alterations on input data, wherein the plurality of rounds comprise a first round and a final round, wherein each round produces output data, and wherein the input data for the first round is the digital data and the input data for any subsequent round is the output data of the round that precedes the subsequent round. Each round comprises: applying a first transformation function to the round input, wherein the first transformation function is a function that transforms at least one byte state of the round from a first representation to an equivalent cipher representation; encrypting the round input using the equivalent cipher representation and a key to obtain an encrypted value; and applying a second transformation function to the encrypted value to obtain the output data of the round, wherein the second transformation function is the inverse of the first transformation function. The round output of the final round is then output. 
         [0042]    In a third aspect, the invention is directed to a computer program product storing thereon instructions that, when executed by a processor, performs the method the first aspect. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0043]    Preferred features of the present invention will now be described, by way of non-limiting example, with reference to the accompanying drawings, in which 
           [0044]      FIG. 1 , already described, illustrates a round of prior art before random bijections encoding; 
           [0045]      FIG. 2 , already described, illustrates obfuscation in White-box AES according to the prior art; 
           [0046]      FIG. 3  illustrates dual cipher decryption according to the prior art; 
           [0047]      FIG. 4  illustrates one of the four obfuscated mappings in a round according to the first preferred embodiment of the present invention; and 
           [0048]      FIG. 5  illustrates a cryptographic device according to a preferred embodiment of the present invention. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0049]    Billet&#39;s attack supposes that classical AES constants such as S-box values or MixColumns coefficients are known. In for example the MixColumns matrix, each column consists of the four numbers 01, 01, 02, 03, which is helpful in removing the obfuscations. A main inventive idea of the present invention is thus to make the S-box values and the MixColumns coefficients unknown to the attacker. The present invention can then thwart Billet&#39;s attack. 
         [0050]    AES is a block cipher system based on simple algebraic operations over the algebraic finite field GF(2 8 ). If we replace all the constants in Rijndael—of which AES is a subgroup—including replacement of the irreducible polynomial, coefficients of the MixColumns matrix, and affine transformation in the SubBytes, it is possible to create new dual ciphers of AES. It is mentioned by E. Barkan and E. Biham in “In How Many Ways Can You Write Rijndael?” Asiacrypt 2002, pp. 160-175, 2002, that 240 new dual ciphers of AES can be created. Although the intermediate values of a dual cipher during encryption or decryption are different from those of AES, a dual cipher has a security equivalent to that of AES. While these dual ciphers have been known for quite some time, they have, until now, been regarded as a kind of scientific curiosity without any real practical use. 
         [0051]    The outputs of AES and dual AES are also different but correlated, as shown in  FIG. 3  that illustrates dual cipher decryption. The correlation means that if P is the plaintext, K is the key, and encryption result (i.e. the ciphertext) with the original AES is C, then encrypting P′=f(P) under the key K′=f(K) using the dual cipher is necessarily f(C). According to this relation, it is possible to construct a white-box using a dual AES instead of the classical AES. 
         [0052]    A dual cipher for AES can be created either by modifying original AES constants or by changing the irreducible polynomial. An example of modification of constants is to raise the constants to their second power: affine transformation A.x+b of SubBytes operation is replaced by A 2 .x+b 2 . The polynomial mc(x)=03.x 3 +01.x 2 +01.x+02 of MixColumns can be replaced by mc(x)=05.x 3 +01.x 2 +01.x+04. There are eight possible modifications for a given irreducible polynomial, they raise constants to power 2, 4, 6, 16, 32, and 64. 
         [0053]    The irreducible polynomial in AES is used for the inverse computation in the S-box and also in the multiplication in MixColumns. There are 30 irreducible polynomials in GF(2 8 ). Due to the isomorphism of all fields of GF(2 8 ), AES can use any of the 30 irreducible polynomials. There are therefore 30*8=240 AES dual ciphers. To be compatible with original AES, the cleartext, the ciphertext and key must be modified trough a linear transformation f. This transforms an AES under an irreducible polynomial to another AES with another polynomial. The transformation is generally represented by a matrix R (f(x)=R.x where x is a vector representation under original AES polynomial). For example, if AES polynomial x 8 +x 4 +x 3 +x+1 is replaced by x 8 +x 4 +x 3 +x 2 +1 the invertible matrix R is: 
         [0000]    
       
         
           
             
               R 
               = 
               
                 
                   R 
                   
                     - 
                     1 
                   
                 
                 = 
                 
                   [ 
                   
                     
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         0 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                       
                         1 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                       
                         1 
                       
                     
                   
                   ] 
                 
               
             
             ; 
           
         
       
     
         [0054]    The inverse transformation is defined by f 1 (y)=R −1 .y 
         [0055]    The choice of irreducible polynomial in AES is arbitrary and from security perspective there is no advantage of using the original polynomial rather than any other existing polynomial. 
         [0056]    To counter Billet&#39;s attack, the idea is to choose randomly one of the 240 cipher dual AES to implement instead of the classical AES. This means that the values of the S-box and MixColumns coefficients are not fixed but vary depending on which dual cipher is used. 
         [0057]    In a first preferred embodiment, this is implemented by including f in the construction of the T-boxes. Random bijections are next added on top of the newly created T-boxes called  f T i,j . As the function ƒ operates on bytes, this gives the following relations: 
         [0000]        x←f ( x ) 
         [0000]        f   r   T   i,j ( x )= S   f ( x⊕   f   r   K   i,j )  r= 1, . . . ,9  i,j= 0, . . . ,3 
         [0000]        f   10   T   i,j ( x )= S   f ( x⊕   f   9   K   i,j )⊕ f   10   K   i,j    i,j= 0, . . . ,3
 
         [0058]      FIG. 4  illustrates one of the four obfuscated mappings in a round according to the first preferred embodiment of the present invention. 
         [0059]    In the prior art white-box implementation, i.e. the one provided by Chow et al., the unique pair (δ j , c j ) can be computed with time complexity of 2 24 . When a random dual cipher is used, to compute (β j , c j ), all 240 possible values of S-box and MixColumns coefficients have to be tested. This raises the complexity to 2 32 . 
         [0060]    While the solution of the first preferred embodiment increases the complexity of the attack, it does not prevent recovery of the AES master key, as the operation in step 5 of the attack still is possible. The second preferred embodiment described hereinafter provides a better countermeasure. 
         [0061]    To be more resistant to Billet&#39;s attack, it is possible to use a plurality of dual AES and integrate their parameters into the same white-box AES implementation. This may be done using a different dual AES for each round of the encryption process. In the following, a round of a dual AES is called a “dual round”. 
         [0062]    As in the first preferred embodiment, a main idea is to choose randomly  10  dual ciphers amongst the 240 available. Let (f 1 , f 2 , . . . , f 10 ) be the linear transformations associated with the chosen dual AES. 
         [0063]    Also, consider AES as a composition of 10 rounds as follows: 
         [0000]    
       
      
       E=R 
       1 
       ∘R 
       2 
       ∘ . . . ∘R 
       9 
       ∘R 
       10  
      
     
         [0064]    The idea is thus to compose  10  dual rounds in the same AES implementation wherein the rounds preferably are different. This may be done by first taking a round operations R i  in each dual cipher E (k) . Let  k R i  be round i of dual cipher E (k) . The idea is to apply a state transformation for a round in the previous round. The mechanism is based on an input-decoding-output-encoding paradigm, performed by applying the inverse transformation of a round output followed by the linear transformation for the input of next dual round. Therefore, both the inverse transformation f k   −1  and the transformation f k+1  are applied in round  k R i : 
         [0000]    
       
         
           
             E 
             = 
             
               
                 
                   
                     
                       R 
                       1 
                         
                         
                       1 
                         
                     
                     ∘ 
                     
                       f 
                       1 
                       
                         - 
                         1 
                       
                     
                     ∘ 
                     
                       f 
                       2 
                     
                   
                    
                 
                 
                   DT 
                   1 
                 
               
               ∘ 
               
                 
                   
                     
                       R 
                       2 
                         
                         
                       2 
                         
                     
                     ∘ 
                     
                       f 
                       2 
                       
                         - 
                         1 
                       
                     
                     ∘ 
                     
                       f 
                       3 
                     
                   
                    
                 
                 
                   DT 
                   2 
                 
               
               ∘ 
               … 
               ∘ 
               
                 f 
                 9 
               
               ∘ 
               
                 
                   
                     
                       R 
                       9 
                         
                         
                       9 
                         
                     
                     ∘ 
                     
                       f 
                       9 
                       
                         - 
                         1 
                       
                     
                     ∘ 
                     
                       f 
                       10 
                     
                   
                    
                 
                 
                   DT 
                   9 
                 
               
               ∘ 
               
                 
                   
                     
                       R 
                       10 
                         
                         
                       10 
                         
                     
                     ∘ 
                     
                       f 
                       10 
                       
                         - 
                         1 
                       
                     
                   
                    
                 
                 
                   DT 
                   10 
                 
               
             
           
         
       
     
         [0065]    AES then becomes a composition of 10 dual look-up tables DT i . 
         [0066]    The implementation of the white-box is preferably performed by including f k  in the construction of the T-boxes. 
         [0000]        x←f   1 ( x ) 
         [0000]        k   r   T   i,j ( x )= f   k+1 ( f   k   −1 ( S   k ( x⊕   k   r   K   i,j )))  r= 1, . . . ,9  i,j= 0, . . . ,3 , k= 1 
         [0000]        10   10   T   i,j ( x )= f   10 ( f   9   −1 ( S   9 ( x⊕   9   9   K   i,j )⊕ 10   10   K   i,j    i,j= 0, . . . ,3
 
         [0067]    Random bijections are then added on top of the newly created T i,j  boxes. 
         [0068]    One of the advantages of this solution is that the keys of two consecutive rounds are not correlated. The AES key schedule is based on the S-box value and other constants, and each dual cipher has its own different constants. From the same master key, different subkeys are thus derived for the different dual AES. 
         [0069]    Supposing that an attacker manages to guess one dual round, i.e. he knows the S-box and MixColumns coefficients. Then he is able to perform step 1 to step 4 of the attack (with time complexity of at least 2 24 ) and get a shuffled subkey. However, the bytes of a subkey round cannot be reconstructed correctly as the attacker has no way of testing it (since the subkeys of two consecutive rounds are not correlated). To obtain the correct subkey, the attacker has to repeat the attack of Billet twice for all possible combinations of dual ciphers. Billet&#39;s attack would hence require at least 2 16  more computation steps and thus the complexity of the entire attack becomes 2 46 . 
         [0070]    It has thus been shown how to implement 10 different dual rounds in the same white-box AES. The skilled person will appreciate that it is possible to use even more dual ciphers. 
         [0071]    In the following is provided a generalization of the construction that provides a better resistance against the attacks. It has been shown hereinbefore how to implement 10 different dual ciphers in the same white-box implementation. Indeed, the dual cipher was changed at the round level (to ease the description). It is however possible to use even more dual ciphers. Since each 4 byte round output depends only on the 4 byte round input, a different dual AES cipher may be used for each of the four mappings in a round, which means that up to 4*10=40 different dual ciphers can be used in a given white-box AES implementation. If y i  is the i-th output byte of round r, then: 
         [0000]        y   0   ,y   4   ,y   8   ,y   12 , depend on  x   0   ,x   1   ,x   2   ,x   3    
         [0000]        y   1   ,y   5   ,y   9   ,y   13 , depend on  x   4   ,x   5   ,x   6   ,x   7    
         [0000]        y   2   ,y   6   ,y   10   ,y   14 , depend on  x   8   ,x   9   ,x   10   ,x   11    
         [0000]        y   3   ,y   7   ,y   11   ,y   15 , depend on  x   12   ,x   13   ,x   14   ,x   15    
         [0072]    Without loss of generality, f σ     0     r , . . . f σ     9     r  are the four different transformation matrices associated to the dual ciphers used in round r. As data are shifted (to implement InvShiftRows) as input to type III tables, care should be taken as to which product f×f −1  to combine with which T-boxes of the next round to have the correct input state. The T-boxes were built as follows: 
         [0000]        r   T   i,j ( x   4i+j )= f   σ     i     r+1 (( f   σ     j     r ) −1 ( S   i   σ     i   ( x   4i+j ⊕ r   K   i,j)))    r= 1, . . . ,9  i,j= 0, . . . ,3,
 
         [0000]        10   T   i,j ( x   4i+j )= f   σ     i     10 (( f   σ     i     10 ) −1 ( S   i   σ     i   ( x   4i+j ⊕ 9   K   i,j))⊕   10   K   i,j   i,j= 0, . . . ,3
 
         [0000]    where  r K i,j=f   σ     i     r ( r K i,j ),  10 K i,j=f   σ     i     10 ( 10 K i,j ), S i   σ     i    for i=0, . . . ,3 are modified from original SubBytes according to the matrix representing f σ     i     r  for the round r. It can be noted that the product f σ     i     r+1 ×(f σ     i     r ) −1  changes for each of the 16 tables in a round r, for r in [1.9]. 
         [0073]    In the case of Billet et al. attack, an attacker would need to put each 4 bytes output in the standard AES state. To do so, he has to check 240 4  combinations. The complexity for recovering mixing bijections for a round would then be 4*4*2 25 *2 31 =2 60 . For two rounds, the complexity is bounded by 2 61  computation steps. 
         [0074]      FIG. 5  illustrates a cryptographic device according to a preferred embodiment of the present invention; in other words, the device is adapted to encrypt and decrypt data using any of the encryption algorithms described hereinbefore. The device  100  comprises at least one interface unit  110  adapted for communication with other devices (not shown), at least one processor  120  and at least one memory  130  adapted for storing data. The processor  120  is adapted to perform dual AES cryptographic operations according to any of the first and second embodiments of the inventive methods, as previously described herein. A computer program product  140  such as a CD-ROM or a DVD comprises stored instructions that, when executed by the processor  120 , performs the method according to any of the embodiments of the present invention. 
         [0075]    It will thus be appreciated that the present invention can offer a white-box AES implementation that is more secure than the prior art solutions. It will also be appreciated that the present invention is limited to neither white-box implementations nor AES, but that other implementations and encryption algorithms may also be used. 
         [0076]    While the invention has been described for AES as a non-limitative, preferred example, the skilled person will appreciate that while the invention may also be used in other iterative block cipher encryption algorithms, such as those based on a Feistel network (e.g. DES, IDES, RC5 and IDEA) or, like AES, on a substitution permutation network (e.g. Serpent). 
         [0077]    Each feature disclosed in the description and (where appropriate) the claims and drawings may be provided independently or in any appropriate combination. Reference numerals appearing in the claims are by way of illustration only and shall have no limiting effect on the scope of the claims.