WO2003095112A2 - Circuit and method for carrying out a calculation - Google Patents

Circuit and method for carrying out a calculation Download PDF

Info

Publication number
WO2003095112A2
WO2003095112A2 PCT/EP2003/004841 EP0304841W WO03095112A2 WO 2003095112 A2 WO2003095112 A2 WO 2003095112A2 EP 0304841 W EP0304841 W EP 0304841W WO 03095112 A2 WO03095112 A2 WO 03095112A2
Authority
WO
WIPO (PCT)
Prior art keywords
algorithm
algorithm steps
register
execution
des
Prior art date
Application number
PCT/EP2003/004841
Other languages
German (de)
French (fr)
Other versions
WO2003095112A3 (en
Inventor
Holger Bock
Original Assignee
Infineon Technologies Ag
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Infineon Technologies Ag filed Critical Infineon Technologies Ag
Priority to AU2003224151A priority Critical patent/AU2003224151A1/en
Publication of WO2003095112A2 publication Critical patent/WO2003095112A2/en
Publication of WO2003095112A3 publication Critical patent/WO2003095112A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7223Randomisation as countermeasure against side channel attacks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/72Indexing scheme relating to groups G06F7/72 - G06F7/729
    • G06F2207/7219Countermeasures against side channel or fault attacks
    • G06F2207/7261Uniform execution, e.g. avoiding jumps, or using formulae with the same power profile

Definitions

  • the present invention relates to performing calculations on useful input data to obtain useful output data, and in particular to arrangements for such circuits against hardware attacks in the case of their use in cryptography.
  • Some hardware attacks have been proposed, such as Measuring the time required for encryption or other time periods or measuring the power or power consumption and radiation patterns in order to obtain information about a secret key or other type that is stored on the device. Attacks of this type are generally independent of the cryptographic algorithm used, which is implemented by the crypto device, and can be applied to any device that is not protected against such attacks.
  • Timing attacks take advantage of the fact that crypto devices often take a slightly different amount of time to process different input data. The reasons for this can be varied and include, for example, performance optimizations to skip unnecessary operations, conditional jump commands, RAM cache hits and computing units that perform computing operations, such as multiplication and division, in different time periods, depending on both the cryptographic key as well as the input data.
  • the object of the present invention is to provide a circuit and a method for performing a calculation on useful input data in order to obtain useful output data, so that security against hardware attacks is increased.
  • the present invention is based on the finding that the security of circuits for carrying out a calculation on useful input data in order to obtain useful output data can be effectively increased against hardware attacks by assigning a control device to a device for performing an algorithm with one or more algorithm steps, which control device controls the device for carrying out in such a way that before the actual algorithm is carried out with the user input data in order to obtain the useful output data and / or afterwards one or more algorithm steps are carried out which are only intended to correlate the total execution time and
  • the distinction between the algorithm steps during the execution of the actual algorithm and the algorithm steps which are carried out before or after to aggravate timing attacks is made more difficult according to the invention in that all algorithm steps are carried out using the same device, so that, for example, power attacks, such as SPA, no difference can be perceived.
  • An advantage of the present invention is that it is easy to use with many cryptographic algorithms is to be implemented since these algorithms have the repetition of calculation operations or algorithm steps anyway.
  • the present invention consequently takes advantage of the characteristic inherent in these algorithms of repeated use of arithmetic operations.
  • FIG. 1 is a block diagram of a circuit for performing a calculation according to a general embodiment of the present invention.
  • Fig. 2 is a block diagram of a circuit for performing a DES algorithm according to a specific embodiment of the present invention.
  • FIG. 1 shows a circuit for performing a calculation on useful input data in order to obtain useful output data which is generally indicated at 10.
  • the circuit 10 comprises means 12 for performing an algorithm, such as a DES, AES or RSA algorithm, or a part thereof with one or more algorithm steps, such as the rounds in the case of the DES and AES algorithm and the modular multiplications in the case of the RSA algorithm.
  • the device 12 receives the useful input data to be processed, which it converts into useful output data in an execution time to be discussed below, which in turn is used at an output 16 after the expiry of the
  • the circuit 12 is connected to a control device 18, which controls the device 12 in such a way that it carries out one or more additional algorithm steps before carrying out the actual algorithm with the useful input data in order to obtain the useful output data and / or after the same.
  • the control device 18 controls the device 12 in such a way that the useful input data are not deleted while the additional algorithm steps are carried out before the actual algorithm is carried out and the useful output data obtained are not deleted during the additional algorithm steps after the actual algorithm is carried out.
  • Outputting the useful output data at the output 16 is consequently the sum of the time periods which the device 12 takes before and after it to carry out the algorithm steps of the actual algorithm and the additional algorithm steps.
  • the circuit 10 above has two essential properties which protect it against hardware attacks.
  • the correlation between the useful input data and the execution time of the circuit 10 is no longer dependent solely on the algorithm implemented by the device 12 and the useful input data, since the pure calculation duration is the time required to carry out the additional algorithm step or steps.
  • a dependency of the execution time on the user input data due to, for example, different cache hits, conditional jumps or the like in the device 12 is thereby obscured.
  • the time period for performing an algorithm step is dependent on the input data.
  • asynchronous circuits are self-clocked, so that the intermediate results of the various logic components from which the asynchronous circuits are constructed are processed by the logic components of the subsequent stage independently of a clock whenever all are required as input data for a respective logic component Interim results are available.
  • different input data in asynchronous circuits lead to different logic paths within the logic components from which the asynchronous circuit is constructed, which in turn have different run times.
  • asynchronous circuits have an inherently data-dependent execution time, since each intermediate result and also the end result, depending on the logic paths taken within the logic components, are present immediately and not in units of a cycle sooner or later at the output.
  • the addition of performing the additional algorithm steps consequently obscures the data dependency of the execution time of the circuit 10.
  • a first possibility is to calculate the number of additional algorithm steps carried out before and after the actual algorithm has been carried out, from calculation to calculation, ie from the user input date to the user input data. tum, to be redetermined at random. In this way, the part of the execution time of the circuit 10 caused by the additional algorithm steps performed per calculation varies, so that the dependence of the execution time on the useful input data is even less and timing attacks are even more difficult.
  • a further property of the circuit 10, which helps it to provide increased protection against hardware attacks, is that the additional algorithm steps carried out are based on arithmetic operations with the same characteristics, or in other words the additional algorithm steps carried out are carried out by the same device 12.
  • the algorithm steps are based on the same arithmetic operations and differ from one another only by different input operands, such as the intermediate result of the previous algorithm step and those in this step key. In this case, an attacker, while observing the power consumption, cannot distinguish additional bogus algorithm steps from those algorithm steps that are carried out during the actual algorithm.
  • the circuit of FIG. 2 indicated generally at 50, includes a circuit portion 52 for performing a DES algorithm and a control unit 54 for controlling circuit portion 52.
  • Circuit portion 52 includes an input register 56, a result register 58, and a DES module 60.
  • the circuit section 52 comprises multiplexers 62 and 64 and an additional register 66.
  • the input register 56 is connected directly to an input 68 of the circuit 50.
  • the multiplexer 62 connects either the input register 56 or the additional register 66 to an input of the DES module 60, depending on how it is indicated by a control signal which the multiplexer 62 receives from the control unit 54 connected to it.
  • the multiplexer 64 is able to connect the output of the DES module 60 to the register 66 via a further multiplexer 69.
  • the multiplexer 64 can also connect the output of the DES module to the result register 58.
  • the connection established by the multiplexer 64 depends on a control signal which the multiplexer 64 receives from the control unit 54 connected to it.
  • the output register 58 is connected to an output 70 of the circuit 50.
  • the multiplexer 69 In addition to the input connected to the multiplexer 64, the multiplexer 69 also includes a further input via which, as will be described below, a random start value d z can be loaded into the additional register 66 which an output of the multiplexer 69 is connected. Which of the two inputs, ie the one at which the value d z is received or the one to which the intermediate result is supplied by the DES module via the multiplexer 64, the multiplexer 69 connects to the input of the register 62 depends on a control signal which the multiplexer 69 receives from the control unit connected to it.
  • the control unit 54 comprises a counter 72 for counting the laps carried out during an overall calculation, as will be described in the following.
  • the circuit 50 is provided to carry out a calculation on useful input data at the input 68 and to output the result in the form of useful output data at the output 70.
  • the circuit 50 is provided for performing a DES calculation, which maps 64 bits of user input data to 64 bits of useful output data.
  • the DES DES
  • Lap calculations are carried out by the DES module 60, which is asynchronous in the present case and works self-clocked.
  • the execution time of the lap calculations by the DES module 60 is different for each lap or for each input value, and the result of a lap is present at the output of the DES module 60 immediately after the calculation, regardless of a clock.
  • a lap calculation by the DES module 60 is therefore dependent on input data.
  • a calculation is used to understand the encryption of a 64-bit block of the user input data at input 68.
  • the 64-bit block is subjected to 16 rounds that are performed by the DES module 60.
  • Each round performed by the DES module 60 is based on the same arithmetic operation, which in turn consists of several arithmetic operations.
  • These arithmetic part operations consist of the following steps: (1) dividing the 64-bit block of the previous round or, in the case of the first round, the usage data into a left half of 32 bits and a right half of 32 bits,
  • the circuit 50 carries out further permutations for a complete DES encryption.
  • the 64 bits present at input 68 were previously subjected to a further permutation for complete DES encryption.
  • the 64 bits resulting from the 16 DES rounds are subjected to an inverse permutation.
  • these permutations which are achieved, for example, via fixed wiring, make no or at least no significant contribution to the overall calculation time of DES encryption and are therefore only described below with regard to the execution time or duration of a complete DES encryption takes into account the time required for the 16 DES rounds.
  • the pure execution time for a calculation of the actual DES encryption of a 64-bit data block is therefore composed of the 16 rounds by the DES module 60. Due to the asynchronous nature of the DES module 60, it would be extremely dependent on the 64 bit input data.
  • a random start value d z is first loaded into the additional register 66 via the multiplexer 69, which serves as an input operand for the cyclically carried out additional rounds before the actual algorithm is carried out.
  • the multiplexer 69 is then switched over in order to connect the input of the additional register 66 to the multiplexer 64 from now on.
  • the counter 72 of the control unit 54 is set to a random start value z o .
  • the 64-bit input block arrives, it is first stored in the input register 56.
  • the control unit 54 controls the multiplexer 62 in such a way that the random value d ⁇ first the additional register 66 is fed to the DES module 60 for carrying out a DES round.
  • the payer 72 increments the counter value z (ie
  • the payer 72 is preferably designed such that the counter value Zj , Gray-coded, so that in the bit representation of the counter value Zj . changes only one bit per increment to provide little clues for hardware attacks.
  • the DES module 60 carried out a "false round", ie a round that does not belong to the actual rounds of the actual DES calculation and thus is not used to calculate the useful output data.
  • the control unit 54 sets the multiplexer 64 in such a way that that the output of the DES module 60 is connected to the register 66 so that the result of the dummy round is copied into the additional register 66.
  • the control unit 54 monitors how many false rounds are carried out and compared with the intermediate results stored in the additional register 66 constantly the counter value z x in the counter 72 with a comparison value v.
  • the control unit changes the multiplexer 62 in such a way that it connects the input register 56 to the input of the DES module 60.
  • the comparison value v can of course also be set randomly.
  • the 64-bit user data input block which as mentioned above, is now has already been subjected to a permutation in a permutation module, not shown, fed from the input register 56 into the DES module 60.
  • the DES module 60 After performing the first DES round on the 64-bit input block, the DES module 60 outputs the result or the first 64-bit useful intermediate data block via the multiplexer 64 into the intermediate register 66, whereupon the counter 72 increments its counter value Zi.
  • the control unit 54 again switches the multiplexer 62 in such a way that the additional register 66 is connected to the input of the DES module 60.
  • each intermediate result could also be copied into the input register 56 during these 16 DES rounds of the actual DES calculation, in which case an additional data path from the output of the DES module 60 via the multiplexer 64 would lead to the register 56.
  • the control unit 54 ensures that after the 16 DES rounds of the actual calculation, the multiplexer 64 is changed over such that the register 58 is connected to the output of the DES module 60.
  • the result of the 16 th DES round of the actual DES calculation which consequently represents the encrypted 64-bit useful output block, is correspondingly copied into the register 58.
  • the control unit 54 takes care of this by converting the multiplexer 64 again so that it connects the output of the DES module 60 to the additional register 66.
  • the control unit 54 the DES module 60 executes further false rounds and ensures that the result is held back in the result register 58 for as long as this.
  • the control unit 54 monitors the payer value z x of the payer 72 reaches a fixed or a random final value e.
  • the intermediate results temporarily stored in the additional register 66 are fed to the DES module.
  • the DES module is consequently supplied with the same intermediate result which has led to the 64-bit useful data output block finally stored in the result register 58.
  • the control unit 54 prevents any further DES rounds from being carried out in the current calculation and releases the result in the result register 58 for output at the output 70.
  • each The round carried out in the DES module 60 requires a different period of time, which depends on the 64 bit input data to be processed by the respective round and the respective round partial key. Assuming that the DES module 60 in the dummy rounds before and after the actual DES calculation also works with the round keys used during the actual DES calculation, the total calculation execution time therefore depends primarily on the total number m + 16 + n of the DES rounds carried out, ie the DES rounds of the actual DES calculation and the dummy rounds before and after.
  • the total execution time also depends on the random value on which the additional register 66 is initialized at the beginning of each calculation.
  • the total number of rounds m + 16 + n in turn depends on the random value to which the counter 72 is initialized, and additionally, as mentioned above, possibly on a random comparison value v and a random final value e.
  • counter 72 controlled by the round processing by the DES module 60, updated its counter value every time the round was completed. incremented, and that the round calculations by the DES module 60 thus follow one another immediately, without an external clock dictating the start of each DES round from the outside.
  • counter 72 is clocked, which clock is also used to activate DES rounds by DES module 60.
  • a fixed end value e can ensure that the DES calculation by the circuit 50 always takes the same time.
  • control unit 54 instead of the counter 72 comprises a timer which measures the time from the arrival of the user input data at the input 78, the control unit 54 performing the DES calculation by the circuit 50 before and after the DES bill round the actual DES calculation stops, on which the timer exceeds a certain predetermined period of time.
  • the execution time of the circuit 50 can be kept constant except for units of a calculation duration for a DES round.
  • the number of deflection rounds v x and ni at the expense of increased latency and with the addition of additional registers. For example, in addition to the additional register per 64 bit block of a protocol block, an input register and an output register are provided, alternating false rounds and then the 16 rounds on one of the 64 bit Bucks are carried out.
  • the data dependent execution time of asynchronous circuits is made immeasurable by providing a flexible adjustable control unit which ensures that random calculations are carried out before and / or after the actual calculation in order to hide the true calculation duration.
  • a fourth can be provided, in which the random value can be provided upon initiation of a DES calculation, which is used as the basis for the first DES round of notes .
  • the exemplary embodiment shown in FIG. 2 could easily be transferred to the case that false rounds are only carried out before or only after the actual 16 DES rounds. In this case, either the input register 56 or the result register 58 may be missing.
  • the above embodiment could without further res are transferred to the case that false rounds are also interspersed between the individual rounds of the actual calculation.
  • FIG. 1 can also be transferred to a corresponding device in which the blocks in FIG. 1 represent corresponding steps of a method.
  • the idea on which the present invention is based can be implemented in integrated circuits, chip cards, SIM cards or wired circuits. Implementation in combined hardware and software is also conceivable.

Abstract

The invention relates to a circuit for carrying out a calculation of user input data in order to obtain user output data, comprising a device (12) for performing an algorithm with one or several algorithm steps and a control device (18). The control device (18) controls the performing device (12) in such a way that it performs one or more algorithm steps prior to performing the algorithm with the user input data in order to obtain user output data, and/or after performing said algorithm. Said algorithm steps are provided in order to destroy or at least reduce the correlation between overall execution time and user input data. Differentiation of the algorithm steps during the performance of the actual algorithm and the algorithm steps, making timing attacks more difficult either prior thereto or afterwards, is made more difficult by performing all algorithm steps using the same device whereby it is impossible to make a distinction using power attacks such as SPA, for example.

Description

Schaltung und Verfahren zur Durchführung einer BerechnungCircuit and method for performing a calculation
Die vorliegende Erfindung bezieht sich auf die Durchführung von Berechnungen an Nutzeingangsdaten, um Nutzausgangsdaten zu erhalten, und insbesondere auf Vorkehrungen für solche Schaltungen gegen Hardwareangriffe in dem Fall ihrer Verwendung in der Kryptographie.The present invention relates to performing calculations on useful input data to obtain useful output data, and in particular to arrangements for such circuits against hardware attacks in the case of their use in cryptography.
Mit dem Aufkommen von mehr und mehr kleinen mobilen Krypto- vorrichtungen, wie z.B. Chipkarten und SIM-Karten, wurde eine neue Kategorie von Angriffen auf kryptographische Algorithmen relevant, die direkt auf die Hardwareimplementierung des Kryptosystems abzielen. Angriffe diesen Typs verwenden die Daten von sehr feinen Messungen an der Kryptovorrichtung, während diese gerade eine Verschlüsselung durchführt, und leiten aus diesen Messungen geheime Informationen her, wie z.B. einen kryptographischen Schlüssel. Der Angreifer vermu- tet beispielsweise einige Schlüsselbits und versucht, dieWith the advent of more and more small mobile crypto devices, such as Chip cards and SIM cards, a new category of attacks on cryptographic algorithms became relevant, which are aimed directly at the hardware implementation of the cryptosystem. Attacks of this type use the data from very fine measurements on the crypto device while it is in the process of encryption and derive secret information, such as e.g. a cryptographic key. For example, the attacker suspects a few key bits and tries to
Korrektheit der Vermutung durch Korrelation mit den Messungen zu verifizieren.Verify correctness of the presumption by correlation with the measurements.
Es sind einige Hardwareangriffe vorgeschlagen worden, wie z.B. Messen der zur Verschlüsselung benötigten Zeit oder anderer Zeitdauern oder Messen des Leistungs- bzw. Stromverbrauches und von Abstrahlungsmustern, um Informationen ü- ber einen geheimen Schlüssel oder andere Art zu erhalten, die auf der Vorrichtung gespeichert sind. Angriffe dieser Art sind allgemein unabhängig von dem verwendeten kryptographischen Algorithmus, der durch die Kryptovorrichtung implementiert ist, und können auf jegliche Vorrichtung angewendet werden, die nicht gegen solche Attacken geschützt ist.Some hardware attacks have been proposed, such as Measuring the time required for encryption or other time periods or measuring the power or power consumption and radiation patterns in order to obtain information about a secret key or other type that is stored on the device. Attacks of this type are generally independent of the cryptographic algorithm used, which is implemented by the crypto device, and can be applied to any device that is not protected against such attacks.
Eine spezielle Art unter den Hardwareangriffen sind die Zeit- messungs- bzw. Timing-Angriffe, bei denen durch genaue Messung der Zeitdauer, die erforderlich ist, um einen kryp- tographischen Algorithmus durchzuführen, Angreifer in die Lage versetzt werden, Informationen über die von dem implementierten kryptographischen Algorithmus verarbeiteten Daten o- der den bzw. die durch denselben verwendeten Schlüssel zu er- halten. Timing-Angriffe machen sich den Umstand zunutze, daß Kryptovorrichtungen häufig eine leicht unterschiedliche Zeitdauer benötigen, um unterschiedliche Eingangsdaten zu verarbeiten. Die Gründe hierfür können vielseitig sein und umfassen beispielsweise Leistungsoptimierungen, um unnötige Opera- tionen zu überspringen, bedingte Sprungbefehle, RAM-Cache- Treffer und Recheneinheiten, die Rechenoperationen, wie z.B. Multiplikation und Division, in unterschiedlichen Zeitdauern durchführen, abhängig von sowohl dem kryptographischen Schlüssel als auch den Eingangsdaten.A special type of hardware attack is the time measurement or timing attack, in which by precisely measuring the time it takes to complete a cryptographic attack. to carry out a graphic algorithm, attackers are enabled to receive information about the data processed by the implemented cryptographic algorithm or the key or keys used by the same. Timing attacks take advantage of the fact that crypto devices often take a slightly different amount of time to process different input data. The reasons for this can be varied and include, for example, performance optimizations to skip unnecessary operations, conditional jump commands, RAM cache hits and computing units that perform computing operations, such as multiplication and division, in different time periods, depending on both the cryptographic key as well as the input data.
Bisherige Schaltungen zur Durchführung eines kryptographischen Algorithmus leiden darunter, daß sie aufgrund ihrer Eingangsdaten-abhängigen Ausführungszeit zur Durchführung des Algorithmus ein verwundbares Ziel für Timing-Angriffe dar- stellen. Dieser Umstand ist noch gravierender bei der Berechnung kryptographischer Algorithmen mittels asynchroner elektronischer Schaltungen, da bei denselben im allgemeinen eine inhärent datenabhängige Ausführungszeit vorherrscht. Bei synchronen Schaltungen, wo die Konstanz der Gesamtdauer einer Berechnung im Sinne der Anzahl von benötigten Takten meistens durch entsprechende Kontrollstrukturen oder Software gewährleistet werden kann, wird oft versucht, die Zeitbasis innerhalb der Zeittaktrasters zu zerstören, damit korrelative Angriffe, (wie z.B. SPA-Angriffe „simple power analysis = Ein- fachleistungsanalyse) verhindert werden. Obwohl diese Eigenschaft der variablen Zeitbasis bei asynchronen Schaltungen inhärent gegeben ist, bleibt bei denselben die Notwendigkeit der Abwehr von Timing-Angriffen bestehen.Previous circuits for carrying out a cryptographic algorithm suffer from the fact that, because of their input data-dependent execution time for carrying out the algorithm, they represent a vulnerable target for timing attacks. This fact is even more serious when calculating cryptographic algorithms using asynchronous electronic circuits, since in general there is an inherently data-dependent execution time. In the case of synchronous circuits, where the constancy of the total duration of a calculation in terms of the number of clock cycles required can usually be ensured by appropriate control structures or software, attempts are often made to destroy the time base within the time clock pattern, thus correlative attacks (such as SPA attacks Simple power analysis) can be prevented. Although this property of the variable time base is inherent in asynchronous circuits, the need to guard against timing attacks remains.
Es besteht folglich ein Bedarf nach Schaltungen zur Durchführung einer Berechnung an Nutzeingangdaten, um Nutzausgangsdaten zu erhalten, bei denen die Ausführungszeit keine Abhän- gigkeit von den Nutzeingangsdaten zeigt, und somit das Ausforschen geheimer Daten oder Schlüssel anhand dieser Abhängigkeit wirksam vermieden wird.There is consequently a need for circuits for performing a calculation on useful input data in order to obtain useful output data in which the execution time does not depend on shows usefulness of the input data, and thus the exploration of secret data or keys based on this dependency is effectively avoided.
Die Aufgabe der vorliegenden Erfindung besteht darin, eine Schaltung und ein Verfahren zum Durchführen einer Berechnung an Nutzeingangsdaten, um Nutzausgangsdaten zu erhalten, zu schaffen, so daß die Sicherheit gegenüber Hardwareangriffen erhöht ist.The object of the present invention is to provide a circuit and a method for performing a calculation on useful input data in order to obtain useful output data, so that security against hardware attacks is increased.
Diese Aufgabe wird durch eine Schaltung gemäß Anspruch 1 und ein Verfahren gemäß Anspruch 13 gelöst.This object is achieved by a circuit according to claim 1 and a method according to claim 13.
Der vorliegenden Erfindung liegt die Erkenntnis zugrunde, daß die Sicherheit von Schaltungen zur Durchführung einer Berechnung an Nutzeingangsdaten, um Nutzausgangsdaten zu erhalten, gegenüber Hardwareangriffen wirksam erhöht werden kann, indem einer Einrichtung zum Durchführen eines Algorithmus mit einem oder mehreren Algorithmusschritten eine Steuereinrichtung beigeordnet wird, die die Einrichtung zum Durchführen derart steuert, daß vor der Durchführung des eigentlichen Algorithmus mit den Nutzeingangsdaten, um die Nutzausgangsdaten zu erhalten, und/oder nachher eine oder mehrere Algorithmusschritte durchgeführt werden, die lediglich dazu vorgesehen sind, die Korrelation zwischen Gesamtausführungsdauer undThe present invention is based on the finding that the security of circuits for carrying out a calculation on useful input data in order to obtain useful output data can be effectively increased against hardware attacks by assigning a control device to a device for performing an algorithm with one or more algorithm steps, which control device controls the device for carrying out in such a way that before the actual algorithm is carried out with the user input data in order to obtain the useful output data and / or afterwards one or more algorithm steps are carried out which are only intended to correlate the total execution time and
Nutzeingangsdaten zu zerstören oder zumindest zu reduzieren. Das Unterscheiden der Algorithmusschritte während der Durchführung des eigentlichen Algorithmus und der Algorithmusschritte, die zur Erschwerung von Timing-Attacken davor oder danach erfolgen, wird erfindungsgemäß dadurch erschwert, daß alle Algorithmusschritte unter Verwendung derselben Einrichtung durchgeführt werden, so daß anhand von beispielsweise Power-Attacken, wie z.B. SPA, kein Unterschied wahrgenommen werden kann.Destroy useful input data or at least reduce it. The distinction between the algorithm steps during the execution of the actual algorithm and the algorithm steps which are carried out before or after to aggravate timing attacks is made more difficult according to the invention in that all algorithm steps are carried out using the same device, so that, for example, power attacks, such as SPA, no difference can be perceived.
Ein Vorteil der vorliegenden Erfindung besteht darin, daß dieselbe bei vielen kryptographischen Algorithmen einfach zu implementieren ist, da diese Algorithmen ohnehin das Wiederholen von Berechnungsoperationen bzw. Algorithmusschritten aufweisen. Beispiele für Kryptoalgorithmen, die das Wiederholen von Operationen gleicher Charakteristik aufweisen, umfas- sen beispielsweise den DES-Algorithmus (data encryption Standard = Datenverschlüsselungsstandard) , bei den 16 Runden durchgeführt werden, den AES-Standard (advanced encryption Standard = erweiterter Verschlüsselungsstandard) , bei dem 10, 12 oder 14 Runden durchgeführt werden, den RSA-Algorithmus (benannt nach seinen drei Begründern Rivest, Shamir und Adle- man) , bei dem viele modulare Multiplikationen durchgeführt werden müssen, oder dem ECC-Algorithmus (ECC = Elliptic Curve Cryptography = Elliptische-Kurven-Kryptographie) mit ebenfalls vielen modularen Multiplikationen. Die vorliegende Er- findung macht sich folglich die diesen Algorithmen innewohnende Charakteristik der mehrmaligen Verwendung von Rechenoperationen zunutze.An advantage of the present invention is that it is easy to use with many cryptographic algorithms is to be implemented since these algorithms have the repetition of calculation operations or algorithm steps anyway. Examples of cryptographic algorithms that have the repetition of operations with the same characteristic include, for example, the DES algorithm (data encryption standard), in which 16 rounds are carried out, the AES standard (advanced encryption standard) the 10th, 12th or 14th rounds, the RSA algorithm (named after its three founders Rivest, Shamir and Ademan), in which many modular multiplications have to be carried out, or the ECC algorithm (ECC = Elliptic Curve Cryptography = Elliptic curve cryptography) with many modular multiplications. The present invention consequently takes advantage of the characteristic inherent in these algorithms of repeated use of arithmetic operations.
Weitere bevorzugte Ausführungsformen sind Gegenstand der Un- teransprüche .Further preferred embodiments are the subject of the subclaims.
Bevorzugte Ausführungsbeispiele der vorliegenden Erfindung werden nachfolgend Bezug nehmend auf die beiliegenden Zeichnungen näher erläutert. Es zeigen:Preferred exemplary embodiments of the present invention are explained in more detail below with reference to the accompanying drawings. Show it:
Fig. 1 ein Blockschaltbild einer Schaltung zur Durchführung einer Berechnung gemäß einem allgemeinen Ausführungsbeispiel der vorliegenden Erfindung; und1 is a block diagram of a circuit for performing a calculation according to a general embodiment of the present invention; and
Fig. 2 ein Blockschaltbild einer Schaltung zur Durchführung eines DES-Algorithmus gemäß einem speziellen Ausführungsbeispiel der vorliegenden Erfindung.Fig. 2 is a block diagram of a circuit for performing a DES algorithm according to a specific embodiment of the present invention.
Die vorliegende Erfindung wird zunächst bezugnehmend auf Fig. 1 anhand eines allgemeinen Ausführungsbeispiels beschrieben. Fig. 1 zeigt eine Schaltung zur Durchführung einer Berechnung an Nutzeingangsdaten, um Nutzausgangsdaten zu erhalten, die allgemein mit 10 angezeigt ist. Die Schaltung 10 umfaßt eine Einrichtung 12 zum Durchführen eines Algorithmus, wie z.B. eines DES-, AES- oder RSA-Algorithmus, oder eines Teils desselben mit einem oder mehreren Algorithmusschritten, wie z.B. den Runden in dem Fall des DES- und AES-Algorithmus und den modularen Multiplikationen in dem Fall des RSA-Algorithmus. An einem Eingang 14 empfängt die Einrichtung 12 die zu verarbeitenden Nutzeingangsdaten, die sie in einer im folgenden zu erörternden Ausführungszeit in Nutzausgangsdaten umrechnet, die dieselbe wiederum an einem Ausgang 16 nach Ablauf derThe present invention will first be described with reference to FIG. 1 using a general exemplary embodiment. 1 shows a circuit for performing a calculation on useful input data in order to obtain useful output data which is generally indicated at 10. The circuit 10 comprises means 12 for performing an algorithm, such as a DES, AES or RSA algorithm, or a part thereof with one or more algorithm steps, such as the rounds in the case of the DES and AES algorithm and the modular multiplications in the case of the RSA algorithm. At an input 14, the device 12 receives the useful input data to be processed, which it converts into useful output data in an execution time to be discussed below, which in turn is used at an output 16 after the expiry of the
Ausführungszeit ausgibt. Die Schaltung 12 ist mit einer Steuereinrichtung 18 verbunden, die die Einrichtung 12 derart steuert, daß dieselbe vor einer Durchführung des eigentlichen Algorithmus mit den Nutzeingangsdaten, um die Nutzausgangsda- ten zu erhalten, und/oder nach derselben eine oder mehrere zusätzliche Algorithmusschritte durchführt.Output execution time. The circuit 12 is connected to a control device 18, which controls the device 12 in such a way that it carries out one or more additional algorithm steps before carrying out the actual algorithm with the useful input data in order to obtain the useful output data and / or after the same.
Die Steuereinrichtung 18 steuert die Einrichtung 12 dabei derart, daß während der Durchführung der zusätzlichen Algo- rithmusschritte vor der Durchführung des eigentlichen Algorithmus die Nutzeingangsdaten und während der zusätzlichen Algorithmusschritte nach der Durchführung des eigentlichen Algorithmus die erhaltenen Nutzausgangsdaten nicht gelöscht werden. Die Ausführungszeit, die die Schaltung 10 benötigt, um nach Eingang der Nutzeingangsdaten an dem Eingang 14 dieThe control device 18 controls the device 12 in such a way that the useful input data are not deleted while the additional algorithm steps are carried out before the actual algorithm is carried out and the useful output data obtained are not deleted during the additional algorithm steps after the actual algorithm is carried out. The execution time that the circuit 10 takes to receive the input data at the input 14
Nutzausgangsdaten an dem Ausgang 16 auszugeben, beträgt folglich die Summe der Zeitdauern, die die Einrichtung 12 zur Durchführung der Algorithmusschritte des eigentlichen Algorithmus und der zusätzlichen Algorithmusschritte vorher und nachher benötigt.Outputting the useful output data at the output 16 is consequently the sum of the time periods which the device 12 takes before and after it to carry out the algorithm steps of the actual algorithm and the additional algorithm steps.
Für die obige Schaltung 10 ergeben sich zwei wesentliche Eigenschaften, die dieselbe gegenüber Hardwareangriffen schützen. Zunächst ist die Korrelation zwischen Nutzeingangsdaten und Ausführungszeit der Schaltung 10 nicht mehr allein von dem durch die Einrichtung 12 implementierten Algorithmus und den Nutzeingangsdaten abhängig, da zu der reinen Berechnungs- dauer die für die Durchführung des oder der zusätzlichen Algorithmusschritte benötigte Zeitdauer hinzukommt. Eine Abhängigkeit der Ausführungszeit von den Nutzeingangsdaten wegen beispielsweise unterschiedlichen Cache-Treffern, bedingten Sprüngen oder dergleichen in der Einrichtung 12 werden hierdurch verschleiert. Insbesondere in dem Fall einer asynchron arbeitenden Einrichtung 12 ist die Zeitdauer zur Durchführung eines Algorithmusschrittes eingangsdatenabhängig. Dies liegt daran, daß asynchrone Schaltungen selbstgetaktet sind, so daß die Zwischenergebnisse der verschiedenen Logikbauelemente, aus denen die asynchronen Schaltungen aufgebaut sind, von den Logikbauelementen der nachfolgenden Stufe unabhängig von einem Takt immer dann bearbeitet werden, wenn alle als Eingangsdaten für ein jeweiliges Logikbauelement benötigten Zwi- schenergebnisse vorliegen. Hinzu kommt, daß verschiedene Eingangsdaten bei asynchronen Schaltungen dazu führen, daß verschiedene Logikpfade innerhalb der Logikbauelemente, aus denen die asynchrone Schaltung aufgebaut ist, eingeschlagen werden, die wiederum unterschiedliche Laufzeiten aufweisen. Dies führt dazu, daß asynchrone Schaltungen eine inhärent datenabhängige Ausführungszeit aufweisen, da jedes Zwischenergebnis und auch das Endergebnis je nach eingeschlagenen Logikpfaden innerhalb der Logikbauelemente unmittelbar und nicht in Einheiten eines Taktes früher oder später am Ausgang anliegt. In dem Fall einer asynchron selbstgetaktet arbeitenden Einrichtung 12 führt die Hinzufügung der Durchführung der zusätzlichen Algorithmusschritte folglich zu einer Verschleierung der Datenabhängigkeit der Ausführungszeit der Schaltung 10.The circuit 10 above has two essential properties which protect it against hardware attacks. First of all, the correlation between the useful input data and the execution time of the circuit 10 is no longer dependent solely on the algorithm implemented by the device 12 and the useful input data, since the pure calculation duration is the time required to carry out the additional algorithm step or steps. A dependency of the execution time on the user input data due to, for example, different cache hits, conditional jumps or the like in the device 12 is thereby obscured. In particular in the case of an asynchronously operating device 12, the time period for performing an algorithm step is dependent on the input data. This is because asynchronous circuits are self-clocked, so that the intermediate results of the various logic components from which the asynchronous circuits are constructed are processed by the logic components of the subsequent stage independently of a clock whenever all are required as input data for a respective logic component Interim results are available. In addition, different input data in asynchronous circuits lead to different logic paths within the logic components from which the asynchronous circuit is constructed, which in turn have different run times. This leads to the fact that asynchronous circuits have an inherently data-dependent execution time, since each intermediate result and also the end result, depending on the logic paths taken within the logic components, are present immediately and not in units of a cycle sooner or later at the output. In the case of an asynchronously self-clocking device 12, the addition of performing the additional algorithm steps consequently obscures the data dependency of the execution time of the circuit 10.
Verschiedene Maßnahmen können ergriffen werden, um die Abhängigkeit der Ausführungszeit der Schaltung 10 von den Nutzeingangsdaten 14 weiter zu reduzieren oder gar vollständig aufzuheben. Eine erste Möglichkeit besteht darin, die Anzahl der zusätzlich durchgeführten Algorithmusschritte vor und nach der Durchführung des eigentlichen Algorithmus von Berechnung zu Berechnung, d.h. von Nutzeingangsdatum zu Nutzeingangsda- tum, zufällig neu zu bestimmen. Auf diese Weise variiert der durch die zusätzlichen durchgeführten Algorithmusschritte bewirkte Teil der Ausführungszeit der Schaltung 10 pro Berechnung, so daß die Abhängigkeit der Ausführungszeit von den Nutzeingangsdaten noch geringer und Timing-Angriffe noch schwieriger sind. In dem Fall von Schaltungen, bei denen die Ausführungszeit abhängig von den zu verarbeitenden Daten ist, d.h. insbesondere in dem Fall von asynchronen, selbstgetaktet arbeitenden Schaltungen, kann eine weitergehende Verschleie- rung der Abhängigkeit der Ausführungszeit von den Nutzeingangsdaten dadurch erzielt werden, daß den zusätzlich durchgeführten Algorithmusschritten vor oder nach der Durchführung des eigentlichen Algorithmus zufällige „Schein"-Eingangsdaten zugrunde gelegt werden. Aufgrund der inhärent datenabhängigen Ausführungszeit einer asynchron arbeitenden Einrichtung 12 variiert die durch die zusätzlich durchgeführten Algorithmusschritte bewirkte zusätzliche Ausführungszeit, die zu der durch die Durchführung des eigentlichen Algorithmus bewirkte Ausführungszeit hinzukommt, in dem Fall einer asynchronen Schaltung auch dann, wenn die Anzahl von zusätzlichen Algorithmusschritten pro Berechnung gleich ist, vorausgesetzt daß die Algorithmusschritte unmittelbar hintereinander ausgeführt werden, ohne von einem externen Takt zu bestimmten Zeitpunkten ausgelöst zu werden ausgelöst zu werden.Various measures can be taken to further reduce the dependency of the execution time of the circuit 10 on the user input data 14 or even to completely eliminate it. A first possibility is to calculate the number of additional algorithm steps carried out before and after the actual algorithm has been carried out, from calculation to calculation, ie from the user input date to the user input data. tum, to be redetermined at random. In this way, the part of the execution time of the circuit 10 caused by the additional algorithm steps performed per calculation varies, so that the dependence of the execution time on the useful input data is even less and timing attacks are even more difficult. In the case of circuits in which the execution time is dependent on the data to be processed, ie in particular in the case of asynchronous, self-clocking circuits, the dependence of the execution time on the useful input data can be further obscured by the fact that the additional performed algorithm steps before or after the execution of the actual algorithm are based on random "sham" input data. Due to the inherently data-dependent execution time of an asynchronously working device 12, the additional execution time caused by the additionally performed algorithm steps varies from that to the execution of the actual algorithm effected execution time is added, in the case of an asynchronous circuit even if the number of additional algorithm steps per calculation is the same, provided that the algorithm steps immediately r be executed in succession without being triggered by an external clock at certain times.
Eine weitere Eigenschaft der Schaltung 10, die ihr zu einem erhöhten Schutz gegen Hardwareangriffe verhilft, besteht darin, daß die zusätzlich durchgeführten Algorithmusschritte auf Rechenoperationen gleicher Charakteristik beruhen, oder mit anderen Worten die zusätzlich durchgeführten Algorithmusschritte durch dieselbe Einrichtung 12 durchgeführt werden. Bei den oben genannten Beispielen sowie bei dem Ausführungsbeispiel von Fig. 2, das im folgenden erörtert wird, beruhen die Algorithmusschritte auf denselben Rechenoperationen und unterscheiden sich untereinander lediglich durch verschiedene Eingangsoperanden, wie z.B. das Zwischenergebnis des vorhergehenden Algorithmusschrittes und den in diesem Schritt zu verwendenden Schlüssel. In diesem Fall kann ein Angreifer unter Beobachtung des Leistungsverbrauches zusätzliche Schein- Algorithmusschritte nicht von denjenigen Algorithmusschritten unterscheiden, die während des eigentlichen Algorithmus durchgeführt werden.A further property of the circuit 10, which helps it to provide increased protection against hardware attacks, is that the additional algorithm steps carried out are based on arithmetic operations with the same characteristics, or in other words the additional algorithm steps carried out are carried out by the same device 12. In the above-mentioned examples and in the exemplary embodiment of FIG. 2, which is discussed below, the algorithm steps are based on the same arithmetic operations and differ from one another only by different input operands, such as the intermediate result of the previous algorithm step and those in this step key. In this case, an attacker, while observing the power consumption, cannot distinguish additional bogus algorithm steps from those algorithm steps that are carried out during the actual algorithm.
Im folgenden wird nun bezugnehmend auf Fig. 2 ein spezielles Ausführungsbeispiel für eine Schaltung zur Durchführung einer DES-Berechnung beschrieben, bei welchem zusätzliche Algorith- musschritte sowohl vor als auch nach der Durchführung des eigentlichen Algorithmus durchgeführt werden. Die Schaltung von Fig. 2, die allgemein mit 50 angezeigt ist, umfaßt einen Schaltungsteil 52 zum Durchführen eines DES-Algorithmus und eine Steuereinheit 54 zur Steuerung des Schaltungsteils 52. Der Schaltungsteil 52 umfaßt ein Eingangsregister 56, ein Ergebnisregister 58 und ein DES-Modul 60. Zudem umfaßt der Schaltungsteil 52 Multiplexer 62 und 64 sowie ein zusätzliches Register 66. Das Eingangsregister 56 ist direkt mit einem Eingang 68 der Schaltung 50 verbunden. Der Multiplexer 62 verbindet entweder das Eingangsregister 56 oder das zusätzliche Register 66 mit einem Eingang des DES-Moduls 60, je nach dem, wie es durch ein Steuersignal angezeigt wird, das der Multiplexer 62 von der mit demselben verbundenen Steuereinheit 54 erhält. Zur Rückführung des Ergebnisses einer Runde des DES-Algorithmus als Eingangsoperand für die nächste DES- Runde ist der Multiplexer 64 in der Lage, den Ausgang des DES-Moduls 60 über einen weiteren Multiplexer 69 mit dem Register 66 zu verbinden. Der Multiplexer 64 kann jedoch ferner den Ausgang des DES-Moduls mit dem Ergebnisregister 58 ver- binden. Die durch den Multiplexer 64 hergestellte Verbindung hängt von einem Steuersignal ab, das der Multiplexer 64 von der mit demselben verbundenen Steuereinheit 54 erhält. Das Ausgangsregister 58 ist mit einem Ausgang 70 der Schaltung 50 verbunden. Der Multiplexer 69 umfaßt neben dem mit dem Multi- plexer 64 verbundenen Eingang einen weiteren Eingang, über den, wie es im folgenden beschrieben werden wird, ein zufälliger Startwert dz in das Zusatzregister 66 ladbar ist, mit welchem ein Ausgang des Multiplexers 69 verbunden ist. Welchen der beiden Eingänge, d.h. denjenigen, an dem der Wert dz eingeht, oder denjenigen, zu dem das Zwischenergebnis von dem DES-Modul über den Multiplexer 64 zugeführt wird, der Multi- plexer 69 mit dem Eingang des Registers 62 verbindet, hängt von einem Steuersignal ab, das der Multiplexer 69 von der mit demselben verbundenen Steuereinheit erhält. Die Steuereinheit 54 umfaßt einen Zähler 72 zum Zählen der während einer Gesamtberechnung durchgeführten Runden, wie es im folgenden be- schrieben werden wird.A special exemplary embodiment of a circuit for carrying out a DES calculation is described below with reference to FIG. 2, in which additional algorithm steps are carried out both before and after the actual algorithm has been carried out. The circuit of FIG. 2, indicated generally at 50, includes a circuit portion 52 for performing a DES algorithm and a control unit 54 for controlling circuit portion 52. Circuit portion 52 includes an input register 56, a result register 58, and a DES module 60. In addition, the circuit section 52 comprises multiplexers 62 and 64 and an additional register 66. The input register 56 is connected directly to an input 68 of the circuit 50. The multiplexer 62 connects either the input register 56 or the additional register 66 to an input of the DES module 60, depending on how it is indicated by a control signal which the multiplexer 62 receives from the control unit 54 connected to it. To return the result of a round of the DES algorithm as an input operand for the next DES round, the multiplexer 64 is able to connect the output of the DES module 60 to the register 66 via a further multiplexer 69. However, the multiplexer 64 can also connect the output of the DES module to the result register 58. The connection established by the multiplexer 64 depends on a control signal which the multiplexer 64 receives from the control unit 54 connected to it. The output register 58 is connected to an output 70 of the circuit 50. In addition to the input connected to the multiplexer 64, the multiplexer 69 also includes a further input via which, as will be described below, a random start value d z can be loaded into the additional register 66 which an output of the multiplexer 69 is connected. Which of the two inputs, ie the one at which the value d z is received or the one to which the intermediate result is supplied by the DES module via the multiplexer 64, the multiplexer 69 connects to the input of the register 62 depends on a control signal which the multiplexer 69 receives from the control unit connected to it. The control unit 54 comprises a counter 72 for counting the laps carried out during an overall calculation, as will be described in the following.
Nachdem im vorhergehenden der Aufbau der Schaltung von Fig. 2 beschrieben worden ist, wird im folgenden die Funktionsweise derselben beschrieben. Die Schaltung 50 ist dazu vorgesehen, eine Berechnung an Nutzeingangsdaten an dem Eingang 68 durchzuführen, und das Ergebnis in Form von Nutzausgangsdaten an dem Ausgang 70 auszugeben. Insbesondere wird bei Fig. 2 angenommen, daß die Schaltung 50 zur Durchführung einer DES- Berechnung vorgesehen ist, die je 64 Bit an Nutzeingangsdaten auf 64 Bit Nutzausgangsdaten abbildet. Die DES-After the structure of the circuit of Fig. 2 has been described above, the operation of the same will be described below. The circuit 50 is provided to carry out a calculation on useful input data at the input 68 and to output the result in the form of useful output data at the output 70. In particular, it is assumed in FIG. 2 that the circuit 50 is provided for performing a DES calculation, which maps 64 bits of user input data to 64 bits of useful output data. The DES
Rundenberechnungen werden von dem DES-Modul 60 ausgeführt, welches vorliegend asynchron ist und selbstgetaktet arbeitet. Anders ausgedrückt, ist die Ausführungszeit der Rundenberechnungen durch das DES-Modul 60 für jede Runde bzw. für jeden Eingangswert unterschiedlich und das Ergebnis einer Runde liegt sofort nach Berechnung unabhängig von einem Takt an dem Ausgang des DES-Moduls 60 an. Eine Rundenberechnung durch das DES-Modul 60 ist folglich Eingangsdatenabhängig.Lap calculations are carried out by the DES module 60, which is asynchronous in the present case and works self-clocked. In other words, the execution time of the lap calculations by the DES module 60 is different for each lap or for each input value, and the result of a lap is present at the output of the DES module 60 immediately after the calculation, regardless of a clock. A lap calculation by the DES module 60 is therefore dependent on input data.
Mit einer Berechnung wird im folgenden die Verschlüsselung eines 64-Bit-Blocks der Nutzeingangsdaten an dem Eingang 68 verstanden. Während einer Berechnung wird der 64-Bit-Block 16 Runden unterzogen, die von dem DES-Modul 60 ausgeführt werden. Jede durch das DES-Modul 60 ausgeführt Runde beruht auf derselben Rechenoperation, die wiederum aus mehreren Rechenteiloperationen besteht. Diese Rechenteiloperationen bestehen aus folgenden Schritten: (1) Unterteilen des 64-Bit-Blocks der vorhergehenden Runde oder, in dem Fall der ersten Runde, der Nutzeingangsdaten in eine linke Hälfte von 32 Bits und eine rechte Hälfte von 32 Bits,In the following, a calculation is used to understand the encryption of a 64-bit block of the user input data at input 68. During a calculation, the 64-bit block is subjected to 16 rounds that are performed by the DES module 60. Each round performed by the DES module 60 is based on the same arithmetic operation, which in turn consists of several arithmetic operations. These arithmetic part operations consist of the following steps: (1) dividing the 64-bit block of the previous round or, in the case of the first round, the usage data into a left half of 32 bits and a right half of 32 bits,
(2) Abbilden der rechten Hälfte der vorhergehenden Runde auf eine linke Hälfte eines 64-Bit-Blocks der aktuell zu berechnenden Runde,(2) mapping the right half of the previous round to a left half of a 64-bit block of the current round to be calculated,
(3) Expandieren der 32 Bits der rechten Hälfte des vorhergehenden Blocks zu einem 48-Bit-Block gemäß einer Auswahltabelle, die einige der Bits der rechten Hälfte der vorhergehenden Runde doppelt verwendet,(3) expanding the 32 bits of the right half of the previous block into a 48 bit block according to a selection table that doubles some of the bits of the right half of the previous round,
(4) Unterziehen des expandierten 48-Bit-Blocks einer XOR- Operation mit einem aus einem DES-Schlüssel berechneten Runden- bzw. Teilschlüssel, der der aktuellen Runde zugeordnet ist,(4) subjecting the expanded 48-bit block to an XOR operation with a round key or partial key calculated from a DES key and assigned to the current round,
(5) Zugreifen mit jeder von acht Gruppen zu je sechs Bits des verschlüsselten 48-Bit-Blocks als Adresse auf sogenannte „S- Boxen", die Funktionen darstellen, die einen 6-Bit-Block auf einen 4-Bit-Block abbilden, wobei für jede Gruppe eine S-Box definiert ist,(5) access with each of eight groups of six bits each of the encrypted 48-bit block as an address to so-called "S-boxes" which represent functions which map a 6-bit block to a 4-bit block, where an S-Box is defined for each group,
(6) nach Abbildung jeder 6-Bit-Gruppe in eine 4-Bit-Gruppe, Permutieren des resultierenden 32-Bit-Blocks, und(6) after mapping each 6-bit group into a 4-bit group, permuting the resulting 32-bit block, and
(7) Durchführen einer XOR-Operation zwischen der linken Hälfte der vorhergehenden Runde und dem permutierten 32-Bit- Block, um die aktuellen 32 Bits der rechten Hälfte der aktuellen Runde zu erhalten.(7) Perform an XOR between the left half of the previous round and the permuted 32-bit block to get the current 32 bits of the right half of the current round.
Insgesamt 16 Runden werden so pro zu verarbeitendem 64-Bit-A total of 16 rounds are thus processed for each 64-bit
Block durchgeführt. Die Schaltung 50 führt zu einer vollständigen DES-Verschlüsselung noch weitere Permutationen durch. Insbesondere wurden für eine vollständige DES-Verschlüsselung die am Eingang 68 anliegenden 64 Bit zuvor einer weiteren Permutation unterzogen. Zudem werden die sich nach den 16 DES-Runden ergebenden 64 Bits einer inversen Permutation un- terzogen. Diese Permutationen, die beispielsweise über eine feste Verdrahtung erzielt werden, liefern jedoch keinen oder zumindest keinen nennenswerten Beitrag zur Gesamtberechnungs- dauer einer DES-Verschlüsselung und somit wird im folgenden in Hinblick auf die Ausführungszeit bzw. -dauer einer voll- ständigen DES-Verschlüsselung lediglich die Zeit berücksichtigt, die für die 16 DES-Runden notwendig sind. Für die folgende Erörterung setzt sich die reine Ausführungszeit für eine Berechnung der eigentlichen DES-Verschlüsselung eines 64- Bit-Datenblocks folglich aus den 16 Runden durch das DES- Modul 60 zusammen. Sie wäre aufgrund der asynchronen Natur des DES-Moduls 60 äußerst abhängig von den 64 Bit Eingangsdaten.Block performed. The circuit 50 carries out further permutations for a complete DES encryption. In particular, the 64 bits present at input 68 were previously subjected to a further permutation for complete DES encryption. In addition, the 64 bits resulting from the 16 DES rounds are subjected to an inverse permutation. However, these permutations, which are achieved, for example, via fixed wiring, make no or at least no significant contribution to the overall calculation time of DES encryption and are therefore only described below with regard to the execution time or duration of a complete DES encryption takes into account the time required for the 16 DES rounds. For the following discussion, the pure execution time for a calculation of the actual DES encryption of a 64-bit data block is therefore composed of the 16 rounds by the DES module 60. Due to the asynchronous nature of the DES module 60, it would be extremely dependent on the 64 bit input data.
Aus diesem Grunde werden den eigentlichen 16 Runden einer DES-Berechnung weitere Runden hinzugefügt, um die Korrelation zwischen Ausführungszeit der Schaltung 50 einerseits und geheimen Informationen, wie z.B. den zu verschlüsselnden Nutzeingangsdaten und dem DES-Schlüssel oder den Rundenschlüsseln, andererseits zu verringern.For this reason, additional rounds are added to the actual 16 rounds of a DES calculation in order to determine the correlation between the execution time of the circuit 50 on the one hand and secret information, such as e.g. the user input data to be encrypted and the DES key or the round key.
Zur Initialisierung einer Berechnung wird zunächst über den Multiplexer 69 ein zufälliger Startwert dz in das zusätzliche Register 66 geladen, der als Eingangsoperand für die zyklisch durchgeführten zusätzlichen Runden vor der Durchführung des eigentlichen Algorithmus dient. Daraufhin wird der Multiplexer 69 umgeschaltet, um von nun ab den Eingang des zusätzlichen Registers 66 mit dem Multiplexer 64 zu verbinden. Zusätzlich wird der Zähler 72 der Steuereinheit 54 auf einen zufälligen Startwert zo eingestellt. Bei Eintreffen des 64- Bit-Eingangsblocks wird derselbe zunächst in dem Eingangsregister 56 gespeichert. Die Steuereinheit 54 steuert den Multiplexer 62 derart an, daß zunächst der Zufallswert dε aus dem zusätzlichen Register 66 dem DES-Modul 60 zur Durchfuhrung einer DES-Runde zugeführt wird. Pro durchgeführter DES- Runde inkrementiert der Zahler 72 in der Steuereinheit 54 den Zählerwert z (i e |N, wobei i die Nummer der aktuell durchgeführten DES-Runde angeben soll) um 1. Hierzu ist der Zahler 72 vorzugsweise derart ausgeführt, daß der Zahlerwert Zj. Gray-codiert ist, so daß sich in der Bitdarstellung des Zahlerwertes Zj. lediglich ein Bit pro Inkrementation ändert, um wenig Anhaltspunkte für Hardwareangriffe zu bieten.To initialize a calculation, a random start value d z is first loaded into the additional register 66 via the multiplexer 69, which serves as an input operand for the cyclically carried out additional rounds before the actual algorithm is carried out. The multiplexer 69 is then switched over in order to connect the input of the additional register 66 to the multiplexer 64 from now on. In addition, the counter 72 of the control unit 54 is set to a random start value z o . When the 64-bit input block arrives, it is first stored in the input register 56. The control unit 54 controls the multiplexer 62 in such a way that the random value d ε first the additional register 66 is fed to the DES module 60 for carrying out a DES round. For each DES round carried out, the payer 72 increments the counter value z (ie | N, i being the number of the DES round currently being carried out) in the control unit 54 by 1. For this purpose, the payer 72 is preferably designed such that the counter value Zj , Gray-coded, so that in the bit representation of the counter value Zj . changes only one bit per increment to provide little clues for hardware attacks.
Das DES-Modul 60 hat auf diese Weise eine „Scheinrunde" durchgeführt, d.h. eine Runde, die nicht zu den eigentlichen Runden der eigentlichen DES-Berechnung gehört und somit nicht zur Berechnung der Nutzausgangsdaten dient. Die Steuereinheit 54 stellt den Multiplexer 64 derart ein, daß der Ausgang des DES-Moduls 60 mit dem Register 66 verbunden ist, so daß das Ergebnis der Scheinrunde in das zusatzliche Register 66 kopiert wird. Die Steuereinheit 54 überwacht, wie viele Scheinrunden mit den in dem zusatzlichen Register 66 gespeicherten Zwischenergebnissen durchgeführt werden und vergleicht standig den Zählerwert zx in dem Zahler 72 mit einem Vergleichswert v.In this way, the DES module 60 carried out a "false round", ie a round that does not belong to the actual rounds of the actual DES calculation and thus is not used to calculate the useful output data. The control unit 54 sets the multiplexer 64 in such a way that that the output of the DES module 60 is connected to the register 66 so that the result of the dummy round is copied into the additional register 66. The control unit 54 monitors how many false rounds are carried out and compared with the intermediate results stored in the additional register 66 constantly the counter value z x in the counter 72 with a comparison value v.
Sobald der Zählerwert z^ des Zahlers 72 den Vergleichswert v erreicht hat, stellt die Steuereinheit den Multiplexer 62 derart um, daß er das Eingangsregister 56 mit dem Eingang des DES-Moduls 60 verbindet. Auf diese Weise hat das DES-Modul 60 m = v - zo Scheinrunden durchgeführt, nämlich so viele Runden ausgehend von der Initialisierung, bis durch Inkrementation des Zufallswerts z0 der konstante Vergleichswert v erreicht worden ist. Die Anzahl von Scheinrunden zu diesem Zeitpunkt betragt folglich m = v - zo. Gemäß einem weiteren Ausfuhrungsbeispiel kann naturlich auch der Vergleichswert v zufallig eingestellt werden.As soon as the counter value z ^ of the counter 72 has reached the comparison value v, the control unit changes the multiplexer 62 in such a way that it connects the input register 56 to the input of the DES module 60. In this way, the DES module carried out 60 m = v - z o false rounds, namely as many rounds starting from the initialization until the constant comparison value v was reached by incrementing the random value z 0 . The number of bogus rounds at this time is therefore m = v - z o . According to a further exemplary embodiment, the comparison value v can of course also be set randomly.
Aufgrund der Umstellung des Multiplexers 62 wird nun der 64- Bit-Nutzdateneingangsblock, der wie im vorhergehenden erwähnt bereits einer Permutation in einem nicht gezeigten Permutationsmodul unterzogen worden ist, aus dem Eingangsregister 56 in das DES-Modul 60 eingespeist. Nach Durchführung der ersten DES-Runde an dem 64-Bit-Eingangsblock gibt das DES-Modul 60 das Ergebnis bzw. den ersten 64-Bit-Nutzzwischendatenblock über den Multiplexer 64 in das Zwischenregister 66 aus, woraufhin der Zähler 72 seinen Zählerwert Zi inkrementiert . Die Steuereinheit 54 stellt den Multiplexer 62 wieder derart um, daß das zusätzliche Register 66 mit dem Eingang des DES- Moduls 60 verbunden ist. Daraufhin werden die 15 restlichen Runden der eigentlichen DES-Berechnung durchgeführt, wobei jeweils das zu verschlüsselnde Zwischenergebnis von dem zusätzlichen Register 66 in das DES-Modul 60 eingegeben und dort einer DES-Runde unterzogen wird, und das neue Zwischen- ergebnis wieder in das zusätzliche Register 66 kopiert wird. Alternativ könnte während dieser 16 DES-Runden der eigentlichen DES-Berechnung jedes Zwischenergebnis auch in das Eingangsregister 56 kopiert werden, wobei in diesem Fall ein zusätzlicher Datenweg von dem Ausgang des DES-Moduls 60 über den Multiplexer 64 zu dem Register 56 führen würde.Due to the conversion of the multiplexer 62, the 64-bit user data input block, which as mentioned above, is now has already been subjected to a permutation in a permutation module, not shown, fed from the input register 56 into the DES module 60. After performing the first DES round on the 64-bit input block, the DES module 60 outputs the result or the first 64-bit useful intermediate data block via the multiplexer 64 into the intermediate register 66, whereupon the counter 72 increments its counter value Zi. The control unit 54 again switches the multiplexer 62 in such a way that the additional register 66 is connected to the input of the DES module 60. The 15 remaining rounds of the actual DES calculation are then carried out, the intermediate result to be encoded being entered by the additional register 66 into the DES module 60 and subjected to a DES round there, and the new intermediate result again in the additional one Register 66 is copied. Alternatively, each intermediate result could also be copied into the input register 56 during these 16 DES rounds of the actual DES calculation, in which case an additional data path from the output of the DES module 60 via the multiplexer 64 would lead to the register 56.
Die Steuereinheit 54 sorgt dafür, daß nach Durchführung der 16 DES-Runden der eigentlichen Berechnung der Multiplexer 64 derart umgestellt ist, daß das Register 58 mit dem Ausgang des DES-Moduls 60 verbunden ist. Das Ergebnis der 16-ten DES- Runde der tatsächlichen DES-Berechnung, das folglich den verschlüsselten 64-Bit-Nutzausgangsblock darstellt, wird dementsprechend in das Register 58 kopiert. Ab dem Zeitpunkt, da das benötigte Ergebnis bzw. der 64-Bit-Nutzausgangsblock zur Verfügung steht, d.h. nach 16 DES-Runden der tatsächlichen DES-Berechnung, werden weitere Rundenresultate nur noch in das zusätzliche Register 66 kopiert, welches sich von der Charakteristik, wie z.B. dem Stromverbrauch und den Schaltzeiten, her gleich verhält wie das Ergebnisregister 58, in dem nun das Ergebnis ruht. Hierfür sorgt die Steuereinheit 54 indem sie den Multiplexer 64 wieder derart umstellt, daß er den Ausgang des DES-Moduls 60 mit dem zusatzlichen Register 66 verbindet.The control unit 54 ensures that after the 16 DES rounds of the actual calculation, the multiplexer 64 is changed over such that the register 58 is connected to the output of the DES module 60. The result of the 16 th DES round of the actual DES calculation, which consequently represents the encrypted 64-bit useful output block, is correspondingly copied into the register 58. From the point in time when the required result or the 64-bit useful output block is available, ie after 16 DES rounds of the actual DES calculation, further round results are only copied into the additional register 66, which depends on the characteristics, such as the current consumption and the switching times, behaves the same as the result register 58, in which the result now rests. The control unit 54 takes care of this by converting the multiplexer 64 again so that it connects the output of the DES module 60 to the additional register 66.
Der Gray-codierte Zahler 72 bzw. sein Zahlerwert z ist indes weitergelaufen bis zu einem Wert v + 16 = z0 + m + 16. Obwohl das eigentliche 64-Bit-Ergebnis in dem Ergebnisregister 58 bereits zur Verfugung steht, laßt die Steuereinheit 54 das DES-Modul 60 weitere Scheinrunden ausfuhren, und sorgt dafür, daß so lange das Ergebnis in dem Ergebnisregister 58 zuruck- gehalten wird. Die Steuereinheit 54 überwacht den Zahlerwert zx des Zahlers 72 einen festen oder einen zufälligen Endwert e erreicht. In den auf die 16-te DES-Runde der eigentlichen DES-Berechnung folgenden Scheinrunden werden dem DES-Modul die in dem zusatzlichen Register 66 zwischengespeicherten Zwischenergebnisse zugeführt. Bei der ersten Scheinrunde nach der 16-ten DES-Runde der eigentlichen Berechnung wird dem DES-Modul folglich dasselbe Zwischenergebnis zugeführt, das zu dem schließlichen in dem Ergebnisregister 58 gespeicherten 64-Bit-Nutzdatenausgangsblock gefuhrt hat.The gray-coded counter 72 or its counter value z has, however, continued to a value v + 16 = z 0 + m + 16. Although the actual 64-bit result is already available in the result register 58, the control unit 54 the DES module 60 executes further false rounds and ensures that the result is held back in the result register 58 for as long as this. The control unit 54 monitors the payer value z x of the payer 72 reaches a fixed or a random final value e. In the apparent rounds following the 16th round of the actual DES calculation, the intermediate results temporarily stored in the additional register 66 are fed to the DES module. In the first dummy round after the 16th round of the actual calculation, the DES module is consequently supplied with the same intermediate result which has led to the 64-bit useful data output block finally stored in the result register 58.
Nachdem die Steuereinheit 54 festgestellt hat, daß der Zahlerwert Zj. des Zahlers 72 den Endwert e erreicht hat, sind insgesamt, d.h. inklusive der Scheinrunden und der 16-DES- Runden der eigentlichen Berechnung, n + 16 + m Runden durch das DES-Modul 60 durchgeführt worden, wobei n die Anzahl der nach der eigentlichen Berechnung ausgeführten Runden ist und n = e - zo - m - 16 betragt und m = v - zo ist. Bei Erreichen dieses Zählerwertes e unterbindet die Steuereinheit 54 jegliche Durchführung weiterer DES-Runden bei der aktuellen Be- rechnung und gibt das Ergebnis in dem Ergebnisregister 58 zur Ausgabe an dem Ausgang 70 frei.After the control unit 54 has determined that the counter value Zj . of the payer 72 has reached the end value e, n + 16 + m rounds have been carried out by the DES module 60 in total, ie including the false rounds and the 16 DES rounds of the actual calculation, where n is the number of rounds after the actual one Calculation of rounds performed and n = e - z o - m - 16 and m = v - z o . When this counter value e is reached, the control unit 54 prevents any further DES rounds from being carried out in the current calculation and releases the result in the result register 58 for output at the output 70.
Aus der vorhergehenden Erörterung der Funktionsweise wahrend einer DES-Berechnung der Schaltung 50 wird deutlich, daß die Korrelation zwischen den 64 Bit Nutzeingangsdaten und der zur Berechnung der 64 Bit Nutzausgangsdaten benotigten Ausfuhrungszeit, d.h. inklusive der Scheinrunden, gering ist. Jede in dem DES-Modul 60 durchgeführte Runde benötigt eine unterschiedliche Zeitdauer, die von den durch die jeweilige Runde zu verarbeitenden 64 Bit Eingangsdaten und dem jeweiligen Rundenteilschlüssel abhängt. Unter der Annahme, daß das DES- Modul 60 bei den Scheinrunden vor und nach der eigentlichen DES-Berechnung jeweils auch mit den während der eigentlichen DES-Berechnung zur Anwendung kommenden Rundenschlüsseln arbeitet, hängt die Gesamtberechnungsausführungszeit folglich vornehmlich von der Gesamtanzahl m + 16 + n der durchgeführ- ten DES-Runden, d.h. den DES-Runden der eigentlichen DES- Berechnung und den Scheinrunden vorher und nachher, ab. Aufgrund der selbstgetakteten Arbeitsweise des DES-Moduls 60 und der damit verbundenen eingangsdatenabhängigen Rundenberechnungszeit hängt die Gesamtausführungszeit ferner von dem Zu- fallswert ab, auf dem das zusätzliche Register 66 zu Beginn jeder Berechnung initialisiert wird. Die Gesamtanzahl der durchgeführten Runden m + 16 + n hängt wiederum von dem Zufallswert ab, auf den der Zähler 72 initialisiert wird, und zusätzlich, wie im vorhergehenden erwähnt, gegebenenfalls von einem zufälligen Vergleichswert v und einem zufälligen Endwert e.From the preceding discussion of the mode of operation during a DES calculation of the circuit 50, it is clear that the correlation between the 64-bit user input data and the execution time required for calculating the 64-bit useful output data, ie including the false rounds, is low. each The round carried out in the DES module 60 requires a different period of time, which depends on the 64 bit input data to be processed by the respective round and the respective round partial key. Assuming that the DES module 60 in the dummy rounds before and after the actual DES calculation also works with the round keys used during the actual DES calculation, the total calculation execution time therefore depends primarily on the total number m + 16 + n of the DES rounds carried out, ie the DES rounds of the actual DES calculation and the dummy rounds before and after. Due to the self-clocked mode of operation of the DES module 60 and the associated input data-dependent lap calculation time, the total execution time also depends on the random value on which the additional register 66 is initialized at the beginning of each calculation. The total number of rounds m + 16 + n in turn depends on the random value to which the counter 72 is initialized, and additionally, as mentioned above, possibly on a random comparison value v and a random final value e.
Bei einem Hardwareangriff, bei dem Zeitmessungen und Stromverbrauchsmessungen durchgeführt werden, können folglich zu- nächst kaum Rückschlüsse aus der Ausführungszeit auf geheime Daten, wie z.B. die Nuteingangsdaten oder den geheimen DES- Schlüssel, gezogen werden. Zudem können aufgrund von Beobachtungen des zeitlichen Verlaufs der Leistungsaufnahme Scheinrunden nicht von den eigentlichen 16 DES-Runden unterscheiden werden, da alle Runden von demselben DES-Modul 60 durchgeführt werden, und somit jede Runde, ob Scheinrunde oder eine der 16 DES-Runden, die gleiche Leistungsverbrauchcharakteristik aufweist.In the case of a hardware attack in which time measurements and power consumption measurements are carried out, it is initially difficult to draw conclusions from the execution time of secret data, such as the slot input data or the secret DES key are pulled. In addition, based on observations of the time course of the power consumption, false rounds cannot be distinguished from the actual 16 DES rounds, since all rounds are carried out by the same DES module 60, and thus each round, whether a false round or one of the 16 DES rounds has the same power consumption characteristics.
In der vorhergehenden Beschreibung wurde angenommen, daß der Zähler 72 gesteuert durch die Rundenabarbeitung durch das DES-Modul 60 seinen Zählerwert bei jedem Rundenabschluß in- krementiert, und daß die Rundenberechnungen durch das DES- Modul 60 somit unmittelbar aufeinander folgen, ohne daß ein äußerer Takt den Beginn jeder DES-Runde von außen vorgibt. Bei einem anderen Ausführungsbeispiel, ist der Zähler 72 getaktet, wobei dieser Takt auch zur Aktivierung der DES-Runden durch das DES-Modul 60 verwendet wird. In diesem Fall kann durch einen festen Endwert e erreicht werden, daß die DES- Berechnung durch die Schaltung 50 immer die selbe Zeit in Anspruch nimmt.In the foregoing description, it was assumed that the counter 72, controlled by the round processing by the DES module 60, updated its counter value every time the round was completed. incremented, and that the round calculations by the DES module 60 thus follow one another immediately, without an external clock dictating the start of each DES round from the outside. In another embodiment, counter 72 is clocked, which clock is also used to activate DES rounds by DES module 60. In this case, a fixed end value e can ensure that the DES calculation by the circuit 50 always takes the same time.
Bei einem alternativen Ausführungsbeispiel umfaßt die Steuereinheit 54 anstatt des Zählers 72 einen Zeitmesser, der die Zeitdauer vom Eintreffen der Nutzeingangsdaten an dem Eingang 78 an mißt, wobei die Steuereinheit 54 die DES-Berechnung durch die Schaltung 50 nach derjenigen DES-Scheinrunde vor bzw. nach der eigentlichen DES-Berechnung abbricht, an dem der Zeitmesser eine gewisse vorbestimmte Zeitdauer überschreitet. Auch in diesem Fall kann die Ausführungszeit der Schaltung 50 bis auf Einheiten einer Berechnungsdauer für ei- ne DES-Runde konstant gehalten werden.In an alternative embodiment, the control unit 54 instead of the counter 72 comprises a timer which measures the time from the arrival of the user input data at the input 78, the control unit 54 performing the DES calculation by the circuit 50 before and after the DES bill round the actual DES calculation stops, on which the timer exceeds a certain predetermined period of time. In this case too, the execution time of the circuit 50 can be kept constant except for units of a calculation duration for a DES round.
In dem Fall, daß die durch die Schaltung 50 zu verarbeitenden Nuteingangsdaten Daten eines bestimmten Protokolls mit konstanter Blocklänge sind, wie z.B. eines ATM-Protokolls (ATM = asynchronous transfer mode) , bei der die Blocklänge ein Vielfaches der DES-Blocklänge von 64 Bit ausmacht, kann die Verschlüsselung aller zu einem Protokollblock gehörenden DES- Blöcke in einem längeren „Mühlendurchgang" ausgeführt werden, so daß die Schaltung nicht zur Ruhe kommt, bis der Protokoll- Block vollständig verschlüsselt ist. Dabei kann die Anzahl der insgesamt anzuwendenden Ablenkungsrunden vx und ni zu Lasten einer vergrößerten Latenzzeit und unter Einfügung von zusätzlichen Registern minimiert werden. Es sind beispielsweise neben dem zusätzlichen Register pro 64 Bit Block eines Protokollblocks ein Eingangsregister und ein Ausgangregister vorgesehen, wobei abwechselnd Scheinrunden und dann die 16 Runden an einem der 64-Bit-Böcke durchgeführt werden. Das Ausführungsbeispiel von Fig. 2 bewirkt folglich durch zeitlich variables Voranstellen oder Anfügen von Operationen gleicher Charakteristik wie in dem zu schützenden Algorithmus aber unter Verwendung zufälliger Daten eine Verlängerung der Ausführungszeit auf einen beliebigen zufälligen oder aber auf einen einstellbaren konstanten Wert, aus dem nicht mehr auf die ursprüngliche datenabhängige Ausführungszeit rückgeschlossen werden kann. Dabei ist es wichtig darauf hinzuwei- sen, daß nicht nur der in Fig. 2 dargestellte DES-Algorithmus sondern auch viele andere Kryptoalgorithmen das Wiederholen von Operationen gleicher Charakteristik ohnehin beinhalten, wie z.B. der AES-Algorithmus, der 10, 12 oder 14 Runden aufweist, oder der RSA-Algorithmus, der die Ausführung mehrerer modularer Multiplikationen aufweist. Das Ausführungsbeispiel von Fig. 2 macht sich folglich für die zusätzlichen Operationen die vielen Algorithmen innewohnende Charakteristik der Wiederverwendung einer einzigen Operation zunutze.In the event that the slot input data to be processed by the circuit 50 is data of a certain protocol with a constant block length, such as an ATM protocol (ATM = Asynchronous Transfer Mode), in which the block length is a multiple of the DES block length of 64 bits , the encryption of all DES blocks belonging to a protocol block can be carried out in a longer "mill pass" so that the circuit does not come to rest until the protocol block has been completely encrypted. The number of deflection rounds v x and ni at the expense of increased latency and with the addition of additional registers. For example, in addition to the additional register per 64 bit block of a protocol block, an input register and an output register are provided, alternating false rounds and then the 16 rounds on one of the 64 bit Bucks are carried out. The embodiment of FIG. 2 consequently causes the execution time to be extended to any random or else to an adjustable constant value, from which no longer occurs, by temporally variable prepending or appending operations of the same characteristic as in the algorithm to be protected, but using random data the original data-dependent execution time can be inferred. It is important to note that not only the DES algorithm shown in FIG. 2, but also many other crypto-algorithms, involve repeating operations with the same characteristic anyway, such as the AES algorithm, which has 10, 12 or 14 rounds , or the RSA algorithm, which has the execution of several modular multiplications. The embodiment of FIG. 2 therefore makes use of the characteristic of many algorithms inherent in the reuse of a single operation for the additional operations.
Zudem wird, wie im vorhergehenden beschrieben, die datenabhängige Ausführungszeit von asynchronen Schaltungen unmeßbar gemacht, indem eine flexible einstellbare Kontrolleinheit bereitgestellt wird, die dafür sorgt, daß vor und/oder nach der eigentlichen Berechnung zufällige Berechnungen ausgeführt werden, um die wahre Berechnungsdauer zu verbergen.In addition, as described above, the data dependent execution time of asynchronous circuits is made immeasurable by providing a flexible adjustable control unit which ensures that random calculations are carried out before and / or after the actual calculation in order to hide the true calculation duration.
Bezugnehmend auf das Ausführungsbeispiel von Fig. 2 wird noch darauf hingewiesen, daß zusätzlich zu den drei gezeigten Registern noch ein viertes vorgesehen sein kann, in welchem der Zufallswert bei Initialisierung einer DES-Berechnung bereitgestellt werden kann, der der ersten DES-Scheinrunde zugrunde gelegt wird. Zusätzlich könnte das in Fig. 2 gezeigte Ausführungsbeispiel ohne weiteres auf den Fall übertragen werden, daß Scheinrunden nur vor oder nur nach den eigentlichen 16 DES-Runden durchgeführt werden. In diesem Fall kann entweder das Eingangsregister 56 oder das Ergebnisregister 58 fehlen. Andererseits könnte das obige Ausführungsbeispiel ohne weite- res auf den Fall übertragen werden, daß Scheinrunden auch zwischen den einzelnen Runden der eigentlichen Berechnung eingestreut werden. Es ist ebenfalls nicht notwendig, daß für die Rückkopplung des Zwischenergebnisses einer Vorrunde zu einer Nachrunde, ein Register in diesem Rückkopplungsweg vorgesehen ist, und zwar unabhängig davon, ob es sich um Scheinrunden oder zwei der 16 DES-Runden der eigentlichen Berechnung handelt. Ferner wird darauf hingewiesen, daß der Zählerwert des Zählers 72 in Fig. 2 während der bekanntermaßen fes- ten Anzahl von 16 DES-Runden der eigentlichen DES-Berechnung nicht inkrementiert werden muß, sofern für die 16 DES-Runden ein eigener Zähler vorhanden ist.With reference to the embodiment of FIG. 2, it is pointed out that in addition to the three registers shown, a fourth can be provided, in which the random value can be provided upon initiation of a DES calculation, which is used as the basis for the first DES round of notes , In addition, the exemplary embodiment shown in FIG. 2 could easily be transferred to the case that false rounds are only carried out before or only after the actual 16 DES rounds. In this case, either the input register 56 or the result register 58 may be missing. On the other hand, the above embodiment could without further res are transferred to the case that false rounds are also interspersed between the individual rounds of the actual calculation. It is also not necessary that a register is provided in this feedback path for the feedback of the preliminary result of a preliminary round to a subsequent round, regardless of whether it is a dummy round or two of the 16 DES rounds of the actual calculation. Furthermore, it is pointed out that the counter value of the counter 72 in FIG. 2 does not have to be incremented during the known fixed number of 16 DES rounds of the actual DES calculation, provided that a separate counter is available for the 16 DES rounds.
Ferner wird abschließend darauf hingewiesen, daß die Be- Schreibung bezugnehmend auf Fig. 1 ferner auf eine entsprechende Vorrichtung übertragen werden kann, bei der die Blöcke in Fig. 1 entsprechende Schritte eines Verfahrens darstellen. Allgemein ist die der vorliegenden Erfindung zugrundeliegende Idee in integrierten Schaltungen, Chipkarten, SIM-Karten oder verdrahteten Schaltungen implementierbar. Eine Implementierung in kombinierter Hard- und Software ist ebenfalls denkbar. Furthermore, it is finally pointed out that the description with reference to FIG. 1 can also be transferred to a corresponding device in which the blocks in FIG. 1 represent corresponding steps of a method. In general, the idea on which the present invention is based can be implemented in integrated circuits, chip cards, SIM cards or wired circuits. Implementation in combined hardware and software is also conceivable.
BezugszeichenlisteLIST OF REFERENCE NUMBERS
10 Schaltung10 circuit
12 Einrichtung zum Durchführen eines Algorithmus 14 Eingang12 device for performing an algorithm 14 input
16 Ausgang16 output
18 Steuereinrichtung18 control device
50 DES-Schaltung50 DES circuit
52 Schaltungsteil 54 Steuereinheit52 circuit part 54 control unit
56 Eingangsregister56 input registers
58 Ergebnisregister58 result register
60 DES-Modul60 DES module
62 Multiplexer 64 Multiplexer62 multiplexers 64 multiplexers
66 zusätzliches Register66 additional registers
68 Eingang68 entrance
69 Multiplexer69 multiplexers
70 Ausgang 72 Zähler 70 output 72 counter

Claims

Patentansprüche claims
1. Schaltung zum Durchführen einer Berechnung an Nutzeingangsdaten, um Nutzausgangsdaten zu erhalten, mit1. Circuit for performing a calculation on useful input data in order to obtain useful output data with
einer Einrichtung (12, 52) zum Durchführen eines Algorithmus mit einem oder mehreren Algorithmusschritten; undmeans (12, 52) for performing an algorithm with one or more algorithm steps; and
einer Steuereinrichtung (18; 54) zum Steuern der Einrichtung (12, 52) zum Durchführen, derart, daß dieselbe vor einera control device (18; 54) for controlling the device (12, 52) for performing such that the same before one
Durchführung des Algorithmus mit den Nutzeingangsdaten, um die Nutzausgangsdaten zu erhalten, und/oder nach der Durchführung des Algorithmus einen oder mehrere Algorithmusschritte durchführt.Execution of the algorithm with the user input data in order to obtain the useful output data and / or after the execution of the algorithm carries out one or more algorithm steps.
2. Schaltung gemäß Anspruch 1, bei der alle Algorithmusschritte auf der gleichen Rechenoperation basieren, und bei der die Einrichtung (52) zum Durchführen folgende Merkmale aufweist :2. Circuit according to claim 1, in which all algorithm steps are based on the same arithmetic operation, and in which the device (52) for performing has the following features:
ein Ergebnisregister (58);a result register (58);
ein Zusatzregister (66);an additional register (66);
eine Recheneinheit (60) zum Durchführen der Rechenoperation; undan arithmetic unit (60) for performing the arithmetic operation; and
eine Umschalteinheit (64) zum Verbinden eines Ausgangs der Recheneinheit (60) mit entweder dem Ergebnisregister (58) o- der dem Zusatzregister (66),a switchover unit (64) for connecting an output of the computing unit (60) to either the result register (58) or the additional register (66),
wobei die Steuereinheit (54) derart angepaßt ist, daß sie die Einrichtung zum Durchführen derart steuert, daß der Ausgang der Recheneinheit (60) beim Abschluß der Durchführung des Al- gorithmus mit dem Ergebnisregister (58) verbunden ist, und daß der Ausgang der Recheneinheit (60) während der Durchführung des einen oder der mehreren Algorithmusschritte nach der Durchführung des Algorithmus mit dem Zusatzregister (66) verbunden ist.the control unit (54) being adapted to control the means for performing such that the output of the arithmetic unit (60) is connected to the result register (58) when the execution of the algorithm is complete, and that the output of the arithmetic unit (60) while performing the one or more algorithm steps after the Execution of the algorithm is connected to the additional register (66).
3. Schaltung gemäß Anspruch 1 oder 2, bei dem die Einrichtung (52) zum Durchführen ferner ein Eingangsregister (56) zum3. A circuit according to claim 1 or 2, wherein the means (52) for performing further comprises an input register (56) for
Speichern der Nutzeingangsdaten während der Durchführung der Algorithmusschritte vor der Durchführung des Algorithmus aufweist.Storage of the useful input data while performing the algorithm steps before performing the algorithm.
4. Schaltung gemäß Anspruch 3, bei der die Einrichtung (52) ferner folgende Merkmale aufweist:4. A circuit according to claim 3, wherein the device (52) further comprises the following features:
ein Zufallsregister zum Speichern einer Zufallszahl; unda random register for storing a random number; and
eine weitere Umschalteinheit (62) zum Verbinden eines Eingangs der Recheneinheit (60) mit dem Eingangsregister (56) oder dem Zufallsregister (66),a further switching unit (62) for connecting an input of the computing unit (60) to the input register (56) or the random register (66),
wobei die Steuereinheit (54) derart angepaßt ist, daß sie die Einrichtung (52) zum Durchführen derart steuert,, daß bei Beginn der Durchführung der Algorithmusschritte vor der Durchführung des Algorithmus der Eingang der Recheneinheit (60) mit dem Zufallsregister und bei Beginn der Durchführung des Algorithmus der Eingang der Recheneinheit (60) mit dem Ein- gangsregister (56) verbunden ist.the control unit (54) being adapted such that it controls the means (52) for carrying out such that, when the algorithm steps are started before the algorithm is carried out, the input of the computing unit (60) with the random register and at the start of the execution the algorithm, the input of the computing unit (60) is connected to the input register (56).
5. Schaltung gemäß einem der Ansprüche 1 bis 4, bei dem die Steuereinheit einen Zähler (72) zum Inkrementieren eines Zählerwertes pro durchgeführtem Algorithmusschritt bei der Durchführung der Algorithmusschritte vor und/oder nach der Durchführung des Algorithmus aufweist, wobei die Steuereinheit (54) angepaßt ist, um die Durchführung der Algorithmusschritte abzubrechen, wenn der Zählerwert einen vorbestimmten Vergleichswert erreicht hat.5. Circuit according to one of claims 1 to 4, wherein the control unit has a counter (72) for incrementing a counter value per performed algorithm step when performing the algorithm steps before and / or after the execution of the algorithm, the control unit (54) being adapted to abort the execution of the algorithm steps when the counter value has reached a predetermined comparison value.
6. Schaltung gemäß Anspruch 5, bei der der Zähler (72) derart angepaßt ist, daß der Zählerwert Gray-codiert ist. 6. The circuit of claim 5, wherein the counter (72) is adapted such that the counter value is gray-coded.
7. Schaltung gemäß Anspruch 5 oder 6, bei der der Zähler (72) derart angepaßt ist, daß derselbe in einem synchronen Fall gemäß einem Takt inkrementiert, der ferner den Beginn der Durchführung jedes Algorithmusschritts, sowohl derjeniger vor und/oder nach der Durchführung des eigentlichen Algorithmus als auch derjeniger des Algorithmus, festlegt, oder derart angepaßt ist, daß derselbe in einem asynchronen Fall inkrementiert, sobald ein Algorithmusschritt bei der Durchführung der Algorithmusschritte oder ein Algorithmusschritt bei der Durchführung des Algorithmus beendet ist.7. A circuit as claimed in claim 5 or 6, wherein the counter (72) is adapted to increment in a synchronous case according to a clock which further starts the execution of each algorithm step, both before and / or after the execution of the actual algorithm as well as that of the algorithm, or is adapted in such a way that it increments in an asynchronous case as soon as an algorithm step in the execution of the algorithm steps or an algorithm step in the execution of the algorithm has ended.
8. Schaltung gemäß einem der Ansprüche 5 oder 6, die ferner eine Einrichtung zum Initialisieren des Zählerwertes auf ei- nen Zufallswert vor jeder Berechnung durch die Schaltung aufweist .8. A circuit according to claim 5 or 6, further comprising means for initializing the counter value to a random value before each calculation by the circuit.
9. Schaltung gemäß einem der Ansprüche 1 bis 4, bei dem die Steuereinheit (54) eine Einrichtung zum Erfassen der vergan- genen Zeitdauer für die Durchführung der Algorithmusschritte vor und/nach der Durchführung des Algorithmus aufweist, wobei die Steuereinheit (54) angepaßt ist, um die Durchführung der Algorithmusschritte abzubrechen, wenn die erfaßte Zeitdauer einen vorbestimmten Zeitwert erreicht hat.9. Circuit according to one of claims 1 to 4, in which the control unit (54) has a device for detecting the past period of time for performing the algorithm steps before and / after performing the algorithm, the control unit (54) being adapted to abort the execution of the algorithm steps when the detected time period has reached a predetermined time value.
10. Schaltung gemäß einem der Ansprüche 1 bis 9, bei der die Einrichtung (52) zum Durchführen selbstgetaktet arbeitet, und eine Ausführungszeit der Einrichtung (52) zum Durchführen von den Nutzeingangsdaten abhängt.10. Circuit according to one of claims 1 to 9, wherein the device (52) for performing self-clocking, and an execution time of the device (52) for performing depends on the useful input data.
11. Schaltung gemäß einem der Ansprüche 1 bis 10, bei der die Algorithmusschritte Runden eines DES- oder AES-Algorithmus oder modulare Multiplikationen eines RSA- oder eines ECC- Algorithmus sind.11. Circuit according to one of claims 1 to 10, wherein the algorithm steps are rounds of a DES or AES algorithm or modular multiplications of an RSA or an ECC algorithm.
12. Schaltung gemäß einem der Ansprüche 1 bis 11, bei dem der Algorithmus eine vorbestimmte Folge von Algorithmusschritten aufweist, und die Steuereinheit (54) derart angepaßt ist, daß die Einrichtung (52) zum Durchführen bei der Durchführung der Algorithmusschritte vor der Durchführung des Algorithmus und bei der Durchführung der Algorithmusschritte nach der Durch- führung des Algorithmus die Algorithmusschritte der vorbestimmten Folge nach durchführt.12. Circuit according to one of claims 1 to 11, wherein the algorithm a predetermined sequence of algorithm steps and the control unit (54) is adapted in such a way that the means (52) for performing when performing the algorithm steps before performing the algorithm and when performing the algorithm steps after performing the algorithm performs the algorithm steps according to the predetermined sequence ,
13. Verfahren zum Durchführen einer Berechnung an Nutzeingangsdaten, um Nutzausgangsdaten zu erhalten, mit13. Method for performing a calculation on useful input data in order to obtain useful output data with
Durchführen eines Algorithmus mit einem oder mehreren Algorithmusschritten; undPerforming an algorithm with one or more algorithm steps; and
Steuern der Durchführung derart, daß vor einer Durchführung des Algorithmus mit den Nutzeingangsdaten, um die Nutzausgangsdaten zu erhalten, und/oder nach der Durchführung des Algorithmus ein oder mehrere Algorithmusschritte durchgeführt werden. Controlling the implementation in such a way that one or more algorithm steps are carried out before the algorithm is carried out with the user input data in order to obtain the useful output data and / or after the algorithm is carried out.
PCT/EP2003/004841 2002-05-14 2003-05-08 Circuit and method for carrying out a calculation WO2003095112A2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2003224151A AU2003224151A1 (en) 2002-05-14 2003-05-08 Circuit and method for carrying out a calculation

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE10221409.3 2002-05-14
DE2002121409 DE10221409A1 (en) 2002-05-14 2002-05-14 Circuit and method for performing a calculation

Publications (2)

Publication Number Publication Date
WO2003095112A2 true WO2003095112A2 (en) 2003-11-20
WO2003095112A3 WO2003095112A3 (en) 2004-10-07

Family

ID=29413802

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2003/004841 WO2003095112A2 (en) 2002-05-14 2003-05-08 Circuit and method for carrying out a calculation

Country Status (4)

Country Link
AU (1) AU2003224151A1 (en)
DE (1) DE10221409A1 (en)
TW (1) TW591560B (en)
WO (1) WO2003095112A2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5700481B2 (en) * 2011-06-29 2015-04-15 インテル・コーポレーション Method and apparatus for encrypting memory with integrity check and protection against replay attacks

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000077973A2 (en) * 1999-06-11 2000-12-21 General Instrument Corporation Countermeasure to power attack and timing attack on cryptographic operations
US6175850B1 (en) * 1997-02-03 2001-01-16 Nippon Telegraph And Telephone Corporation Scheme for carrying out modular calculations based on redundant binary calculation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6175850B1 (en) * 1997-02-03 2001-01-16 Nippon Telegraph And Telephone Corporation Scheme for carrying out modular calculations based on redundant binary calculation
WO2000077973A2 (en) * 1999-06-11 2000-12-21 General Instrument Corporation Countermeasure to power attack and timing attack on cryptographic operations

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BORST J ET AL: "Cryptography on smart cards" COMPUTER NETWORKS, ELSEVIER SCIENCE PUBLISHERS B.V., AMSTERDAM, NL, Bd. 36, Nr. 4, 16. Juli 2001 (2001-07-16), Seiten 423-435, XP004304907 ISSN: 1389-1286 *
KOCHER P C ED - KOBLITZ N (ED) INTERNATIONAL ASSOCIATION FOR CRYPTOLOGIC RESEARCH: "TIMING ATTACKS ON IMPLEMENTATIONS OF DIFFIE-HELLMAN, RSA, DSS, AND OTHER SYSTEMS" ADVANCES IN CRYPTOLOGY - CRYPTO '96. 16TH. ANNUAL INTERNATIONAL CRYPTOLOGY CONFERENCE. SANTA BARBARA, AUG. 18 - 22, 1996. PROCEEDINGS, PROCEEDINGS OF THE ANNUAL INTERNATIONAL CRYPTOLOGY CONFERENCE (CRYPTO), BERLIN, SPRINGER, DE, Bd. CONF. 16, 18. August 1996 (1996-08-18), Seiten 104-113, XP000626590 ISBN: 3-540-61512-1 *

Also Published As

Publication number Publication date
DE10221409A1 (en) 2003-12-04
TW591560B (en) 2004-06-11
TW200400474A (en) 2004-01-01
WO2003095112A3 (en) 2004-10-07
AU2003224151A1 (en) 2003-11-11

Similar Documents

Publication Publication Date Title
DE19744961B4 (en) Generate unique and unpredictable values
DE60222052T2 (en) Encryption secured against attacks through the analysis of power consumption (DPA)
DE60207818T2 (en) Secure cryptographic calculation method with secret key and component applying such a method
EP2605445B1 (en) Method and apparatus for securing block ciphers against template attacks
DE60314584T2 (en) Masking of data decomposed or factored in a residual class system
DE69931606T2 (en) DATA TRANSMITTER AND RECORDING MEDIUM FOR RECORDING A PROGRAM FOR DATA TRANSFORMATION
EP2901611B1 (en) Side-channel-protected masking
DE69932740T2 (en) METHOD AND DEVICE FOR CRYPTOGRAPHIC DATA PROCESSING
DE102004042826B4 (en) Method and device for data encryption
EP1272984B1 (en) Portable data carrier with protection against side channel attacks
EP3215931B1 (en) Device and method for multiplication for impeding side-channel attacks
DE60022840T2 (en) METHOD FOR SECURING ONE OR MORE ELECTRONIC ASSEMBLIES, ASSISTING A PRIVATE KEY CYPRUS ALGORITHM, AND ELECTRONIC ASSEMBLY
DE10164416A1 (en) Method for multiplying two factors from the Galois field and multipliers for performing the method
WO2013004490A1 (en) Method for generating a random output bit sequence
DE60034944T2 (en) Countermeasure procedure in a secret and dynamic encryption algorithm exporting electronic circuit
WO2003095112A2 (en) Circuit and method for carrying out a calculation
DE102004010666B4 (en) Key bit stream generation
EP1573955B1 (en) Encoding method
EP1110185B1 (en) Access-protected data carrier
EP1588518B1 (en) Device and method for the calculation of encrypted data from unencrypted data or unencrypted data from encrypted data
DE19921633A1 (en) Procedure for implementing cryptographic algorithms
DE102014216392A1 (en) Symmetric iterated block ciphering method and corresponding device
EP1046131A1 (en) Data processing device and operating method for preventing a differential current consumption analysis
EP1397886B1 (en) Authentication by means of a challenge-response method
EP1056241B1 (en) Method for encrypting a digital information and transmission module

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A2

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NI NO NZ OM PH PL PT RO RU SC SD SE SG SK SL TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A2

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
WWE Wipo information: entry into national phase

Ref document number: 2003720558

Country of ref document: EP

WWW Wipo information: withdrawn in national office

Ref document number: 2003720558

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: JP

WWW Wipo information: withdrawn in national office

Country of ref document: JP