DE10042234C2 - Method and device for performing a modular exponentiation in a cryptographic processor - Google Patents

Method and device for performing a modular exponentiation in a cryptographic processor

Info

Publication number
DE10042234C2
DE10042234C2 DE10042234A DE10042234A DE10042234C2 DE 10042234 C2 DE10042234 C2 DE 10042234C2 DE 10042234 A DE10042234 A DE 10042234A DE 10042234 A DE10042234 A DE 10042234A DE 10042234 C2 DE10042234 C2 DE 10042234C2
Authority
DE
Germany
Prior art keywords
random number
symbol
module
exponent
numbers
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
DE10042234A
Other languages
German (de)
Other versions
DE10042234A1 (en
Inventor
Holger Sedlak
Jean-Pierre Seifert
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Infineon Technologies AG
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 DE10042234A priority Critical patent/DE10042234C2/en
Priority to AU2001287675A priority patent/AU2001287675A1/en
Priority to PCT/EP2001/009285 priority patent/WO2002019065A2/en
Publication of DE10042234A1 publication Critical patent/DE10042234A1/en
Application granted granted Critical
Publication of DE10042234C2 publication Critical patent/DE10042234C2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/002Countermeasures against attacks on cryptographic mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1416Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights
    • G06F12/145Protection against unauthorised use of memory or access to memory by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights the protection being virtual, e.g. for virtual blocks or segments before a translation mechanism
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/75Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation
    • G06F21/755Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by inhibiting the analysis of circuitry or operation with measures against power attack
    • 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/60Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers
    • G06F7/72Methods or arrangements for performing computations using a digital non-denominational number representation, i.e. number representation without radix; Computing devices using combinations of denominational and non-denominational quantity representations, e.g. using difunction pulse trains, STEELE computers, phase computers using residue arithmetic
    • G06F7/723Modular exponentiation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3006Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
    • H04L9/302Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters involving the integer factorization problem, e.g. RSA or quadratic sieve [QS] schemes
    • 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
    • G06F2207/7257Random modification not requiring correction
    • 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/7271Fault verification, e.g. comparing two values which should be the same, unless a computational fault occurred

Description

Die vorliegende Erfindung bezieht sich auf die Kryptographie und insbesondere auf die modulare Exponentiation als eine der wichtigsten arithmetischen Operationen beispielsweise in Public-Key-Kryptographie-Verfahren.The present invention relates to cryptography and particularly on modular exponentiation as one of the most important arithmetic operations, for example in public key cryptography.

Seit einigen Jahren gibt es sogenannte Informations-Leck-At­ tacken auf Kryptographie-Prozessoren, welche versuchen, ge­ heime Daten aus der Berechnung der modularen Exponentiation zu gewinnen, welche eine der zentralen Rechenoperationen beispielsweise bei Public-Key-Kryptographie-Verfahren ist. Ein dominierendes derartiges Verfahren ist beispielsweise das RSA-Verfahren zum Erzeugen einer RSA-Signatur einer Nachricht M, d. h. C := Md mod N.For a few years now there have been so-called information leak attacks on cryptography processors, which try to obtain secret data from the calculation of the modular exponentiation, which is one of the central computing operations, for example in public key cryptography processes. A dominant method of this type is, for example, the RSA method for generating an RSA signature of a message M, ie C: = M d mod N.

Alternativ kann neben der RSA-Signatur die modulare Exponen­ tiation beispielsweise auch bei der RSA-Entschlüsselung ver­ wendet werden. In diesem Fall ist M die verschlüsselte Nach­ richt, während C die entschlüsselte Nachricht ist. Daraus wird ersichtlich, daß die modulare Exponentiation sowohl bei einer Verschlüsselung, wie z. B. der RSA-Signatur, als auch bei einer Entschlüsselung, wie z. B. der RSA- Entschlüsselung, eingesetzt werden kann. Die mathematische Operation bleibt die gleiche, die Bedeutungen der Variablen C und M sind jedoch in beiden Fällen genau entgegengesetzt.Alternatively, in addition to the RSA signature, the modular expon tation, for example, for RSA decryption be applied. In this case, M is the encrypted post dir while C is the decrypted message. from that it can be seen that the modular exponentiation at both encryption, such as B. the RSA signature, as well with decryption, such as B. the RSA Decryption, can be used. The math Operation remains the same, the meanings of the variables However, C and M are exactly opposite in both cases.

Bei einer RSA-Signatur ist der Modul N üblicherweise be­ kannt, während der Exponent d geheim ist.With an RSA signature, module N is usually be knows while the exponent d is secret.

Sogenannte Informations-Leck-Attacken versuchen, aus der Be­ rechnung der modularen Exponentiation geheime Daten bei­ spielsweise über den geheimen Schlüssel oder Exponenten d zu gewinnen. Hierzu sei lediglich beispielhaft auf folgende Veröffentlichungen hingewiesen: P. Kocher "Timing Attacks on Implementations of DH, RSA, DSS and other Systems" (Proc. Of CRYPTO'96), D. Boneh, R. DeMillo, R. Lipton "On the Impor­ tance of Checking Cryptographic Protocols for Faults" (Proc. Of EUROCRYPT'97), P. Kocher, J. Jaffe, B. Jun "Differential- Power-Analysis" (Proc. Of CRYPTO'99) and J. Quisquater, D. Samyde "Electromagnetic-Analysis-Attacks" (Rumpsession of EUROCRYPT'00).So-called information leak attacks try to get out of the Be calculation of the modular exponentiation of secret data for example via the secret key or exponent d win. The following are only examples  Publications noted: P. Kocher "Timing Attacks on Implementations of DH, RSA, DSS and other systems "(Proc. Of CRYPTO'96), D. Boneh, R. DeMillo, R. Lipton "On the Impor Dance of Checking Cryptographic Protocols for Faults "(Proc. Of EUROCRYPT'97), P. Kocher, J. Jaffe, B. Jun "Differential Power Analysis "(Proc. Of CRYPTO'99) and J. Quisquater, D. Samyde "Electromagnetic Analysis Attacks" (Rumpsession of EUROCRYPT'00).

Im nachfolgenden wird auf Fig. 3 eingegangen, welche ein Flußdiagramm einer üblichen modularen Exponentiation zeigt. Der Algorithmus beginnt in einem Block 100 und initialisiert zunächst die benötigten Variablen, nämlich den Modul N, den Exponenten d und die zu signierende Nachricht M bzw. alter­ nativ die zu entschlüsselnde Nachricht (im Falle einer RSA- Entschlüsselung) in einem Block 102. Aus diesen Größen wird unter Verwendung der im Block 104 gegebenen üblichen Formel zur modularen Exponentiation das verschlüsselte Symbol C im Falle einer RSA-Signatur bzw. das entschlüsselte Symbol C im Falle einer RSA-Entschlüsselung berechnet. Das Ergebnis wird dann in einem Block 106 ausgegeben, wonach der Algorithmus in einem Block 108 beendet ist.In the following will be made to FIG. 3, which shows a flowchart of a conventional modular exponentiation. The algorithm begins in a block 100 and first initializes the required variables, namely the module N, the exponent d and the message M to be signed or alternatively the message to be decrypted (in the case of RSA decryption) in a block 102 . The encrypted symbol C in the case of an RSA signature or the decrypted symbol C in the case of RSA decryption is calculated from these variables using the usual modular exponentiation formula given in block 104 . The result is then output in a block 106 , after which the algorithm is ended in a block 108 .

Dieses allgemeine Schema zur Berechnung der im Block 104 ge­ gebenen modularen Exponentiation umfaßt keinerlei Gegenmaß­ nahmen gegen irgendeine Form von Attacken, wie z. B. eine Timing-Attacke, eine Leistungs-Attacke oder eine Strahlungs- Attacke.This general scheme for calculating the modular exponentiation given in block 104 does not include any countermeasures against any form of attack, e.g. B. a timing attack, a performance attack or a radiation attack.

Die DE 198 28 936 A1 umfaßt ein Verfahren und eine Vorrich­ tung zum Verarbeiten von Daten, um eine modulare Exponentia­ tion besser gegen äußere Attacken sichern zu können. Das in der DE 198 28 936 A1 offenbarte Verfahren stellt sich etwa wie in Fig. 4 aufgezeichnet dar. Im Unterschied zu dem in Fig. 3 gezeigten bekannten Ausführungsbeispiel wird bei dem in Fig. 4 gezeigten bekannten Verfahren eine Randomisierung des Exponenten d unter Verwendung einer Zufallszahl r1 sowie eine Randomisierung der Basis unter Verwendung einer Zufallszahl r2 vorgeschlagen. Im einzelnen werden in einem Block 110 die Variablen M, d, N und ϕ(N) initialisiert. ϕ(N) stellt dabei die sogenannte Eulersche ϕ-Funktion dar, welche durch (p - 1) × (q - 1) definiert ist, wie es in der in Fig. 4 dargestellten Gleichung zu sehen ist. Daraufhin wird eine Zufallszahl r1 in einem Schritt 112 zum Randomisieren des Exponenten ausgewählt. Anschließend wird eine Zufallszahl r2 in einem Schritt 114 zum Randomisieren der Basis M ausge­ wählt. Daraufhin wird bei dem bekannten Verfahren die im Block 116 dargestellte modulare Exponentiation durchgeführt, um das verarbeitete Symbol C in dem Block 106 zu erhalten, wonach der Algorithmus beendet ist.DE 198 28 936 A1 comprises a method and a device for processing data, in order to better protect a modular exponentia against external attacks. The method disclosed in DE 198 28 936 A1 is approximately as recorded in FIG. 4. In contrast to the known exemplary embodiment shown in FIG. 3, in the known method shown in FIG. 4, exponent d is randomized using a Random number r 1 and a randomization of the base using a random number r 2 are proposed. In detail, the variables M, d, N and ϕ (N) are initialized in a block 110 . ϕ (N) represents the so-called Euler ϕ function, which is defined by (p - 1) × (q - 1), as can be seen in the equation shown in FIG. 4. A random number r 1 is then selected in a step 112 to randomize the exponent. A random number r 2 is then selected in a step 114 to randomize the base M. The modular exponentiation shown in block 116 is then carried out in the known method in order to obtain the processed symbol C in block 106 , after which the algorithm is ended.

Ein ähnliches Verfahren wird auch in dem US-Patent Nr. 5,991,415 von Adi Shamir beschrieben. Auch hier wird die Eu­ lersche ϕ-Funktion zur Randomisierung des Exponenten einge­ setzt.A similar process is also described in U.S. Patent No. 5,991,415 by Adi Shamir. Again, the EU ler's ϕ function for randomizing the exponent puts.

Ein anderes Verfahren zum Berechnen der modularen Exponen­ tiation besteht darin, die modulare Exponentiation unter Verwendung des chinesischen Restsatzes (CRT; CRT = Chinese Residue bzw. Reminder Theorem) durchzuführen. Die modulare Exponentiation unter Verwendung des chinesischen Restsatzes ist in der Technik bekannt und beispielsweise im Handbook of Applied Cryptography von Menezes, van Oorschort und van Sto­ ne, Seiten 610 bis 613, erschienen im Springer-Verlag, be­ schrieben. Zunächst werden in einem Block 118 die nötigen Variablen M, dp, dq, p und q initialisiert. Wie es unten in Fig. 5 dargestellt ist, sind p und q die geheimen RSA- Primzahlen, deren Produkt den Modul N ergibt. Die Variable d ist wieder der geheime RSA-Exponent. Die Hilfsgrößen dp und dq werden berechnet, wie es ebenfalls in Fig. 5 dargestellt ist. ϕ(p) bedeutet hier wieder die Eulersche ϕ-Funktion.Another method for calculating the modular exposure is to carry out the modular exponentiation using the Chinese residual theorem (CRT; CRT = Chinese Residue or Reminder Theorem). Modular exponentiation using the Chinese residual theorem is known in the art and is described, for example, in the Handbook of Applied Cryptography by Menezes, van Oorschort and van Sto ne, pages 610 to 613, published by Springer-Verlag. First, the necessary variables M, d p , d q , p and q are initialized in a block 118 . As shown in Fig. 5 below, p and q are the secret RSA prime numbers, the product of which gives the module N. The variable d is again the secret RSA exponent. The auxiliary quantities d p and d q are calculated, as is also shown in FIG. 5. ϕ (p) here again means the Euler ϕ function.

Entsprechend dem chinesischen Restsatz werden dann die Grö­ ßen Cp und Cq berechnet, wie es in den Blöcken 120 bzw. 122 dargestellt ist. Die Größe xp ergibt sich aus Cp und Cq, wie es in einem Block 124 veranschaulicht ist. Das verarbeitete Symbol C ergibt sich dann aus der Bestimmungsgleichung für C, die in einem Block 126 in Fig. 5 dargestellt ist. Es sei darauf hingewiesen, daß Fig. 5 die modulare Exponentiation mittels dem chinesischen Restsatz nach dem Algorithmus von H. L. Garner darstellt.The quantities C p and C q are then calculated in accordance with the Chinese remainder theorem, as shown in blocks 120 and 122 , respectively. The size x p results from C p and C q , as illustrated in a block 124 . The processed symbol C then results from the determination equation for C, which is shown in a block 126 in FIG. 5. It should be pointed out that FIG. 5 shows the modular exponentiation using the Chinese residual theorem according to the HL Garner algorithm.

Die bisherigen Abwehrmaßnahmen der eingangs aufgeführten At­ tacken lassen sich gemäß der Berechnung der Exponentiation in zwei Gruppen unterteilen: Nicht-Benutzung oder aber Be­ nutzung des chinesischen Restsatzes zur Berechnung der modu­ laren Exponentiation. Abwehrmaßnahmen für beide Fälle sind in dem US-Patent Nr. 5,991,415 beschrieben und basieren im wesentlichen auf einer randomisierten Berechnung der modula­ ren Exponentiation.The previous defense measures of the At can be tacked according to the calculation of the exponentiation divide into two groups: non-use or Be Use of the Chinese residual rate to calculate the modu laren exponentiation. Countermeasures for both cases are in U.S. Patent No. 5,991,415 and are based on essentially on a randomized calculation of the modula ren exponentiation.

Die Verwendung des chinesischen Restsatzes zur modularen Ex­ ponentiation, wie es in Fig. 5 dargestellt ist, liefert je­ doch keine Gegenmaßnahmen gegen sogenannte Differential Fault Attacks nach Boneh, DeMillo und Lipton. Sogenannte Fault Attacks basieren darauf, Fehler in die kryptographi­ sche Berechnung einzuführen, und den Schlüssel zu identifi­ zieren, indem die mathematischen und statistischen Eigen­ schaften der fehlerhaft berechneten Ergebnisse analysiert werden. Unter den vielen vorgeschlagenen Techniken zum Ein­ fügen solcher Fehler befinden sich die Verwendung einer io­ nisierenden Strahlung, unüblicher Betriebstemperaturen, Lei­ stungs- und Taktveränderungen sowie eine Laser-basierte Chip-Mikrochirurgie. Bestimmte Attacken sind differentiell, d. h. es wird sowohl eine korrekte als auch eine fehlerhafte Berechnung unter Verwendung der gleichen Eingabe durchge­ führt, woraufhin die Differenzen der Ergebnisse analysiert werden. Bezüglich näherer Details und weiterer solcher At­ tacken wird auf das US-Patent Nr. 5,991,415 verwiesen.The use of the Chinese remainder of the sentence for modular exponentiation, as shown in FIG. 5, does not provide any countermeasures against so-called differential fault attacks according to Boneh, DeMillo and Lipton. So-called fault attacks are based on introducing errors into the cryptographic calculation and identifying the key by analyzing the mathematical and statistical properties of the incorrectly calculated results. Among the many techniques proposed for inserting such errors are the use of ionizing radiation, unusual operating temperatures, power and clock changes, and laser-based chip microsurgery. Certain attacks are differential, meaning that both correct and erroneous calculations are performed using the same input, after which the differences in the results are analyzed. For more details and other such attacks, reference is made to US Pat. No. 5,991,415.

Eine Möglichkeit, um diese Attacken zu umgehen, besteht dar­ in, im wesentlichen die in Fig. 5 gezeigte Berechnung zwei­ mal auszuführen, wobei es bevorzugt wird, unterschiedliche Algorithmen zu verwenden. Wenn irgendeine Diskrepanz zwischen den zwei Ergebnissen gefunden werden sollte, sollte der kryptographische Prozessor, der beispielsweise in einer Geldkarte oder Smartcard untergebracht ist, keinerlei Ausga­ ben liefern. Dies erzeugt einen starken Schutz vor zufälli­ gen Fehlern, welche lediglich mit einer sehr geringen Wahr­ scheinlichkeit zwei Berechnungen auf identische Art und Wei­ se beeinträchtigen. Diese Maßnahme führt jedoch zu einer Verringerung der Rechengeschwindigkeit um den Faktor 2. Eine solche Verringerung ist jedoch besonders in Smart-Card-Im­ plementationen, welche eine begrenzte Rechenleistung mit sich bringen, oftmals nicht tolerabel. Wenn insbesondere an die breite Verwendung von Geldkarten bzw. Ausweisen mit Si­ gnaturchips gedacht wird, so ist es ohne weiteres einsich­ tig, daß der kryptographische Algorithmus zwar sehr sicher sein muß, jedoch in der benötigten Rechenleistung begrenzt sein muß, da sonst die Anschaffungskosten für Lesegeräte derart immens werden, daß ein solches System lediglich eine sehr schlechte Marktakzeptanz erreichen wird.One way to circumvent these attacks is to essentially perform the calculation shown in FIG. 5 twice, with it being preferred to use different algorithms. If any discrepancy between the two results is found, the cryptographic processor, which is housed, for example, in a cash card or smart card, should not provide any output. This creates strong protection against accidental errors, which only have a very low probability of affecting two calculations in an identical manner. However, this measure leads to a reduction in the computing speed by a factor of 2. However, such a reduction is often intolerable, particularly in smart card implementations which entail limited computing power. If in particular the widespread use of money cards or ID cards with Si gnaturchips is considered, it is clear that the cryptographic algorithm must be very secure, but must be limited in the computing power required, otherwise the acquisition costs for reading devices become so immense that such a system will only achieve very poor market acceptance.

Daraus folgt jedoch, daß bei kryptographischen Systemen na­ türlich die Sicherheit ein wesentlicher Faktor ist, daß je­ doch auf die Effizienz der Berechnung, d. h. ein sinnvoller und sparsamer Umgang mit Rechenressourcen, ebenfalls ein ge­ wichtiger Faktor ist, welcher oftmals letztendlich darüber entscheiden wird, ob ein System vom Markt angenommen wird oder nicht. However, it follows that in cryptographic systems na Of course, security is an essential factor that ever but on the efficiency of the calculation, d. H. a sensible one and economical use of computing resources, also a ge important factor is which often ultimately about it will decide whether a system is accepted by the market or not.  

Das U.S.-Patent Nr. 5,046,094 offenbart ein Server-un­ terstütztes Berechnungsverfahren zum Berechnen der RSA- Gleichung, wobei eine Nachricht durch einen Exponenten potenziert wird und modular unter Verwendung eines Moduls reduziert wird. Hierzu wird unter Verwendung von Zufalls­ zahlen aus dem Exponenten ein abgeleiteter Exponent erzeugt. Eine Hilfseinheit berechnet dann die RSA-Gleichung unter Verwendung des abgeleiteten Exponenten und liefert dieses Ergebnis zurück zu einer Haupteinheit. Die Haupteinheit berechnet dann unter Verwendung der mittels des abgeleiteten Exponenten berechneten verschlüsselten Nachricht und des Moduls eine verschlüsselte Nachricht, wie sie durch Verwendung des ursprünglichen Exponenten erhalten worden wäre. Der abgeleitete Exponent wird durch Summation des ursprünglichen Exponenten und einer Zufallszahl und durch modulares Reduzieren des Ergebnisses der Summation unter Verwendung der Carmichaelschen Funktion als Modul berechnet.U.S. Patent No. 5,046,094 discloses a server supported calculation method for calculating the RSA Equation, where a message by an exponent is exponentiated and modular using a module is reduced. This is done using random numbers a derived exponent is generated from the exponent. An auxiliary unit then calculates the RSA equation under Use the derived exponent and return it Result back to a main unit. The main unit then calculated using that derived from the Exponent calculated encrypted message and the Module an encrypted message as it goes through Use of the original exponent has been obtained would. The derived exponent is calculated by summing the original exponents and a random number and by modularly reducing the result of the summation below Using the Carmichael function as a module.

Die Aufgabe der vorliegenden Erfindung besteht darin, ein Verfahren und eine Vorrichtung zum Durchführen einer modula­ ren Exponentiation zu schaffen, welche einen hohen Sicher­ heitsstandard liefern, jedoch gleichzeitig keinen all zu ho­ hen Rechenaufwand erfordern.The object of the present invention is a Method and device for performing a modula to create their exponentiation, which is highly secure supply standard, but not too high at the same time hen require computing effort.

Diese Aufgabe wird durch ein Verfahren zum Durchführen einer modularen Exponentiation nach Patentanspruch 1 oder durch eine Vorrichtung zum Durchführen einer modularen Exponentia­ tion nach Patentanspruch 13 gelöst. This task is accomplished by a method for performing a modular exponentiation according to claim 1 or by a device for carrying out a modular exponentia tion solved according to claim 13.  

Der vorliegenden Erfindung liegt die Erkenntnis zugrunde, daß die Verwendung der Eulerschen ϕ-Funktion zur Randomisie­ rung des Exponenten d zwar einen effektiven Schutz gegenüber äußeren Attacken liefert, da diese Randomisierung zu einer starken Homogenisierung des Strom- und Zeitprofils bei der Berechnung der modularen Exponentiation führt, daß jedoch der Rechenaufwand beträchtlich werden kann. Erfindungsgemäß wird daher von einer Randomisierung des Exponenten d unter Verwendung der Eulerschen ϕ-Funktion weggegangen. Statt des­ sen wird eine Randomisierung unter Verwendung der Carmicha­ elschen λ-Funktion verwendet, welche bei ähnlich großem Si­ cherheitsstandard zu einer deutlichen Reduktion der erfor­ derlichen Rechenleistung führt. Der randomisierte Exponent d' ergibt sich aus folgendem Zusammenhang:
The present invention is based on the knowledge that the use of Euler's ϕ function for randomizing the exponent d provides effective protection against external attacks, since this randomization leads to a strong homogenization of the current and time profile when calculating the modular exponentiation that, however, the computing effort can be considerable. According to the invention, a randomization of the exponent d using the Euler ϕ function is therefore assumed. Instead of this, a randomization using the Carmichael el λ function is used, which leads to a significant reduction in the computing power required with a similarly large safety standard. The randomized exponent d 'results from the following relationship:

d' := d + r1.λ(N)d ': = d + r 1 .λ (N)

Diese Randomisierung ist durch die folgende Identität ge­ stützt:
This randomization is supported by the following identity:

M(λ(N)) = 1 mod NM (λ (N)) = 1 mod N

Damit gilt:
So:

M(d+r1.λ(N)) = Md mod NM (d + r 1 .λ (N)) = M d mod N

Üblicherweise handelt es sich bei dem Modul N der modularen Exponentiation um ein sogenanntes RSA-Modul der Form N = p. q, wobei p und q zwei gleich lange Primzahlen sind. Damit gilt folgender Zusammenhang zwischen der Eulerschen ϕ-Funk­ tion und der Carmichaelschen λ-Funktion:
The module N of the modular exponentiation is usually a so-called RSA module of the form N = p. q, where p and q are two prime numbers of equal length. The following relationship applies between the Euler ϕ function and the Carmichael λ function:

λ(N) = ϕ(N)/ggT(p - 1, q - 1).λ (N) = ϕ (N) / ggT (p - 1, q - 1).

Es ist zu sehen, daß die Carmichaelsche λ-Funktion um den größten gemeinsamen Teiler (ggT) von (p - 1) und (q - 1) kleiner ist als die Eulersche ϕ-Funktion. Der Exponent ist damit um einige Bits kürzer als der Exponent, der unter Verwendung der Eulerschen Funktion randomisiert worden ist, so daß die modifizierte modulare Exponentiation schneller berechenbar ist, als es mit dem System erreicht werden kann, das in Fig. 4 dargestellt ist.It can be seen that the Carmichael λ function is smaller than the Euler ϕ function by the greatest common divisor (ggT) of (p - 1) and (q - 1). The exponent is thus a few bits shorter than the exponent that has been randomized using the Euler function, so that the modified modular exponentiation can be calculated more quickly than can be achieved with the system shown in FIG. 4.

Es sei darauf hingewiesen, daß die Carmichaelsche λ-Funktion nicht nur mit zwei Primzahlen gebildet werden kann, sondern unter Verwendung einer beliebigen Anzahl von Primzahlen, so­ lange das Produkt der Anzahl von Primzahlen gleich dem Modul N ist. In Worten ausgedrückt ist λ durch den Quotienten aus dem Produkt von zumindest zwei Zahlen und dem größten ge­ meinsamen Teiler aus den zumindest zwei Zahlen definiert ist, wobei jede der Zahlen gleich der Differenz zwischen ei­ ner Primzahl und Eins ist, und wobei das Produkt aus den zu­ mindest zwei Primzahlen, die den zumindest zwei Zahlen zu­ grunde liegen, gleich dem Modul (N) ist.It should be noted that the Carmichael λ function can not only be formed with two prime numbers, but using any number of prime numbers, so long the product of the number of prime numbers equal to the module N is. Expressed in words, λ is made up of the quotient the product of at least two numbers and the largest ge common divisor defined from the at least two numbers where each of the numbers is equal to the difference between egg is a prime number and one, and the product of which is at least two prime numbers that match the at least two numbers reasons, is equal to the module (N).

Für zwei Primzahlen p, q berechnet sich die Funktion λ dem­ nach folgendermaßen:
For two prime numbers p, q the function λ is calculated as follows:

λ = (p - 1)(q - 1)/ggT(p - 1, q - 1)λ = (p - 1) (q - 1) / ggT (p - 1, q - 1)

Für drei Primzahlen p, q, r berechnet sich die Funktion λ demnach folgendermaßen:
The function λ is calculated as follows for three prime numbers p, q, r:

λ = (p - 1)(q - 1)(r - 1)/ggT(p - 1, q - 1, r - 1)λ = (p - 1) (q - 1) (r - 1) / ggT (p - 1, q - 1, r - 1)

Analog kann die Funktion λ für beliebige Anzahlen von Prim­ zahlen gebildet werden.Analogously, the function λ for any number of prim numbers are formed.

Gemäß bevorzugten Ausführungsbeispielen der vorliegenden Er­ findung wird die Randomisierung des Exponenten unter Verwen­ dung der Carmichaelschen λ-Funktion für eine Berechnung der modularen Exponentiation entweder mit oder ohne chinesischem Restsatz eingesetzt.According to preferred embodiments of the present Er is the randomization of the exponent using of the Carmichaelian λ function for a calculation of the modular exponentiation either with or without Chinese Remaining sentence inserted.

Bevorzugte Ausführungsbeispiele der vorliegenden Erfindung werden nachfolgend bezugnehmend auf die beiliegenden Figuren näher erläutert. Es zeigen:Preferred embodiments of the present invention are made below with reference to the accompanying figures explained in more detail. Show it:

Fig. 1 ein Flußdiagramm des Verfahrens gemäß einem ersten Ausführungsbeispiel der vorliegenden Erfindung ohne Verwendung des chinesischen Restsatzes; Fig. 1 is a flowchart of the method according to a first embodiment of the present invention without using the Chinese remainder theorem;

Fig. 2A und 2B ein Flußdiagramm des Verfahrens gemäß einem zweiten Ausführungsbeispiel der vorliegenden Erfin­ dung unter Verwendung des chinesischen Restsatzes; . 2A and 2B are a flow chart of the method according to a second embodiment of the present OF INVENTION dung using the Chinese remainder theorem;

Fig. 3 ein bekanntes Verfahren zur Berechnung der modularen Exponentiation; FIG. 3 shows a known method for calculating the modular exponentiation;

Fig. 4 ein bekanntes Verfahren mit randomisiertem Exponen­ ten zur Berechnung der modularen Exponentiation ohne Verwendung des chinesischen Restsatzes; und Fig. 4 is a known method with randomized Exponen th for calculating the modular exponentiation without using the Chinese remainder theorem; and

Fig. 5 ein bekanntes Verfahren zum Berechnen der modularen Exponentiation unter Verwendung des chinesischen Restsatzes. Fig. 5, a known method for calculating the modular exponentiation using the Chinese remainder theorem.

Fig. 1 zeigt ein Flußdiagramm eines Verfahrens gemäß einem ersten Ausführungsbeispiel der vorliegenden Erfindung. Das Verfahren wird durch einen Block 10 begonnen. Hierauf werden die notwendigen Variablen M, d, N und λ in einem Block 12 initialisiert. λ stellt die Carmichaelsche λ-Funktion dar und wird, wie es in Fig. 1 links unten dargestellt ist, aus den Primzahlen p und q berechnet, wobei das Produkt aus den Primzahlen p und q den Modul N ergibt. Es sei darauf hinge­ wiesen, daß die Carmichaelsche Funktion nicht nur dann ver­ wendet werden kann, wenn die beiden Primzahlen p, q die gleiche Länge haben, sondern daß diese Funktion immer genom­ men werden kann, wenn das Produkt aus p und q den Modul N ergibt. Fig. 1 shows a flowchart of a method according to a first embodiment of the present invention. The method is started by a block 10 . The necessary variables M, d, N and λ are then initialized in a block 12 . λ represents the Carmichael λ function and, as shown in Fig. 1 bottom left, is calculated from the prime numbers p and q, the product of the prime numbers p and q giving the module N. It should be pointed out that the Carmichael function can be used not only if the two prime numbers p, q have the same length, but that this function can always be taken if the product of p and q has the module N results.

In einem Schritt 14 wird eine Zufallszahl beispielsweise zwischen 0 und 232 gewählt, welche zur Randomisierung des Exponenten verwendet wird. Optional kann in einem Schritt 16 eine Zufallszahl r2 gewählt werden, mit der die Basis, d. h. das Symbol M, randomisiert werden kann, um die Stromauf­ nahme- und Leistungsprofile eines Kryptoprozessors noch ho­ mogener zu verteilen, so daß es Angreifern noch schwerer ge­ macht wird, geheime Informationen herauszufinden.In a step 14 , a random number is chosen, for example between 0 and 2 32 , which is used to randomize the exponent. Optionally, a random number r 2 can be selected in a step 16 , with which the base, ie the symbol M, can be randomized in order to distribute the power consumption and performance profiles of a crypto processor even more homogeneously, so that it makes attackers even harder will find out secret information.

Es sei jedoch darauf hingewiesen, daß bereits die Randomi­ sierung des Exponenten unter Verwendung der Carmichaelschen λ-Funktion eine bedeutende Erhöhung der Sicherheit gegen In­ formations-Lecks mit sich bringt, und daß die Randomisierung der Basis lediglich optional noch für ein weiteres Absichern eingesetzt werden kann.However, it should be noted that the Randomi the exponent using the Carmichaelian λ function a significant increase in security against In formation leaks and that randomization the base is only optional for further protection can be used.

Mit der in einem Block 18 gegebenen Bestimmungsgleichung wird dann das verarbeitete Symbol, das im Falle der RSA- Signatur das verschlüsselte Symbol ist, bzw. das im Falle einer RSA-Entschlüsselung das entschlüsselte Symbol ist, be­ rechnet. Der Wert für C wird schließlich in einem Block 20 gespeichert, wonach der Algorithmus in einem Block 22 endet. Bezüglich der Randomisierung der Basis sei folgendes ange­ merkt. Wenn die Basis M durch die Basis M + r2.M ersetzt wird, wobei r0 eine zufällige n-Bit-Zahl ist, findet keine Ände­ rung der Endergebnisse statt, da folgender Zusammenhang gilt:
With the determination equation given in block 18 , the processed symbol, which is the encrypted symbol in the case of the RSA signature, or which is the decrypted symbol in the case of RSA decryption, is calculated. The value for C is finally stored in block 20 , after which the algorithm ends in block 22 . Regarding the randomization of the base, the following should be noted. If the base M is replaced by the base M + r 2 .M, where r 0 is a random n-bit number, there is no change in the final results, since the following relationship applies:

(M + r0.N) = N mod N(M + r 0 .N) = N mod N

Bezüglich der Zufallszahlen r1 und r2 sei folgendes ange­ merkt. Es wird bevorzugt, für dieselben 32-Bit-Zahlen zu nehmen, wenn der Modul N ein 1024-Bit-Modul ist. Falls der Modul N ein 2048-Bit-Modul ist, so wird es bevorzugt, für r1 und r2 64-Bit-Zahlen zu nehmen. Es sei insbesondere darauf hingewiesen, daß durch die Länge der Zufallszahlen zwei Din­ ge erreicht werden. Zunächst wird durch die höhere Rando­ misierung die Sicherheit erhöht. Andererseits wird jedoch auch die Verarbeitungsgeschwindigkeit erhöht, die jedoch durch die erfindungsgemäße Verwendung der Carmichaelschen λ- Funktion in jedem Fall besser als bei der Verwendung der Eu­ lerschen ϕ-Funktion ist, da der Zusammenhang zwischen λ und ϕ nicht von der Länge der Zahlen r1 und r2 abhängt. Die Aus­ wahl der Zufallszahlen r1 und r2 liefert also eine wesentli­ che Flexibilität dahingehend, daß mit ein und demselben Al­ gorithmus bzw. mit ein und demselben Chip für eine Vielzahl von verschiedenen Anforderungen ein optimales Verhältnis zwischen Sicherheit einerseits und Berechnungsaufwand ande­ rerseits geschaffen werden kann. Werden die Zufallszahlen sehr kurz gewählt, so ist die Verarbeitung schnell, während die Sicherheit jedoch Einbußen erleiden könnte. Werden dage­ gen für Hochsicherheitsanwendungen, bei denen die Verarbei­ tungsgeschwindigkeit nicht ein wesentliches Kriterium ist, die Zufallszahlen sehr lang verwendet, so kann ohne weiteres ein maximaler Sicherheitsstandard erreicht werden.Regarding the random numbers r 1 and r 2 , the following is noted. It is preferred to take the same 32-bit numbers if module N is a 1024-bit module. If the module N is a 2048-bit module, it is preferred to take 64-bit numbers for r 1 and r 2 . It should be noted in particular that the length of the random numbers enables two din ge to be achieved. First, the higher randomization increases security. On the other hand, however, the processing speed is also increased, which, however, is in any case better by using the Carmichael λ function according to the invention than using the Eu lers ϕ function, since the relationship between λ and ϕ is not dependent on the length of the numbers r 1 and r 2 depends. The choice of the random numbers r 1 and r 2 thus provides a substantial flexibility in that with one and the same algorithm or with one and the same chip for a multitude of different requirements, an optimal relationship between security on the one hand and calculation effort on the other hand is created can. If the random numbers are chosen to be very short, processing is quick, but security could suffer. On the other hand, if the random numbers are used very long for high-security applications in which the processing speed is not an essential criterion, a maximum security standard can be achieved without further ado.

In Fig. 2A ist ein zweites Ausführungsbeispiel gemäß der vorliegenden Erfindung dargestellt, bei dem ebenso wie bei dem in Fig. 1 gezeigten ersten Ausführungsbeispiel sowohl der Exponent als auch die Basis randomisiert werden. Im Un­ terschied zu dem in Fig. 1 gezeigten Ausführungsbeispiel findet bei dem in Fig. 2A und Fig. 2B gezeigten Ausführungs­ beispiel die Berechnung der modularen Exponentiation unter Verwendung des chinesischen Restsatzes statt. Hierzu werden in dem Block 12 M, d, p und q initialisiert, wobei M wieder das zu verarbeitende Symbol ist, während d der Exponent ist und p und q zwei Primzahlen sind, deren Produkt dem Modul M entspricht. In einem Schritt 14 wird ein Parameter t ausge­ wählt, wobei der Parameter t eine zufällige Primzahl ist, welche eine Länge zwischen bevorzugterweise 16 und 32 hat. Die Länge in Bits des Parameters t ist jedoch prinzipiell beliebig einstellbar. Darüber hinaus werden in den Schritten 14 und 16 die Zufallszahlen r1 und r2 ausgewählt, wobei in einem Schritt 24 die randomisierte Basis Mt unter Verwendung der Zufallszahl r2 berechnet wird, während in einem Block 26 der randomisierte Exponent dt unter Verwendung der Zufallszahl r1 berechnet wird. Es sei darauf hingewiesen, daß in dem Block 26 bereits die in Fig. 1 links unten gegebene Gleichung für die λ-Funktion ausgeschrieben ist. In den Blöcken 28 bis 34 werden dann gemäß den in Fig. 2A gegebenen Gleichungen die einzelnen Parameter Cpt, Cqt, xpt und Ct be­ rechnet, wobei besonders darauf hingewiesen wird, daß bei­ spielsweise in dem Block 28 die Carmichaelsche λ-Funktion von p und t berechnet wird, während in dem Block 30 die Car­ michaelsche λ-Funktion von q und t berechnet wird. FIG. 2A shows a second exemplary embodiment according to the present invention, in which, like the first exemplary embodiment shown in FIG. 1, both the exponent and the base are randomized. Un terschied to that shown in Fig. 1 embodiment is the calculation of modular exponentiation using the Chinese remainder theorem in the example in Fig. 2A execution 2B and FIG. Instead. For this purpose, M, d, p and q are initialized in block 12 , where M is again the symbol to be processed, while d is the exponent and p and q are two prime numbers, the product of which corresponds to the module M. In a step 14 , a parameter t is selected, the parameter t being a random prime number, which preferably has a length between 16 and 32. In principle, however, the length in bits of the parameter t can be set as desired. In addition, the random numbers r 1 and r 2 are selected in steps 14 and 16 , wherein in a step 24 the randomized base M t is calculated using the random number r 2 , while in a block 26 the randomized exponent d t using the Random number r 1 is calculated. It should be noted that the equation for the λ function given at the bottom left in FIG. 1 is already written out in block 26 . The individual parameters C pt , C qt , x pt and C t are then calculated in blocks 28 to 34 in accordance with the equations given in FIG. 2A, it being particularly pointed out that, for example, in block 28 the Carmichaelian λ- Function of p and t is calculated, while in block 30 the Car michael λ function of q and t is calculated.

Es sei darauf hingewiesen, daß sich die Gleichungen in Fig. 2A entsprechend ändern, wenn eine Carmichaelsche Funktion mit mehr als zwei Primzahlen verwendet wird. Hierzu wird auf das "Handbook of Applied Cryptography" verwiesen.Note that the equations in Fig. 2A change accordingly when using a Carmichael function with more than two prime numbers. Please refer to the "Handbook of Applied Cryptography".

In einem Block 36 wird dann festgestellt, ob der Ausdruck Ct - Cqt) mod t = 0 erfüllt ist. Diese Überprüfung stellt si­ cher, daß keine Fehler während des Ausführen der Berechnun­ gen in den Blöcken 24 bis 34 gemacht wurden. Auch ein Fehler aufgrund eines bewußten Angriffs im Sinne einer Differential Fault Attack, beispielsweise durch Ausüben von physischem Streß auf den Kryptoprozessor, würde hier erkannt werden. Wird die in dem Block 36 gezeigte Bedingung nicht erfüllt, so wird die Berechnung der modularen Exponentiation abgebro­ chen (Block 38). Gleichzeitig wird keinerlei Ausgabe er­ zeugt, so daß ein Angreifer keine Daten erhält, mit denen er eventuell den geheimen Exponenten ermitteln könnte. Wird die in dem Block 36 gegebene Bedingung erfüllt, so wird auf ei­ nen Block 40 übergesprungen, in dem das verarbeitete Symbol gemäß der in Fig. 2b im Block 40 gegebenen Gleichung berech­ net wird. Das verarbeitete Symbol wird schließlich in einem Block 20 gespeichert, woraufhin der Algorithmus in einem Block 22 beendet wird.It is then determined in a block 36 whether the expression C t - C qt ) mod t = 0 is fulfilled. This check ensures that no errors have been made while performing the calculations in blocks 24 through 34 . An error due to a conscious attack in the sense of a differential fault attack, for example due to physical stress on the crypto processor, would also be detected here. If the condition shown in block 36 is not met, the calculation of the modular exponentiation is aborted (block 38 ). At the same time, no output is generated, so that an attacker receives no data with which he could possibly determine the secret exponent. If the condition given in block 36 is met, a jump is made to block 40 , in which the processed symbol is calculated according to the equation given in block 40 in FIG. 2b. The processed symbol is finally stored in a block 20 , whereupon the algorithm is ended in a block 22 .

Es sei besonders auf die Fehlerüberprüfung im Block 36 hin­ gewiesen. Sie findet im Gegensatz zum Stand der Technik, bei dem das in Fig. 5 gezeigte Flußdiagramm zweimal abgearbeitet wird, wesentlich weniger rechenzeitaufwendig statt, da keine doppelte Abarbeitung erforderlich ist. Block 36 liefert so­ mit gewissermaßen eine Selbsttestfunktion durch Überprüfung der Beziehung zwischen den Parametern Ct, Cqt und t.Particular attention should be drawn to the error check in block 36 . In contrast to the prior art, in which the flowchart shown in FIG. 5 is processed twice, it takes up considerably less computing time, since no double processing is required. Block 36 thus provides a kind of self-test function by checking the relationship between the parameters C t , C qt and t.

Gegenüber der doppelten Abarbeitung des in Fig. 5 darge­ stellten Konzepts zur Fehlerüberprüfung wird somit ein Fak­ tor 2 an Rechenzeitersparnis bei nahezu gleichem Sicher­ heitsstandard neben der Rechenzeitersparnis durch die erfin­ dungsgemäße Randomisierung des Exponenten geschaffen.Compared to the double processing of the concept for error checking shown in FIG. 5, a factor 2 of computation time savings with almost the same security standard is created in addition to the computation time savings by the randomization of the exponent according to the invention.

Es sei darauf hingewiesen, daß das erfindungsgemäße Verfah­ ren bzw. die erfindungsgemäße Vorrichtung auf verschiedene Arten und Weisen implementiert werden können. So ist selbst­ verständlich eine rein softwaremäßige Implementation auf ei­ nem Allzweckrechner denkbar, um beispielsweise eine RSA-Si­ gnatur oder eine RSA-Entschlüsselung durchzuführen. Noch be­ vorzugter sind jedoch die Anwendungen des erfindungsgemäßen Konzepts in Kryptoprozessoren auf Geldkarten, Smartcards, Ausweisen oder ähnlichem, da diese Elemente in großen Stück­ zahlen verwendet werden sollen und daher Lesegeräte mit be­ grenztem Kostenrahmen unabdingbar sind. Bei solchen Anwen­ dungen kann das erfindungsgemäße Konzept teilweise oder so­ gar vollständig in Hardware realisiert sein.It should be noted that the inventive method ren or the device according to the invention on different Ways can be implemented. That is itself understandable a purely software-based implementation on egg nem general purpose computer conceivable, for example, an RSA-Si gnatur or perform an RSA decryption. Still be however, the applications of the invention are more preferred Concept in crypto processors on cash cards, smart cards, Identify or similar, as these items are in large pieces numbers are to be used and therefore readers with be limited budget are essential. With such users The concept of the invention can be partially or so can even be completely implemented in hardware.

Claims (13)

1. Verfahren zum Durchführen einer modularen Exponentiati­ on in einem kryptographischen Prozessor unter Verwen­ dung eines Symbols (M), eines Exponenten (d) und eines Moduls (N), mit folgenden Schritten:
Erhalten (14) einer Zufallszahl (r1);
Kombinieren des Exponenten (d) mit dem Produkt aus der Zufallszahl (r1) und einer Randomisierungszahl λ, um einen randomisierten Exponenten zu erhalten,
wobei λ durch den Quotienten aus dem Produkt von zumin­ dest zwei Zahlen und dem größten gemeinsamen Teiler aus den zumindest zwei Zahlen definiert ist, wobei jede der Zahlen gleich der Differenz zwischen einer Primzahl und Eins ist, und wobei das Produkt aus den zumindest zwei Primzahlen, die den zumindest zwei Zahlen zugrunde lie­ gen, gleich dem Modul (N) ist; und
Durchführen (18; 28-40) einer modularen Exponentiation unter Verwendung des Symbols (M), des Moduls (N) und des randomisierten Exponenten, um als Ergebnis ein ver­ arbeitetes Symbol (C) zu erhalten.
1. A method for performing a modular exponentiation in a cryptographic processor using a symbol (M), an exponent (d) and a module (N), with the following steps:
Obtaining ( 14 ) a random number (r 1 );
Combining the exponent (d) with the product of the random number (r 1 ) and a randomization number λ to obtain a randomized exponent,
where λ is defined by the quotient of the product of at least two numbers and the greatest common divisor of the at least two numbers, each of the numbers being equal to the difference between a prime number and one, and the product of the at least two prime numbers, which is based on the at least two numbers, is equal to the module (N); and
Performing ( 18 ; 28-40 ) modular exponentiation using the symbol (M), the module (N) and the randomized exponent to obtain a processed symbol (C) as a result.
2. Verfahren nach Anspruch 1, bei dem im Schritt des Durchführens folgende Gleichung verwendet wird:
C = M(d+r1.λ) mod N
wobei r1 die Zufallszahl ist, wobei N der Modul ist,
wobei λ die Carmichaelsche Funktion ist, wobei d der Exponent ist, wobei M das Symbol ist, und wobei C das verarbeitete Symbol ist.
2. The method of claim 1, wherein the following equation is used in the performing step:
C = M (d + r 1 .λ) mod N
where r 1 is the random number, where N is the module,
where λ is the Carmichaelian function, where d is the exponent, where M is the symbol, and where C is the processed symbol.
3. Verfahren nach Anspruch 1, das ferner folgende Schritte aufweist:
Auswählen (16) einer weiteren Zufallszahl (r2);
Kombinieren (24) des Symbols mit dem Produkt aus der weiteren Zufallszahl (r2) und dem Modul N, um ein ran­ domisiertes Symbol zu erhalten; und
bei dem im Schritt des Durchführens folgende Gleichung verwendet wird:
C = (M + r2.N)(d+r1.λ) mod N
wobei r1 die Zufallszahl ist, wobei r2 die weitere Zu­ fallszahl ist, wobei N der Modul ist, wobei λ die Car­ michaelsche Funktion ist, wobei d der Exponent ist, wo­ bei M das Symbol ist, und wobei C das verarbeitete Sym­ bol ist.
3. The method of claim 1, further comprising the steps of:
Selecting ( 16 ) another random number (r 2 );
Combining ( 24 ) the symbol with the product of the further random number (r 2 ) and the module N to obtain a ran-dominated symbol; and
where the following equation is used in the performing step:
C = (M + r 2 .N) (d + r 1 .λ) mod N
where r 1 is the random number, where r 2 is the additional random number, where N is the module, where λ is the Car Michael function, where d is the exponent, where M is the symbol, and where C is the processed symbol is.
4. Verfahren nach einem der vorhergehenden Ansprüche, bei dem der Schritt des Durchführens der modularen Exponen­ tiation unter Verwendung des chinesischen Restsatzes durchgeführt wird.4. The method according to any one of the preceding claims, at which is the step of performing the modular expons tiation using the Chinese remainder sentence is carried out. 5. Verfahren nach Anspruch 4, bei dem die Randomisierungs­ zahl λ unter Verwendung von zwei Primzahlen berechnet wird, und bei dem der Schritt des Durchführens der mo­ dularen Exponentiation unter Verwendung des chinesi­ schen Restsatzes folgende Schritte aufweist:
Auswählen (13) einer dritten Zufallszahl t:
Berechnen (28) von Cpt unter Verwendung der folgenden Gleichung:
Cpt = (Mt mod pt) ^ [dt mod [(p - 1)(q - 1)/ggT(p - 1, q - 1)]] mod pt
wobei Mt ein randomisiertes Symbol darstellt und fol­ gendermaßen gegeben ist,
Mt = M + r2N
und wobei dt der randomisierte Exponent ist und folgen­ dermaßen gegeben ist
dt = d + r1.[(p - 1)(q - 1)/ggT(p - 1, q - 1)]
wobei r1 die Zufallszahl ist, wobei r2 die weitere Zu­ fallszahl ist, wobei N der Modul ist, wobei d der Expo­ nent ist, wobei M das Symbol ist, und wobei C das ver­ arbeitete Symbol ist;
Berechnen (30) von Cqt unter Verwendung folgender Glei­ chung:
Cqt = (Mt mod qt) ^ [dt mod[(q - 1)(t - 1)/ggT(q - 1, t - 1)]] mod pt
Berechnen (32) von xpt unter Verwendung folgender Glei­ chung:
xpt = (Cpt - Cqt)(q-1 mod p) mod pt
Berechnen (34) von Ct unter Verwendung der folgenden Gleichung:
Ct = Cqt + xptq
Berechnen (40) des verarbeiteten Symbols unter Verwen­ dung der folgenden Gleichung:
C = Ct mod N
5. The method of claim 4, wherein the randomization number λ is calculated using two prime numbers, and wherein the step of performing the modular exponentiation using the Chinese residual theorem comprises the following steps:
Selecting ( 13 ) a third random number t:
Calculate ( 28 ) C pt using the following equation:
C pt = (M t mod pt) ^ [d t mod [(p - 1) (q - 1) / ggT (p - 1, q - 1)]] mod pt
where M t represents a randomized symbol and is given as follows,
M t = M + r 2 N
and where dt is the randomized exponent and so is given
d t = d + r 1. [(p - 1) (q - 1) / ggT (p - 1, q - 1)]
where r 1 is the random number, where r 2 is the further random number, where N is the module, where d is the exponent, where M is the symbol, and where C is the processed symbol;
Calculate ( 30 ) C qt using the following equation:
C qt = (M t mod qt) ^ [d t mod [(q - 1) (t - 1) / ggT (q - 1, t - 1)]] mod pt
Calculate ( 32 ) x pt using the following equation:
x pt = (C pt - C qt ) (q -1 mod p) mod pt
Calculate ( 34 ) C t using the following equation:
C t = C qt + x pt q
Compute ( 40 ) the processed symbol using the following equation:
C = C t mod N
6. Verfahren nach Anspruch 5, das vor dem Schritt des Berechnens (40) des verarbeite­ ten Symbols folgende Schritte aufweist:
Überprüfen (36), ob ein Fehler aufgetreten ist;
falls ein Fehler aufgetreten ist, Abbrechen (38) ohne Ausgabe eines Ergebnisses; und
falls kein Fehler aufgetreten ist, Fortsetzen (40) der modularen Exponentiation.
6. The method according to claim 5, comprising the following steps before the step of calculating ( 40 ) the processed symbol:
Checking ( 36 ) whether an error has occurred;
if an error has occurred, cancel ( 38 ) without outputting a result; and
if no error has occurred, continue ( 40 ) the modular exponentiation.
7. Verfahren nach Anspruch 1, bei dem im Schritt des Aus­ wählens (14) einer Zufallszahl eine 16-32-Bit-Zufalls­ zahl ausgewählt wird, falls der Modul (M) 1024 Bit lang ist, und bei dem eine 32-64-Bit Zufallszahl ausgewählt wird, falls der Modul (M) 2048 Bit lang ist.7. The method of claim 1, wherein in the step of selecting ( 14 ) a random number, a 16-32 bit random number is selected if the module (M) is 1024 bits long, and wherein a 32-64- Bit random number is selected if the module (M) is 2048 bits long. 8. Verfahren nach Anspruch 3, bei dem im Schritt des Auswählens (16) einer weiteren Zufallszahl eine 16-32-Bit-Zufallszahl ausgewählt wird, falls der Modul (M) 1024 Bit lang ist, und bei dem eine 32-64-Bit Zufallszahl ausgewählt wird, falls der Modul (M) 2048 Bit lang ist.8. The method of claim 3, wherein in the step of selecting ( 16 ) a further random number, a 16-32 bit random number is selected if the module (M) is 1024 bits long, and wherein a 32-64 bit Random number is selected if the module (M) is 2048 bits long. 9. Verfahren nach Anspruch 5, bei dem im Schritt des Auswählens (13) einer dritten Zufallszahl eine Primzahl mit einer Länge zwischen 16 und 32 Bit ausgewählt wird.9. The method of claim 5, wherein in the step of selecting ( 13 ) a third random number, a prime number with a length between 16 and 32 bits is selected. 10. Verfahren nach einem der vorhergehenden Ansprüche, bei dem der Exponent (d) geheim ist, während der Modul (N) bekannt ist.10. The method according to any one of the preceding claims, at the exponent (d) is secret while the module (N) is known. 11. Verfahren nach einem der vorhergehenden Ansprüche, bei dem der kryptographische Prozessor unter Verwendung der modularen Exponentiation eine Signatur (C) des Symbols (M) erzeugt, wobei das Symbol die zu signierende Nach­ richt darstellt, während das verarbeitete Symbol die signierte Nachricht darstellt.11. The method according to any one of the preceding claims, at which the cryptographic processor using the modular exponentiation a signature (C) of the symbol  (M), where the symbol is the To be signed represents while the processed symbol represents the represents signed message. 12. Verfahren nach einem der Ansprüche 1 bis 10, bei dem der kryptographische Prozessor unter Verwendung der mo­ dularen Exponentiation eine Entschlüsselung durchführt, so daß das Symbol (M) eine verschlüsselte Nachricht darstellt, und das verarbeitete Symbol (C) eine ent­ schlüsselte Nachricht darstellt.12. The method according to any one of claims 1 to 10, in which the cryptographic processor using the mo decular exponentiation decrypts, so that the symbol (M) is an encrypted message represents, and the processed symbol (C) ent represents encrypted message. 13. Vorrichtung zum Durchführen einer modularen Exponentia­ tion, mit folgenden Merkmalen:
einer Einrichtung zum Erhalten (14) einer Zufallszahl (r1);
einer Einrichtung zum Kombinieren des Exponenten (d) mit dem Produkt aus der Zufallszahl (r1) und einer Ran­ domisierungszahl λ, um einen randomisierten Exponenten zu erhalten, wobei λ durch den Quotienten aus dem Pro­ dukt von zumindest zwei Zahlen und dem größten gemein­ samen Teiler aus den zumindest zwei Zahlen definiert ist, wobei jede der Zahlen gleich der Differenz zwi­ schen einer Primzahl und Eins ist, und wobei das Pro­ dukt aus den zumindest zwei Primzahlen, die den zumin­ dest zwei Zahlen zugrunde liegen, gleich dem Modul (N) ist; und
einer Einrichtung zum Durchführen (18; 28-40) einer mo­ dularen Exponentiation unter Verwendung des Symbols (M), des Moduls (N) und des randomisierten Exponenten, um als Ergebnis ein verarbeitetes Symbol (C) zu erhal­ ten.
13. Device for carrying out a modular exponentia tion, with the following features:
means for obtaining ( 14 ) a random number (r 1 );
a device for combining the exponent (d) with the product of the random number (r 1 ) and a randomization number λ in order to obtain a randomized exponent, where λ is the quotient of the product of at least two numbers and the largest common A divisor is defined from the at least two numbers, each of the numbers being equal to the difference between a prime number and one, and the product of the at least two prime numbers on which the at least two numbers are based is equal to the module (N) is; and
means for performing ( 18 ; 28-40 ) modular exponentiation using the symbol (M), the module (N) and the randomized exponent to obtain a processed symbol (C) as a result.
DE10042234A 2000-08-28 2000-08-28 Method and device for performing a modular exponentiation in a cryptographic processor Expired - Fee Related DE10042234C2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
DE10042234A DE10042234C2 (en) 2000-08-28 2000-08-28 Method and device for performing a modular exponentiation in a cryptographic processor
AU2001287675A AU2001287675A1 (en) 2000-08-28 2001-08-10 Method and device for carrying out a modular exponentiation in a cryptographic processor
PCT/EP2001/009285 WO2002019065A2 (en) 2000-08-28 2001-08-10 Method and device for carrying out a modular exponentiation in a cryptographic processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE10042234A DE10042234C2 (en) 2000-08-28 2000-08-28 Method and device for performing a modular exponentiation in a cryptographic processor

Publications (2)

Publication Number Publication Date
DE10042234A1 DE10042234A1 (en) 2002-03-14
DE10042234C2 true DE10042234C2 (en) 2002-06-20

Family

ID=7654065

Family Applications (1)

Application Number Title Priority Date Filing Date
DE10042234A Expired - Fee Related DE10042234C2 (en) 2000-08-28 2000-08-28 Method and device for performing a modular exponentiation in a cryptographic processor

Country Status (3)

Country Link
AU (1) AU2001287675A1 (en)
DE (1) DE10042234C2 (en)
WO (1) WO2002019065A2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10304451B3 (en) * 2003-02-04 2004-09-02 Infineon Technologies Ag Modular exponentiation with randomized exponent
DE10326057B4 (en) * 2003-06-11 2010-06-10 Cv Cryptovision Gmbh Anti-aliasing method for testing a natural number for primality
DE102011115082A1 (en) 2011-09-19 2013-03-21 Giesecke & Devrient Gmbh Against spying on protectable secret RSA encryption exponent

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2869430A1 (en) * 2004-04-27 2005-10-28 St Microelectronics Sa MONITORING THE EXECUTION OF AN ALGORITHM BY AN INTEGRATED CIRCUIT
US8600047B2 (en) 2008-05-07 2013-12-03 Irdeto Corporate B.V. Exponent obfuscation
DE102010039273B4 (en) * 2010-08-12 2014-12-04 Infineon Technologies Ag Cryptography processor, smart card and method of calculating a result of exponentiation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5046094A (en) * 1989-02-02 1991-09-03 Kabushiki Kaisha Toshiba Server-aided computation method and distributed information processing unit
US5991415A (en) * 1997-05-12 1999-11-23 Yeda Research And Development Co. Ltd. At The Weizmann Institute Of Science Method and apparatus for protecting public key schemes from timing and fault attacks
DE19828936A1 (en) * 1998-05-29 1999-12-02 Siemens Ag Method and device for processing data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5046094A (en) * 1989-02-02 1991-09-03 Kabushiki Kaisha Toshiba Server-aided computation method and distributed information processing unit
US5991415A (en) * 1997-05-12 1999-11-23 Yeda Research And Development Co. Ltd. At The Weizmann Institute Of Science Method and apparatus for protecting public key schemes from timing and fault attacks
DE19828936A1 (en) * 1998-05-29 1999-12-02 Siemens Ag Method and device for processing data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SAKAI, R. u.a. New key generation algorithm for RSA cryptosystem, in: IEICE Trans. Fundamentals, Vol. E77-A, No. 1, Jan. 1994, S. 89-97 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE10304451B3 (en) * 2003-02-04 2004-09-02 Infineon Technologies Ag Modular exponentiation with randomized exponent
US7908641B2 (en) 2003-02-04 2011-03-15 Infineon Technologies Ag Modular exponentiation with randomized exponent
DE10326057B4 (en) * 2003-06-11 2010-06-10 Cv Cryptovision Gmbh Anti-aliasing method for testing a natural number for primality
DE102011115082A1 (en) 2011-09-19 2013-03-21 Giesecke & Devrient Gmbh Against spying on protectable secret RSA encryption exponent
WO2013041200A1 (en) 2011-09-19 2013-03-28 Giesecke & Devrient Gmbh Secret rsa encryption exponent that can be protected against access violation

Also Published As

Publication number Publication date
WO2002019065A8 (en) 2002-09-26
WO2002019065A2 (en) 2002-03-07
DE10042234A1 (en) 2002-03-14
AU2001287675A1 (en) 2002-03-13

Similar Documents

Publication Publication Date Title
DE69828787T2 (en) IMPROVED METHOD AND DEVICE FOR PROTECTING A PUBLIC KEY ENCRYPTION PROCEDURE AGAINST ATTACK AND TIME ATTRUSION ATTACKS
EP1262037B1 (en) Portable data carrier provided with access protection by dividing up codes
DE102017117907B4 (en) Performing a cryptographic operation
EP2771782B1 (en) Efficient primality checking
DE112008000668T5 (en) Cryptographic procedure and system
DE102005028662A1 (en) Polynom multiplication calculating method e.g. for elliptical curve cryptography, making available coefficients with two polynomials each polynomial fragmented into two or more fragments, being operands partial multiplication
EP1922837B1 (en) Method for securely encrypting or decrypting a message
DE10143728B4 (en) Device and method for calculating a result of a modular exponentiation
EP1290545B1 (en) Cryptographic method and cryptographic device
DE102008051447B9 (en) Method and apparatus for protecting an RSA calculation on an output using the Chinese Remainder Theorem
DE102005024609A1 (en) Determination of a modular inverse
DE602004006628T2 (en) METHOD FOR THE SECURED EXECUTION OF AN RSA CRYPTOGRAPHIC ALGORITHM, AND COMPONENT ITEM.
DE10304451B3 (en) Modular exponentiation with randomized exponent
EP1346509B1 (en) Method and device for detecting a key pair and for generating RSA keys
DE112009000152T5 (en) Modular reduction using a special form of modulo
DE112018002723B4 (en) SYSTEM, METHOD AND APPARATUS FOR CONCEALING DEVICE OPERATIONS
DE10042234C2 (en) Method and device for performing a modular exponentiation in a cryptographic processor
EP1442391B1 (en) Method and device for guaranteeing a calculation in a cryptographic algorithm
EP1454260B1 (en) Method and device for securing an exponentiation calculation by means of the chinese remainder theorem (crt)
DE10162496C5 (en) Method and device for securing a calculation in a cryptographic algorithm
EP2128754B1 (en) Safe sliding window exponentiation
DE10326057B4 (en) Anti-aliasing method for testing a natural number for primality
DE102019008199B3 (en) Exponentiation, primality test and RSA key generation protected against side-channel attacks
EP3504616B1 (en) Module and method for the secured computation of mathematical operations
DE102004001659A1 (en) Apparatus and method for converting a first message into a second message

Legal Events

Date Code Title Description
OP8 Request for examination as to paragraph 44 patent law
D2 Grant after examination
8364 No opposition during term of opposition
8339 Ceased/non-payment of the annual fee