Abstract:
A method for protecting a control device against manipulation in which a number of key sentences for decoding cryptographic functions is provided, a key switch being additionally provided, via which the cryptographic functions access key sentences.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a method for protecting a control device against manipulation, a method for executing cryptographic functions in a control device, and a control device for executing cryptographic functions. 
       BACKGROUND INFORMATION 
       [0002]    Frequently, embedded systems are attacked in order to manipulate them, for example, in order to increase the performance of an internal combustion engine by exchanging programs or data. Algorithms and methods have therefore been developed to protect embedded systems (ES) from being manipulated by third parties unauthorized to do so. To this end, cryptographic functions, for example, that are based on symmetric or asymmetric key sentences are implemented in digital circuits in order to increase security. The use of OTP (one-time programmable) and ROM memory areas or switches (“fuses”) in digital circuits, such as, for example, microcontrollers, is also known. 
         [0003]    A control device and method are described, for example, in German Patent No. DE 10131576. In the described microprocessor system and method, a check program is provided in a read-only memory, which check program is in a position to check the content of a rewritable memory for impermissible modifications. In the method, the central processing unit is first put in a position to carry out input and output operations that are necessary for the processing of instructions. After executing such a minimum program, or a boot routine of that kind, a code word, such as a check sum, is determined from at least a portion of the data in a rewritable memory. 
         [0004]    A code word may be determined using more or less complicated mathematical encryption methods that do not permit an unauthorized person without exact knowledge of the encryption algorithm to determine the code word from the content of the rewritable memory. 
         [0005]    Then the system compares the code word that was determined in this way to a comparison code word that is saved, for example, in the rewritable memory. If the code word and the comparison code word match each other, the program continues. If the code word and the comparison code word do not match, further operation of the microprocessor system is blocked. An authorized user who wants to modify the content of the rewritable memory thus determines, with the encryption algorithm that is known to him alone, a comparison code word from the program to be stored in the memory and then stores this in the memory. After executing the check program, the microprocessor system will then operate properly. An unauthorized modification of the memory content of the rewritable memory fails due to the fact that the encryption algorithm is not known, so that it is not possible to store a correct comparison code word in the rewritable memory. The check program recognizes that the code word and the comparison code word are different and blocks the microprocessor system from processing additional tasks. 
       SUMMARY OF THE INVENTION 
       [0006]    The present invention relates to a method for protecting a control device from being manipulated in which a number of key sentences is provided for decoding data via cryptographic functions, a key switch being additionally provided via which the cryptographic functions access key sentences. 
         [0007]    To increase security, the present invention thus provides that a key switch enables an assignment of cryptographic functions to corresponding key sentences, the key sentences being encapsulated and thereby protected against manipulation. The present invention thus makes it possible to hinder or prevent attacks on key sentences that are in use. 
         [0008]    Increasingly, for various reasons, digital circuits/microcontrollers provided with a low memory capacity or even having no program memory at all are being used in embedded systems (ES). In principle, systems having such digital circuits/microcontrollers have weak points from the perspective of protection against manipulation. For motor vehicles, the performance of an internal combustion engine, for example, could be increased by exchanging programs or data in a rewritable memory. This performance improvement through manipulation of the control program or the data may, however, result in an overloading of the internal combustion engine and ultimately even lead to a defect in the internal combustion engine. 
         [0009]    Using the control device and the method of the present invention, it is possible to implement a secured but still configurable key storage in an ES and thereby to increase the protection against manipulation. 
         [0010]    The present invention also relates to a method for executing cryptographic functions in a control device in which the cryptographic functions use assigned key sentences to decode data, the assignment of the cryptographic functions to the assigned key sentence in each instance being performed via a provided key switch. 
         [0011]    The present invention furthermore relates to a control device, which has a first memory area for recording key sentences for decoding data. The control device has a second memory area for recording a key switch that enables an assignment of cryptographic functions to corresponding key sentences. 
         [0012]    In the control device and method according to the present invention, the key sentences are encapsulated and thereby protected against manipulation. It is possible to configure various key sentences for different applications. For reasons of manipulation protection, this configuration is allowed only once, for example, in the production of the ES. To encapsulate the key sentences, the control device of the present invention has a key switch that enables an assignment of cryptographic functions to corresponding key sentences. 
         [0013]    The key switch is stored in an OTP memory area so that the key switch may no longer be modified. The key switch makes it possible, depending on the programmed configuration of the key sentences (for example, through OTP memory cells, so-called “fuses”), to refer to different memory locations when accessing the key array. 
         [0014]    A ROM key memory area may be populated only by the manufacturer of the digital circuit/microcontroller. Typically, multiple memory locations as well as one identification exist. 
         [0015]    An internal or external program memory may, among other things, include the cryptographic functions that access the key sentences via the key switch. To increase protection, these may be stored in the internal flash and, in the ideal case, be stored there in a ROM. 
         [0016]    Each cryptographic function may access the key sentences transparently via the key switches. Different key sentences are provided in order to be able to configure another sentence, for example, in the case of a compromised key sentence, without having to modify the ROM of the key memory. 
         [0017]    The position of the key switch is set in the OTP key configuration, for example, during the production of the ES, and after this can never again be modified (for example, by an attacker). 
         [0018]    The cryptographic functions check, via the existence of the key switch as well as the identification information in the key array or the key field, whether the digital circuit/microcontroller even offers this feature in the correct version. If not, then the suspicion exists that an attacker exchanged the digital circuit/microcontroller with a module not having these functions or for another (old) key sentence. 
         [0019]    The present invention furthermore relates to a computer program having program code means for executing one of the described methods, and a computer program product having these code means stored on a computer-readable medium. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0020]      FIG. 1  shows a schematic representation of a control device according to the present invention in accordance with a preferred specific embodiment. 
           [0021]      FIG. 2  shows a method according to the present invention in accordance with a preferred specific embodiment in a flow chart. 
       
    
    
     DETAILED DESCRIPTION 
       [0022]      FIG. 1  shows a control device  11 , which includes a digital circuit/microcontroller  10 , a key switch  12 , a key memory  14 , and an internal program memory  16 . An external memory area  18  is additionally shown. In different specific embodiments of the present invention, control device  10  has an internal or external program memory  16 ,  18  or an internal and external program memory  16 ,  18 . 
         [0023]    Key memory  14  is a ROM memory area. Different key sentences  24 ,  26  are stored in this memory area  14 . A piece of identification information  22  also exists. 
         [0024]    ROM key memory area  14  may be populated only by the manufacturer of control device  10 , so that key sentences  24 ,  26  may no longer be manipulated at a later point in time. It is possible to configure different key sentences  24 ,  26  for different applications. Different key sentences  24 ,  26  are provided in order to be able to configure another sentence, for example, in the case of a compromised key sentence  24 ,  26 , without having to modify the ROM of key memory  14 . 
         [0025]    Key switch  12  enables an assignment of cryptographic functions to corresponding key sentences  24 ,  26  and may be stored in an OTP memory area so that it may not be manipulated. Depending on the programmed configuration of key sentences  24 ,  26 , key switch  12  makes it possible to refer to different memory locations when accessing the key array. 
         [0026]    Internal and external program memories  16 ,  18  include among other things cryptographic functions  28 ,  30 , which access key sentences  24 ,  26  via key switch  12 . To increase protection, these may be located in the flash, and in the ideal case, be located there as ROM. 
         [0027]    Each cryptographic function  28 ,  30  may transparently access key sentences  24 ,  26  via key switch  12 , in order to decode the cryptographic functions  28 ,  30 . 
         [0028]    Cryptographic functions  28 ,  30  check, via the existence of key switch  12  as well as identification information  22  in the key array, whether control device  10  even offers this feature or characteristic in the correct version. If not, then the suspicion exists that an attacker exchanged control device  10  with a module not having these functions or having other (old) key sentences. 
         [0029]      FIG. 2  shows a method in which for the execution of a cryptographic function in a control device, cryptographic function  28  and/or  30  first decodes data  32  using assigned key sentence  14 , the assignment of cryptographic functions  28 ,  30  to the assigned key sentences taking place via a provided key switch  12 . 
         [0030]    Cryptographic function  28  may be stored in an internal ROM/OTP/Flash or RAM program memory. To increase protection, these are located in the internal flash, and in the ideal case, are located there as ROM. 
         [0031]    Cryptographic function  30  may also be stored in an external program memory. In this example, an OTP memory area is provided for recording key switch  12 .