Abstract:
A method to protect computational, in particular cryptographic, devices having multi-core processors from DPA and DFA attacks is disclosed herein. The method implies: Defining a library of execution units functionally grouped into business function related units, security function related units and scheduler function related units; Designating at random one among the plurality of processing cores on the computational device to as a master core for execution of the scheduler function related execution units; and Causing, under control of the scheduler, execution of the library of execution units, so as to result in a randomized execution flow capable of resisting security threats initiated on the computational device.

Description:
FIELD OF THE INVENTION 
       [0001]    The present invention relates to a method for protecting a computational device, in particular a cryptographic computational device, from DPA and DFA attacks according to preamble of claim  1 . Also disclosed is an improved computational device, being a smart card in particular, incorporating said protective mechanisms. 
       BACKGROUND OF THE INVENTION 
       [0002]    Cryptographic computational devices have many applications both for the secure transmission of information and for the authentication and verification of the source of information. One application of a cryptographic computational device or system is a smart card, which contains valuable financial and personal data which intended to be kept secret via encryption. These devices, for reason of unauthorized access and/or unlawful benefit, are made object of attacks for extracting their encrypted confidential information, and as a consequence, the security level of said devices may be compromised. Once this event occurs, the attacker can access the otherwise restricted information and capabilities of the device and is then at liberty to engage in malicious activities including authorization of monetary transactions, impersonation of digital signatures and so on. With the global increase in the use of cryptographic computational devices such as chip-based cards or special ICs for electronic identification and authentication protocols, it has become necessary for cryptographic devices to be tamper-proof by advantageous incorporation of features resistive to aforementioned attacks that concede data security. 
         [0003]    Not only for smart cards, also for other computational devices such as mobile phones, DPA and DFA attacks area a threat. 
         [0004]    Cryptographic algorithms that normally go into the devices mentioned above are usually designed not to reveal their inputs and/or outputs. However, cryptographic keys and computational intermediates of these algorithms may be open to access by an attacker thus revealing the analyze intended and so compromising the security of the cryptographic device involved. Among classes of effective attacks known to be used with such intent, Differential Power Analysis (DPA) and Differential fault analysis (DFA) attacks are recognized as non-physical, non-invasive attacks which can be easily automated and can be mounted without knowing design of the target device. It would be therefore highly desirable to have mechanisms specifically resistive towards said attacks and yet be independent of the hardware involved. 
         [0005]    Fundamentally, DPA is a class of attacks allowing extraction of encrypted information/cryptographic keys present on cryptographic devices such as smart cards by analyzing the power consumption of said devices and performing a statistical analysis on the measured data. This type of attack is based on the principle that as the cryptographic processor performs its cryptographic functions, such as encryption or signing, transistors comprising the processor switch on and off, which changes the amount of current drawn from the source supplying power to the processor. The attacker can correlate the current changes with data being processed and thus gain information on the crypto keys being used. In other words, a DPA attack is an exploit based on an analysis of the correlation between the electricity usage of a chip in a smart card and the encryption key it contains. As data is collected by monitoring the power emanations of the device under attack, physical access to the device being attacked is not necessary. In practice, small inductive probes or antennae placed adjacent to the device being attacked are sufficient for implementation of the attack. 
         [0006]    DFA, on the other hand, is a type of side channel attack where the principle is to induce faults or unexpected environmental conditions into cryptographic implementations, so as to reveal their internal states. Using DFA attacks, secret keys for cryptographic algorithms can be determined by selectively introducing scattered computation errors in the processor. For example, high temperature, unsupported supply voltage or current, excessively high overclocking, strong electric or magnetic fields, ionizing radiation may be used to influence operation of the processor on-board the cryptographic device which then begins to output incorrect results due to physical data correction thus revealing that the processor is running and details of its internal data state. Effective countermeasures to DPA and/or DFA types of attacks are hence acutely required for security of any product which needs to protect cryptographic keys and other secret information from being leaked. 
       PRIOR ART 
       [0007]    Attempts at addressing the needs mentioned hereinabove find mention in prior art. Many countermeasures have been proposed to defend cryptographic computational devices from DPA and/or DFA attacks. These are mostly based on vulnerability or error detection schemes or introduction of randomness, noise or continual modification of execution protocols. These countermeasures make the attack much more difficult by decreasing the amount of information obtained from each sampling of the power line signal. However, an attacker can overcome them by obtaining more samples of power line fluctuations and applying more sophisticated analytical techniques. 
         [0008]    U.S. Pat. No. 7,430,293 B2 teaches architecture of cryptography processors used for cryptographic applications in which a plurality of calculating subunits and at least one arithmetic unit are subject to a single control unit which divides and schedules operations across the calculating subunits to result in a series of computational intermediates not necessarily obtained in a sequence to allow the attacker to readily arrive at the secret analyze. However, this system is not able to detect and provide countermeasures to DFA attacks. 
         [0009]    EP1569118B1 discloses a method for safe calculation of a result in a microprocessor system where parallel computations are undertaken for arriving at the same computational result. Upon comparison, if results of the parallel computations are not identical, possibility of manipulation due to DFA is detected. This system is however vulnerable to DPA attacks. 
         [0010]    Thus it may be seen that technologies comprising state of the art have critical shortcomings, requiring novel solutions for protection of (cryptographic) computational devices against all types of attacks, including DFA and DPA attacks, as recited hereinafter. 
       OBJECTIVES 
       [0011]    The principal object of the present invention is to create a high level of security against DPA and/or DFA attacks on computational devices having multiple cores. 
         [0012]    The above object is achieved by a method for detection and deployment of countermeasures against DPA/ DFA attacks on computational devices according to claim  1 . The random designation of the scheduler function to one of the plurality of cores leads to a randomness in execution flow. Therefore, the execution flow is capable to resist security threats initiated on the cryptographic device. The security threats are e.g. caused by non-invasive attacks based on differential power analysis or differential fault analysis. 
         [0013]    Advantageous embodiments of the invention are specified in dependent claims. 
         [0014]    According to an embodiment of the present invention, the execution flow comprises a plurality of operation cycles, and the random designation of the scheduler function is performed newly for each new operation cycle. 
         [0015]    A business logic unit is according to one embodiment embodied to perform a cryptographic function such as a cryptographic algorithm. 
         [0016]    Optionally, according to claim  3 , the group of business function related execution units comprise at least one each among: a business logic unit; and a redundant business logic unit causing the business logic unit to be executed at least twice as a measure for comparative verification of data integrity. According to this embodiment, in addition to randomization of claim  1 , redundancy is added to the execution flow, and the opportunity of data integrity check is created. Thus, according to the embodiment of claim  3 , the scheduler on the designated master core generates a both randomized and redundant and verifable execution flow having enhanced resistance against security threats. 
         [0017]    The comparing of the results is, according to embodiments of the invention, performed at critical points in the execution flow, such as in cryptographic algorithms, at beginning/ end of rounds of a multi-round algorithm, before/after performing any security sensitive operation, before passing fo data on for further processing to a next execution unit, before forwarding of a result of an algorithm to an operating system, and the like. 
         [0018]    Depending on a comparing result of comparing the computational results, one or more defense measures may be initiated, e.g. one or more of the per se known measures of claim  6 . 
         [0019]    According to a further embodiment, a delay unit may be provided so as to impose, in addition, delay onto the execution flow. According to a further embodiment, a power consumption control unit is provided, performing pretentious execution of a cryptographic algorithm as a measure to generate a fictitious energy consumption signal. In particular, a thus achieved randomized execution and delay of the execution flow rendered by concerted execution of the security function related execution units and scheduler function related execution units causes the system to attain unpredictability and contain fictitious energy consumption signals as a countermeasure to allow check integrity of execution flow and to resist security threats. 
         [0020]    The group of security function related execution units may further comprise a crypto unit controlling execution of the business logic unit, e.g. by performing a PIN check. 
         [0021]    The group of scheduler function related execution units may further comprise a booting booting a secure operating system on the master core and/or an initialization unit initializating other cores, and may further comprise a separate boot up unit for initiating the initialization unit. 
         [0022]    Referring back to claims  1  to  4 , it can be seen that the operation process/cycle is randomized via a specific scheduler due to which the execution units are allocated at random to the available processing cores. Delays may be introduced, again at random, between successive execution units so that security attacks based on chronometric prediction of execution sequences are avoided. Yet furthermore, selection of master core for initiation/boot sequence may also be randomized to make impossible any prediction of the processing sequence / queue, thereby not allowing for any planned security attacks. Overall, the orchestration of process execution scheme so enabled makes it unintelligible/to manifestation of conventionally known attack protocols and thus be a constitutive effective deterrent countermeasure itself against security threats. 
         [0023]    These objects, together with other objects and advantages which will become subsequently apparent, reside in the detailed description set forth below in reference to the accompanying drawings and furthermore specifically outlined in the claims. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0024]    In the narration herein below, the present invention is explained in further detail based on exemplary embodiments and by reference to certain drawings, in which: 
           [0025]      FIG. 1  is a schematic illustration to explain the execution scenario according to an embodiment of the present invention. 
       
    
    
       [0026]    Table  1  lists the security attacks capable of being resisted by method of the present invention. 
         [0027]    Attention of the reader is now requested to the detailed description to follow which narrates a preferred embodiment of the present invention and further indicates the various ways in which principles of the invention may be employed. 
       DETAILED DESCRIPTION 
       [0028]    The present invention is directed towards creation of a high level of security against DPA and/or DFA attacks on cryptographic devices having multiple cores in a manner independent of external detectors or dedicated hardware sensors. 
         [0029]    Reference is now made to a preferred but non-limiting embodiment of the present invention explained in reference to accompanying drawings. 
         [0030]      FIG. 1  illustrates the high level hardware architecture proposed considering a multi core CPU having three cores Core 1, 2, 3. Here, the code and data sections are shared by the available cores and have access through a common system bus. Concept of the present invention is intended to be scalable for systems having more than one core where the business logic is broken down into multiple execution units which may then be scheduled for execution randomly and/or in parallel on different cores. 
         [0031]    Conceptually, security in a cryptographic device depends on integrity of data and its execution. The present invention addresses these aspects by providing for distinct software checks that help to detect any instance of manipulation and/or security breach and accordingly cater appropriate countermeasures to avoid leakage of information. 
         [0032]    According to one aspect of the present invention, integrity of data is checked by executing the same part of code reiteratively. Results from prior execution or from a standard library store are then compared to the latest computed result and deviations, if any, are assumed to be determinants of compromise in security of the device indicative of DFA attacks. 
         [0033]    According to another aspect of the present invention, integrity of execution is checked by confirming the control flow. This is done by executing all the execution units involved in a particular scenario more than once. Any deviation, therefore is a determinant of security breach due to SPA/DPA attacks. 
         [0034]    In the performance of execution integrity check as per one embodiment of the present invention, the execution units are categorized according to their function subscribed in the proposal scripted for execution of a particular business case scenario. The present invention assumes these units to be atomic in nature. 
         [0035]    Accordingly, business logic units are a category of execution units representing the use scenario and, for execution of an actual business scenario, may be broken down into two or more independent execution subunits. 
         [0036]    Redundant business logic units are the next category of execution units which are otherwise same as the business logic unit except that their role subscribed is to ensure the business logic units get scheduled at least twice for redundant execution as a measure to detect data security breaches. 
         [0037]    Observe and check units are the next category of execution units which serve to observe the control flow and consistency of results between the business logic unit and redundant business logic units. At predetermined points the control flow or results are compared and inconsistency, if any, is understood as a security threat. These predetermined points could be—
       1) within the cryptographic algorithm like DES, RSA, AES etc,   2) in case if algorithm comprises of multiple rounds then at the beginning and/or end of each round,   3) before and/or after performing any security sensitive operation like PIN comparison or MAC verification,   4) before the data is passed on for further processing to next block, etc.       
 
         [0042]    Upon determination of checkpoints as provided above, the observe and check unit initiates an appropriate countermeasure which can comprise of one or more of the operations such as—
       1) permanently or temporarily locking the device from further use;   2) deleting sensitive data in volatile and nonvolatile memory;   3) incrementing an error counter;   4) aborting the current operation by returning the possible erroneous response to hide the detection of the attack etc.       
 
         [0047]    Scheduler units are the next category of execution units which schedule different execution units as per the scheduling algorithm subscribed. Optionally, the algorithm construct is made to randomize the scheduling process so that a new order of execution units is scripted every time and predicting the control flow even from intermediary information is not possible, thereby countering both DPA and DFA attacks. 
         [0048]    Initialization units are the next category of execution units which perform the initial bring up of the system and may optionally comprise a boot up unit that initiates the scheduler unit. 
         [0049]    Delay units are the next category of execution units which may be induced by the scheduler unit at random intervals as a default measure or alternatively, when no execution unit is free. Either way, the execution sequence is accordingly punctuated in a random manner which is impossible to predict and therefore, no knowledge can be had for aiding information acquisition by external attacks. 
         [0050]    Power hog/power consumption units are the next category of execution units subject to being induced by the scheduler unit and whose operation is pretentious of executing complex algorithms like cryptography. The power signal generated is therefore a deliberate hoax for DPA attacks and therefore a security measure for the cryptographic device involved. 
         [0051]    Crypto units are the next category of execution units for execution of the actual cryptographic algorithm. 
       Example  1   
     Execution Scenario 
       [0052]      FIG. 1  shows a typical execution scenario according to one exemplary embodiment of the present invention where the cryptographic device comprises three processor cores, and business logic is broken into 2 execution units A and B. According to this proposal, for a duration of 5 execution units on 3 cores, a total of 15 execution units are executed in the composition:
       1) 4 business related execution units (A, B, A′, B′)   2) 6 security related execution units (delay, power hog/power consumption, crypto)   3) 5 scheduler related execution units (init/scheduler, check)       
 
         [0056]    One of the cores (Core #  1  for purpose of this example) shall act as the master and will have control during the initialization or power-on sequence and will after power-on on run a scheduler unit. The execution unit marked “init”, once executed on Core #  1 , shall boot the secure operating system on Core #  1  and initializes other cores. The scheduler execution unit marked “init” then identifies the execution units from the business logic (A, B) and then prepares the execution queues for the all the cores under framework of following rules:
       a) There are at least two execution cycles for units A and B;   b) Execution of units A and B is randomized;   c) All units are executed on at least two different cores;   d) To the extent the execution units are not sequential, their executions are optimized/parallelized as per processor core availability for best speed and unpredictability to external attacks;   e) Gaps, if any, between two valid business logics are stuffed with random security related execution units wherein such stuffing is controlled by adding ‘critical section’ in the business logic to reduce any performance related overheads;   f) Security related execution units to check consistency of execution flows and data results of the individual execution units is inserted whenever the results to be compared are available (As soon as A and A′ are available as shown in  FIG. 1 ); and   g) At end of the execution sequence described above the scheduler places itself in queue of one of the cores selected at random (Core #  3  as shown in  FIG. 1 ) and marking that core as the master for scheduling the next business logic.       
 
         [0064]    Optionally, the redundant execution units (A and A′ in  FIG. 1 ) are compulsorily made to execute on different cores so that the core occupancy is kept maximally available for actual business logic units. 
         [0065]    Redundant execution, in accordance with principles of the present invention explained above, ensures that the same execution unit is executed twice and results compared for integrity of data as well as execution flows. As the same execution unit is executed twice on different cores, security attacks manifested in resetting of counters using ultraviolet light or other means and/or skipping of execution logic is avoided. 
         [0066]    Randomization, in accordance with principles of the present invention explained above, ensures that the execution units are executed at random and thereby insulating the system from security attacks that require establishment of an execution pattern evident from the power consumption signals, altering of voltage levels and preventing non-volatile memory writes. 
         [0067]    Delayed/punctuated execution, in accordance with principles of the present invention explained above, ensures introduction of unpredictability into the execution sequence and therefore, protection against security violations that require monitoring of the power consumption footprints and other secondary data for manifesting the security breach. 
         [0068]    To summarize, arrangement of redundant, randomized and punctuated execution of business logic on a multi-core system forms the inventive core of the present invention. Table 1 lists the attacks on security of a cryptographic device that can be prevented on implementation of the method provided for by the present invention. 
         [0069]    An important feature of the present invention is that no hardware or other peripherals are involved for detection of the security threat. Entirely, the objects of detection and catering countermeasures are ably provided for on a software basis alone. Table 1 lists the attacks on security of a cryptographic device that can be prevented on implementation of the method provided for by the present invention.