Abstract:
The invention relates to a method of dual-stage scrambling of addresses (LogAdr) with which a central processor ( 10 ) accesses a memory ( 13 ). A first encryption logic ( 11 ) applies a fixed, unchangeable key (KEY 1 ), whereas a second encryption logic ( 12 ) applies a changeable second key (KEY 2 ) stored in the memory ( 13 ). The configuration data written during the initialization phase of the central processor ( 10 ) are preferably stored in a special configuration range which is accessed via a bypass ( 15 ) while bypassing the second encryption logic ( 12 ). The bypass is activated by a bypass logic ( 14 ) which compares the addresses (Cipher  1 ) encrypted in the first stage with values (SecRowCipher 1 , SecRowCipher 2 ) stored during the initialization phase.

Description:
FIELD OF THE INVENTION  
         [0001]    The invention relates to a method of protecting data transmission between a central processor and a memory, in which the logic addresses supplied by the central processor are encoded with a first, unchangeably stored key. The invention also relates to a data processing unit comprising a central processor which is connected to a store via address lines and data lines, and a first encryption logic arranged in the address lines which encodes the logic addresses supplied by the central processor with a first, unchangeably stored key.  
         BACKGROUND OF THE INVENTION  
         [0002]    There is a connection between a central processor and a memory in almost all data processing systems. To protect the data in the memory from abuse, it is known to store them in an encrypted form. A dynamic method of encrypting the data stored in a memory is described in, for example, U.S. Pat. No. 5,987,572. In this method, the data are encoded with a changeable key which, however, requires a considerable computation effort.  
           [0003]    Moreover, encryption methods, particularly for smart cards are known. Smart cards are increasingly used as cheque cards, money cards, identity cards or the like as carriers of security-relevant data and have a non-volatile memory whose contents are also maintained after switching off the processor, or without any external current supply. In the known encryption methods for smart cards, the addresses of the memory are scrambled by means of a key stored in the hardware or permanently in ROM memories. This means that the logic addresses of a data supplied or used by the central processor are copied in a one-to-one relation by means of the key on another address under which the data is then physically present in the memory. It is true that this method is proportionally simple but it has the drawback that a scrambling once analyzed and decrypted is transferable to all systems of the same type or of the same ROM code. A single abusive decryption therefore jeopardizes the security of a multitude of smart cards. Furthermore, it is a drawback that the entire contents must be erased to make the memory contents unusable because data in the memory can always be retraced from the same (scrambled) address.  
         OBJECT AND SUMMARY OF THE INVENTION  
         [0004]    It is therefore an object of the present invention to provide a method and a data processing unit offering greater protection of the data in the memory associated with a central processor.  
           [0005]    This object is solved by a method as defined in claim  1  and by a data processing unit as defined in claim  7 . Advantageous embodiments are defined in the dependent claims.  
           [0006]    The method is used for protecting data transmission between a central processor and a memory and particularly prevents the data in the memory from being read and used abusively. In the method, the logic addresses of data used and supplied by the central processor are encoded with a first, unchangeably stored key. This first key can be stored, for example, in a hardware configuration or in ROM memories (including EPROM, EEPROM, etc.). The method is further characterized in that at least a part of the addresses encoded with the first key is encoded a second time with a second, changeably stored key.  
           [0007]    The second encryption of the addresses with a changeable key has the advantage that the data can be individually encrypted for each data processing system of this type by providing an individual second key. Even when the first encryption stage or the first key were deciphered in an abusive attack, the data could not be decoded by all systems of the same type with the same first key because these data are each time scrambled with a different, second key. The method thus provides a considerably greater protection of the data stored in the memory.  
           [0008]    Moreover, the method also has the advantage that the contents of the memory can be made unusable by changing or overwriting the changeable second key. This is possible without having to erase the whole memory or overwrite it with random numbers.  
           [0009]    In accordance with a further embodiment of the method, the memory is logically divided into a configuration range and a useful data range, in which the access to the configuration range is only encoded with the first key, whereas the access to the useful data range is additionally encoded with the second key. As the name “configuration range” already indicates, the data which are relevant for the configuration of the data processing system or the central processor are preferably stored in this range. In this way, the processor can have access without knowing or using the second key. This is particularly advantageous when initializing the central processor because the configuration data are then always found at the same site which is independent of the second key.  
           [0010]    In a memory subdivided as described above, the second key is preferably stored in the configuration range. When the central processor is initialized, it can then be read from this range and subsequently be used for the second encoding operation. No additional memory is necessary for storing the second key, which is advantageous particularly in the case of smart cards.  
           [0011]    In accordance with a further embodiment of the method, those logic addresses that, upon consecutive encoding with initially the first and then the second key, assume values which correspond to the addresses of the configuration range that have been encoded with the first key only, are encoded once more with the second key before access to the memory. This method has the following background. Since only the first key is used when the configuration range is stored in the memory, this range collides with addresses in the memory which, after encoding with both the first and the second key, are stored at the same site. To prevent this collision and thereby a loss of data, the second key is applied a second time to the last-mentioned addresses so that these addresses are passed on to those free sites that would have been assumed by the configuration range upon application of a first and a second encryption.  
           [0012]    The encoding operations by means of the first and the second key are preferably defined in such a way that the identity is obtained in the case of dual application of the first encoding operation or dual application of the second encoding operation. Any encoding function thus simultaneously represents its own inverse value.  
           [0013]    In accordance with a further embodiment of the invention, the second key and/or values from which addresses to be encoded with only the first key can be recognized are read or computed during the initialization of the central processor. The initialization phase of the central processor can thus proceed identically in all of its systems which are equal in their hardware and the permanently stored configurations, but individual data are generated and stored for each system during the initialization phase, which data subsequently ensure an individual encryption.  
           [0014]    The invention also relates to a data processing unit comprising a central processor which is connected to a memory via address lines and data lines. The data processing unit also comprises a first encryption logic arranged in the address lines, which encodes the logic addresses supplied by the central processor with a first, unchangeably stored key. The data processing unit is characterized in that it comprises a second encryption logic arranged in the address lines, which encodes the addresses encoded with the first key at least partly a second time with a second, changeably stored key. Such a data processing unit may be particularly a smart card.  
           [0015]    The data processing unit has the advantage that it allows an individual encryption or scrambling of data in the memory, independent of the second key. The abusive decryption of the first encryption logic with the first key thus does not automatically provide access to the data of all, similar data processing units. Each data processing unit would rather require the second key for such an access.  
           [0016]    The data processing unit is further preferably designed or adapted in such a way that a method of the type described hereinbefore can be performed with this unit.  
           [0017]    The data processing unit may particularly comprise a bypass logic which receives the (logic) addresses generated and/or used by the first encryption logic as input, and activates a bypass of the second encryption logic when these addresses correspond to predetermined values. By means of the bypass logic, the second encryption can thus be selectively switched off. This is particularly useful when applying a configuration range as described above, which should be encrypted with the first encryption logic only. 
       
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0018]    These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.  
         [0019]    In the drawings:  
         [0020]    [0020]FIG. 1 shows diagrammatically the components of a data processing unit according to the invention;  
         [0021]    [0021]FIG. 2 shows diagrammatically the addresses in different encryption stages. 
     
    
     DESCRIPTION OF EMBODIMENTS  
       [0022]    [0022]FIG. 1 shows the essential components of a data processing unit  100  comprising a central processor  10  and a memory module  13  connected thereto. The unit may be particularly a smart card  100  in which the memory  13  is a non-volatile memory storing, for reasons of costs, both program codes and data and control data and configuration parameters to be specially protected.  
         [0023]    To protect the contents of the memory  13  from a physical analysis, it is known to encode the logic addresses LogAdr used by the central processor  10  and provided on the address lines via a first encryption logic  11 . The logic addresses LogAdr are transformed as a one-to-one copy C 1  to addresses “Cipher 1 ” by means of a key KEY 1  stored in the hardware configuration or in a ROM memory. The data or addresses transmitted via the data line  19  are thus scrambled before they are stored in the memory  13 .  
         [0024]    Since the known systems with only one encryption logic  11  using a fixed key KEY 1  do not provide individual protection of the data in the memory  13 , a second encryption logic  12  is arranged according to the invention in the address line between the first encryption logic  11  and the memory  13 . The second encryption logic  12  uses a second key KEY 2  for its one-to-one transformation C 2 . In contrast to the first key KEY 1 , this key is not fixed but is stored in a changeable form in the memory  13 . The value of the second key KEY 2  is read from the memory  13  during the initialization via the data line  19 .  
         [0025]    The sequential application of the first encryption C 1  and the second encryption C 2  thus ensures a scrambling of the addresses LogAdr to physical memory addresses PhyAdr in the memory  13  which can be predetermined individually via the second key KEY 2  for each smart card  100 .  
         [0026]    During the initialization phase of the central processor  10 , the second encryption logic  12  is preferably switched off in order that the configuration data of the central processor are always found at the same sites of the memory  13  predetermined by the first encryption logic  11  and the first key KEY 1 . Such a “fixed” location of the configuration range also provides the possibility of reading the second key KEY 2  from the memory  13  only during the initialization so that it is subsequently available for the encryption logic  12 .  
         [0027]    To be able to access the configuration range in the memory module  13  while bypassing the second encryption logic  12 , the data processing unit  110  comprises a bypass  15  which bypasses the second encryption logic  12 , and a bypass logic  14  which can selectively switch the bypass  15  on and off. Via a line  16 , the input of the bypass logic  14  receives the current address Cipher 1  encrypted by means of the first encryption logic  11 . This value is compared with the two stored values SecRowCipher 1  and SecRowCipher 2 . In so far as Cipher 1  is equal to one of the two stored values, the bypass logic  14  activates the bypass  15  so that the memory  13  is accessed while bypassing the second encryption logic  12 .  
         [0028]    The two above-mentioned stored addresses SecRowCipher 1  and SecRowCipher 2  are stored via the connection lines  17  and  18  during the initialization of the central processor  10 . The initialization proceeds as follows.  
         [0029]    Initially, the second encryption logic  12  stores the second key KEY 2  read from the configuration range of the memory  13  during the initialization in a local memory. During the overall initialization phase, the bypass  15  is activated so that the memory  13  is accessed only via the first encryption logic  11  with the addresses PhyAdr=Cipher 1 . By the end of the initialization phase, the second encryption logic  12  then stores both the Cipher 1  addresses of the configuration range generated with the first key KEY 1  in accordance with SecRowCipher 1  and the Cipher 2  addresses of the configuration range generated with the second key KEY 2  in accordance with SecRowCipher 2 . This is effected while the bypass  15  is activated.  
         [0030]    After ending the initialization phase, the bypass  15  is then generally deactivated so as to basically apply scrambled codes C 1  and C 2  to the memory addresses LogAdr.  
         [0031]    Only when the bypass logic  14  recognizes one of the two addresses SecRowCipher 1  or SecRowCipher 2  stored during the initialization phase as Cipher 1  addresses at its input, does it activate the bypass  15  for this access so that the second encryption logic  12  is bypassed. The addresses of the configuration range are thus not affected by the second scrambling copy C 2 .  
         [0032]    [0032]FIG. 2 diagrammatically shows the scrambled codes or copies of addresses in the data processing system  100  shown in FIG. 1.  
         [0033]    The logic addresses LogAdr are first converted by the first encryption logic  11  with the copy C 1  into an address Cipher 1 . By using the second encryption logic  12  with the copy C 2  an address Cipher 2 , which is encrypted twice, is generated from each of these addresses Cipher 1 , which address Cipher 2  indicates a physical memory location PhyAdr of the memory.  
         [0034]    If the copies C 1  and C 2  were used consecutively for all logic addresses LogAdr, a one-to-one scrambling of these addresses in the address location PhyAdr of the memory would take place.  
         [0035]    However, it is desirable for the reasons mentioned above to provide a configuration range K in the logic address location, which is copied to a range K′ in the memory only by means of the first scrambled code C 1 . This is achieved in the data processing unit  100  of FIG. 1 in that the bypass logic  14  ensures that the second encryption logic  12  is bypassed when it recognizes the C 1 -encrypted addresses of the configuration range, i.e. SecRowCipher 1  at its input.  
         [0036]    The range K′ of the memory, in which the configuration range K is copied by single application of the first encryption C 1  would normally be occupied by another range X of the logic address location LogAdr due to the sequential application of the first encryption C 1  and the second encryption C 2 . To prevent this collision, said range X is copied in the free range K″=X″ of the memory in which the configuration range K would be located upon sequential application of the first encryption C 1  and the second encryption C 2 . This is effected in that the range X of the logic address location is copied by the first encryption C 1  and a dual application of the second encryption (C 2 ) 2 .  
         [0037]    The above-mentioned displacement of the range X is considerably simplified when the second encryption C 2  is its own inverse so that the identity is obtained upon dual application. In this case, the dual application of the second encryption (C 2 ) 2  can be dispensed with and the range X—likewise as the configuration range K—should be copied in the memory with the first encryption C 1  only. The bypass logic  14  of the data processing unit  100  of FIG. 1 recognizes this situation in that the address SecRowCipher 2  is present at its input, which address corresponds to the address of the configuration range K″ in the memory, obtained when applying the first encryption C 1  and the second encryption C 2  to the configuration range K.  
         [0038]    The method shown by way of example with reference to the Figures has the advantage that the scrambling of user data can be changed any time, for example, when personalizing the memory  13  for the client, by programming the second key KEY 2  in the configuration range so that it can be supplied individually. This makes efforts of abusive examination considerably more difficult because each system has its individual scrambled code which cannot be transferred to other systems. Moreover, each manipulation in the configuration range of the memory  13  changing the second key KEY 2  leads to an immediate change of the scrambled code of the useful data range and hence to unusable user data, which is comparable with a memory initialization by means of random data. However, this additional scrambling mechanism for the useful data range does not affect the secure access to the configuration range of the memory  13  during the initialization phase.  
         [0039]    Reference Signs:  
         [0040]    [0040] 100  data processing unit  
         [0041]    [0041] 10  central processor  
         [0042]    [0042] 11  first encryption logic  
         [0043]    [0043] 12  second encryption logic  
         [0044]    [0044] 13  memory  
         [0045]    [0045] 14  bypass logic  
         [0046]    [0046] 15  bypass  
         [0047]    [0047] 16  line  
         [0048]    [0048] 17 ,  18  initialization line  
         [0049]    [0049] 19  data line  
         [0050]    LogAdr logic address  
         [0051]    Cipher 1  once encrypted address  
         [0052]    Cipher 2  twice encrypted address  
         [0053]    KEY 1 , KEY 2  keys  
         [0054]    PhyAdr physical address  
         [0055]    K configuration range  
         [0056]    C 1  first scrambled code  
         [0057]    C 2  second scrambled code