Abstract:
A circuit includes a first processing unit and a second identical processing unit. A first communication bus passes encrypted data between one of a plurality of functions and one or both of the first and second processing units. A selection circuit determines whether the encrypted bus is coupled to the first processing unit, the second processing unit, or both of the first and second processing units.

Description:
[0001]    This application claims the priority benefit of French Patent application number 15/60821, filed on Nov. 12, 2015. 
       BACKGROUND 
       [0002]    Technical Field 
         [0003]    The present disclosure generally relates to electronic circuits and, more specifically, to microcontrollers or processing units manipulating encrypted information (data, instructions, addresses, etc.). The present disclosure more specifically relates to the protection of such a processing against fault-injection attacks. 
         [0004]    Description of the Related Art 
         [0005]    In many applications, processing units, for example, central processing units (CPU) of microcontrollers, manipulate information which are stored in encrypted fashion in volatile or non-volatile memories external to the processing unit or exchanged in encrypted fashion with other circuits or functions. 
         [0006]    Since it is encrypted in the memories, the information is protected. However, to be processed, be it data, addresses, or instructions, the information should be decrypted by the processing unit. The processing results are, before being output by the processing unit (to be stored or communicated to another function), encrypted by the processing unit. 
         [0007]    The fact for the information to be manipulated in non-encrypted fashion by the processing unit is a weakness in the protection. 
         [0008]    To attempt overcoming this problem, it has already been provided to use an additional processing unit having the function of executing in parallel the same operations as the main processing unit, and of comparing certain results provided by the two processing units. In case of a divergence, this means that the main processing unit has been submitted to an attack, typically a fault injection, and the system may react, for example, by blocking the communication of the information to the outside. 
         [0009]    However, in case of a fault injection on the verification elements or of multiple faults, these solutions appear to be insufficient. 
         [0010]    There thus is a need to improve the protection of encrypted information during the unencrypted execution thereof by a processing unit. 
         [0011]    The subject matter discussed in the Background section is not necessarily prior art and should not be assumed to be prior art merely as a result of its discussion in the Background section. Along these lines, the recognition of one or more problems in the prior art discussed in the Background section and the subject matter associated therewith should not be treated as prior art unless expressly stated to be prior art. Instead, the discussion in the Background section encompassing one or more recognized problems in the prior art should be treated as part of the inventor&#39;s approach to the particular problem, which in and of itself may also be inventive. 
       BRIEF SUMMARY 
       [0012]    An embodiment overcomes all or part of the disadvantages of usual solutions of protection of information manipulated by processing units. 
         [0013]    An embodiment provides a solution which is efficient against multiple fault injection attacks in a duplicated processing unit system. 
         [0014]    An embodiment provides a solution compatible with current modes of communication of information outside of the processing unit, be it for storage or a processing by another function. 
         [0015]    Thus, an embodiment provides a circuit comprising a first processing unit and a second identical processing unit; a first encrypted bus of communication with one of a plurality of functions; and a selector of connection of said first bus to the first and second units. 
         [0016]    According to an embodiment, the selector selectively transmits, to the first bus, information originating from the first or from the second processing unit. 
         [0017]    According to an embodiment, the selection is random. 
         [0018]    According to an embodiment, the selection is under control of a user. 
         [0019]    According to an embodiment, the selection is a function of the processing carried out by the processing units. 
         [0020]    According to an embodiment, the selector transmits in parallel to the first and second processing units information originating from the first bus. 
         [0021]    According to an embodiment, the circuit further comprises a module for comparing information processed by the first and second processing units. 
         [0022]    According to an embodiment, the function(s) include volatile and/or non-volatile memories storing encrypted information. 
         [0023]    The foregoing and other features and advantages will be discussed in detail in the following non-limiting description of specific embodiments in connection with the accompanying drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS 
         [0024]    Non-limiting and non-exhaustive embodiments are described with reference to the following drawings, wherein like labels refer to like parts throughout the various views unless otherwise specified. One or more embodiments are described hereinafter with reference to the accompanying drawings in which: 
           [0025]      FIG. 1  schematically shows in the form of blocks a usual embodiment of a system with a duplicated processing unit; and 
           [0026]      FIG. 2  schematically shows in the form of blocks an embodiment of an electronic circuit of duplicated processing unit microcontroller type. 
       
    
    
     DETAILED DESCRIPTION 
       [0027]    The same elements have been designated with the same reference numerals in the different drawings. In particular, the structural and/or functional elements common to the different embodiments may be designated with the same reference numerals and may have identical structural, dimensional, and material properties. For clarity, only those steps and elements which are useful to the understanding of the described embodiments have been shown and will be detailed. In particular, the applications of the executed processings or of the circuits executing them have not been detailed, the described embodiments being compatible with usual applications. When reference is made to terms “about”, “approximately”, or “in the order of”, this means to within 10%, preferably to within 5%. 
         [0028]      FIG. 1  is a block diagram of an example of a microcontroller equipped with two processing units  1  and  2  executing the same operations in parallel. 
         [0029]    One of the processing units is the useful or master unit (MASTER), that is, unit  1  carries out the processings which are taken into account. The other processing unit  2  is a replica (REPLICA) of master unit  1  and executes the same processings but only for verification purposes. Various signals originating from master and replica units  1  and  2  are processed by a verification module  3  (VERIF). The module delivers one or a plurality of signals SECUM for validating the identity of the processings carried out. 
         [0030]    Units  1  and  2  receive in parallel the same information from a bus  4  conveying encrypted information originating from various functions, for example, from volatile storage elements  5  (VM), non-volatile storage elements  6  (NVM), or other functions  7  (FCT) internal or external to the microcontroller containing units  1  and  2 . Elements  5 ,  6 , and  7  may contain clear information (non-encrypted), but the information considered herein is the encrypted information contained or provided by these elements. For each processing of (encrypted) information by unit  1 , the same information, also encrypted, is decoded and processed by unit  2 . In fact, units  1  and  2  are strictly identical. 
         [0031]    This system operates acceptably in the case of a fault injection attack on master unit  1 . Indeed, the result of the comparison provided by module  3  will be, in case of an attack, erroneous, which enables to take any countermeasure adapted to the application (locking, resetting, new attempt, etc.). 
         [0032]    However, in case of multiple attacks, for example, in case of an attack on unit  1  and on module  3 , or in case of multiple time attacks, there is a high risk of not efficiently protecting the circuit. 
         [0033]      FIG. 2  very schematically shows in the form of blocks an embodiment of a microcontroller. 
         [0034]    According to this embodiment, the microcontroller comprises two processing units  11  and  12 , for example, central processing units CPU 1  and CPU 2 . Conversely to the example of  FIG. 1 , the two units  11  and  12  are used in alternation to process and/or deliver useful information. 
         [0035]    For example, each unit  11 ,  12  comprises, among others, a central processing unit  112 ,  122  (CPU), a circuit  114 ,  124  (RMW) identifying the nature of the operation to be carried out between a read, modification, or write operation, and a circuit  116 ,  126  (ENC), for decrypting or encrypting the information exchanged with the outside of processing unit  11  or  12 . Circuits  116  and  126  are connected to the bus(es) having their information desired to be monitored. This connection is performed, in the described embodiments, via multiplexer or selector  20 . Thus, volatile or non-volatile memory or memories  5  (VM) or  6  (NVM) as well as the various other functions  7  (FCT) capable of exchanging encrypted information with processing units  11  and  12  are coupled to one or a plurality of encrypted data, address, or instruction buses  4  (ENC BUS), which are coupled to multiplexer or selector  20 . On the side of processing units  11  and  12 , the encrypted information (data, addresses, instructions) also transit over one or a plurality of data, address, or instruction buses  41  or  42  (ENC BUS) all the way to or from multiplexer  20 . 
         [0036]    In the shown example, a circuit  14  for comparing the information processed by processing units  11  and  12  is provided. This circuit may for example compare (comparator  142 ) the contents of data or index registers of processing units  112  and  122 , compare (comparator  146 ) the encrypted and/or decrypted results of encryption and decryption circuits  116  and  126 , compare (comparator  148 ) the information read from the external elements and decoded by decoders  118  and  128  dedicated to the system. 
         [0037]    Comparators  142 ,  146 , and  148  output one or a plurality of signals SECUM for validating the authenticity of the information, capable of being exploited to lock the system, to prevent the provision of data over the bus, to reset the system, or for any other adapted countermeasure according to the application. 
         [0038]    Multiplexer or selector  20  is controlled by a module  8  (CTRL), preferably integrated to the microcontroller containing the two units  11  and  12 , to alternately use one of the two units  11  and  12  as a useful unit and as a replica unit. The control of multiplexer  20  may be random, under control of the user, according to the application executed by the system, according to the executed operations, etc. 
         [0039]    In the direction from the outside to the processing units, the two units receive the information in parallel to perform the same processings and allow the comparison. The multiplexer thus branches the signals of bus  4  towards the two buses  41  and  42 . However, in the direction from the processing units to the outside, only bus  41  or  42  corresponding to the useful processing unit is branched, by control unit  8 , towards the bus. 
         [0040]    Thus, conversely to a usual system, the two processing units  11  and  12  output useful information. Accordingly, it becomes much more difficult for an attacker to provide multiple fault injections and to monitor the direct or indirect information (analyses of the consumption or of the radiation) to obtain information. 
         [0041]    An advantage of the embodiments which have been described is that they require no modification of the buses or of the processings carried out. Indeed, the two processing units  11  and  12  keep on operating, blindly, as units processing all the information, the selection between the useful unit and the replica unit being performed at the level of the bus(es) of communication with the various functions capable of using the information, particularly, the memories internal and/or external to the microcontroller. 
         [0042]    Another advantage is that the operation is transparent for the outside. Indeed, circuit  8  manages the branching of the information towards bus  4  without for the functions for which the information is intended to have to take into account the fact that the information originates from unit  11  or from unit  12 . 
         [0043]    Various embodiments have been described. Various alterations, modifications, and improvements will occur to those skilled in the art. In particular, the selection of the control of multiplexer  20  depends on the application and on the functions present in the microcontroller. Finally, the practical implementation of the embodiments which have been described is within the abilities of those skilled in the art based on the functional indications given hereabove. 
         [0044]    Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and the scope of the present invention. Accordingly, the foregoing description is by way of example only and is not intended to be limiting. The present invention is limited only as defined in the following claims and the equivalents thereto. 
         [0045]    The various embodiments described above can be combined to provide further embodiments. These and other changes can be made to the embodiments in light of the above-detailed description. In general, in the following claims, the terms used should not be construed to limit the claims to the specific embodiments disclosed in the specification and the claims, but should be construed to include all possible embodiments along with the full scope of equivalents to which such claims are entitled. Accordingly, the claims are not limited by the disclosure.