WO2013041200A1 - Secret rsa encryption exponent that can be protected against access violation - Google Patents

Secret rsa encryption exponent that can be protected against access violation Download PDF

Info

Publication number
WO2013041200A1
WO2013041200A1 PCT/EP2012/003872 EP2012003872W WO2013041200A1 WO 2013041200 A1 WO2013041200 A1 WO 2013041200A1 EP 2012003872 W EP2012003872 W EP 2012003872W WO 2013041200 A1 WO2013041200 A1 WO 2013041200A1
Authority
WO
WIPO (PCT)
Prior art keywords
rsa
exponent
decryption exponent
calculating
masked
Prior art date
Application number
PCT/EP2012/003872
Other languages
German (de)
French (fr)
Inventor
Sven Bauer
Jürgen PULKUS
Original Assignee
Giesecke & Devrient Gmbh
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 Giesecke & Devrient Gmbh filed Critical Giesecke & Devrient Gmbh
Priority to EP12783498.4A priority Critical patent/EP2759090A1/en
Publication of WO2013041200A1 publication Critical patent/WO2013041200A1/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/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/002Countermeasures against attacks on cryptographic mechanisms
    • H04L9/003Countermeasures against attacks on cryptographic mechanisms for power analysis, e.g. differential power analysis [DPA] or simple power analysis [SPA]
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/04Masking or blinding
    • H04L2209/046Masking or blinding of operations, operands or results of the operations

Definitions

  • the invention relates to the field of protecting cryptographic calculations against spying. More particularly, the invention relates to a method for generating a spyware-protected secret RSA decryption exponent in a processor, e.g. in a chip card. The invention further relates to a method for performing a cryptographic calculation in a processor using such a secret RSA decryption exponent.
  • the private key D (d, n) is used to obtain a message u encrypted to a cipher x according to
  • exponents e and d are formed as follows.
  • ⁇ p (n) (p-1) - (q-1). 4.
  • e choose a number e that is apercentric to ⁇ ( ⁇ ) with 1 ⁇ e ⁇ ( ⁇ ).
  • the Square and Multiply algorithm is vulnerable to side-channel attacks, such as power attacks such as simple power analysis (SPA) or differential power analysis (DPA).
  • Side-channel attacks for example, in Paul C. Kocher, Joshua Jaffe and Benjamin Jun, "Differential power analysis", CRYPTO ⁇ 99th 388-397 (M. Wiener, ed.), LNCS, No 1666, 199 pp. [3] or in Suresh Chari, Josyula R. Rao, and Pankaj Rohatgi, "Template Attack,” Cryptographic Hardware and Embedded Systems 2003 (Burt S. Kaliski, Cetin K.
  • a performance profile is generated by measuring the power consumption of a processor while performing a computation over time and recording it as a function of time.
  • the performance profile can be used to deduce the data used in the calculation.
  • the exponent d is processed bit by bit and the base x is squared to a first intermediate result and the intermediate result is continuously squared again. If an exponent bit is one, an additional multiplication with the base x is performed.
  • the power consumption of the processor used is usually slightly different for squaring and multiplication.
  • the values of the exponent bits from the power profile, ie the time profile of the power consumption, of the processor in a single implementation of the square and multiply method can be determined by means of a simple power analysis SPA.
  • Noise makes it difficult in practice to determine the values of the exponent bits. Since all exponent bits have to be determined correctly, the probability of success for long exponents by SPA is low in practice.
  • a multiplicity of performance profiles are generated from a multiplicity of exponentiation implementations according to eg equation (2) with always the same decryption exponent d but respectively different basic data x, which are evaluated by means of statistical methods in order to draw conclusions on the decryption exponent d to draw.
  • noise can be extracted from the performance profiles and thus increase the probability of meeting the exponent.
  • the attack procedure is also described in the unpublished document [9].
  • the proposed attack on the Square and Multiply Algorithm (6) represents a combination of simple performance analysis SPA and differential performance analysis DPA.
  • a processor executes a modular exponentiation according to relation (2) with the secret decryption exponents d 'dotted with a random number r, and the power consumption of the processor during exponentiation as a function of time is measured and recorded.
  • the recorded power consumption as a function of time is called power profile.
  • the attack consists of three subsections, namely pickup step, SPA phase and DPA phase.
  • DPA phase the remaining, lower-order bits of the decryption exponent d and the Euler function are determined by means of statistical methods from a plurality of power profiles suitably selected from the plurality.
  • a method for generating an RSA decryption exponent d is to be specified, which allows good protection against the attack proposed here.
  • a method for generating an improved against side channel protected masked RSA decryption exponent cT based on the generated (unmasked) RSA decryption exponent d is achieved by a method according to claim 1.
  • Advantageous embodiments of the invention are specified in the dependent claims.
  • the method of claim 1 for generating a spy-resistant secret RSA decryption exponent d in a processor is characterized by the steps
  • the decryption exponent d is deliberately constructed so that subsequent masking from d to d 'using the selected design number z is particularly efficient.
  • the basis for the efficiency of the (later to be performed) masking of d to d ' is the specific construction method for the unmasked decryption exponent d.
  • the inventive method thus provides a secret RSA decryption exponent d, which, after it has been additionally masked, better protected against spying, that is, in the generated according to claim 1 unmasked form, allowing improved protection against spying on the decryption exponent d.
  • the design number z is preferably chosen as large as possible, but sufficiently small that there are still sufficient possibilities to select the two prime numbers p, q.
  • the design number z has a bit length lz and the RSA modulus has a bit length lz.
  • the bit length In of the modulus n is already known before the modulus n is calculated, since the RSA calculation is constructed such that the modulus n has a desired bit length, for example 2048 bits for the RSA-2048, 1024 bits for the RSA-1024 etc.
  • the bit length lz of the design number z is exactly 64 bits.
  • the bit length lz of the design number is used to determine how many additional bits an attacker must guess, namely lz if all lz bits are randomly selected, or (lz-1) if the highest bit is set and the remaining bits are selected at random are. Therefore, it is advantageous if z and lz is chosen as large as possible.
  • the bit length lz of the design number should be sufficiently small in comparison to the bit length In of the modulus, since too large a bit length lz of the design number would unfavorably limit the choices for the random numbers p and q.
  • a bit length lz of design number z of 64 bits is a good compromise, especially for RSA-2048 and RSA-1024.
  • the quantity ((p-1) * (q-1) / z) ⁇ p (n) lz, ie the modulus used in the calculation formula for the RSA decryption exponent d, has the Eulerian function conventionally used at this point ⁇ ⁇ ) (compare Gig (5)) has the advantage that the most significant bits are not known due to the division by the design number z. Thus, even the most significant bits of the RSA decryption exponent d are not known. The larger z is, the more difficult it is to guess z.
  • the masking function ⁇ (in order to mask d to d 'by means of a random number r) is achieved analogously.
  • the processor is a microprocessor in a smart card or other than card shaped tokens.
  • the processor is a crypto-coprocessor associated with a microprocessor.
  • the calculated RSA decryption exponent d can subsequently be used for in principle any number of exponentiations, respectively decryptions or signature creations, eg according to equation (2).
  • the RSA decryption exponent d is still masked before execution of the exponentiation.
  • the selection of the design number z and the prime numbers p, q as well as the calculation of d has to be done only once.
  • the prime numbers p, q are formed as follows depending on the design number z, and the (unmasked) decryption exponent d is RSA compliant as follows.
  • Step b) is preferably designed as: selecting two RSA primes p, q as a function of the selected design number z such that p / z gives remainder one and q / z gives remainder one.
  • a random number z is chosen as the design number z.
  • the design number z is a prime number, optionally a non-prime number.
  • a prime and a non-prime construction number each have different advantages and disadvantages, depending on the concrete example.
  • step d) "selecting a public RSA encryption exponent e", the Euler function ⁇ p (n) is computed according to Gig (4), and ⁇ ⁇ ) I z is calculated
  • the public RSA encryption exponent e is chosen e is prime to ⁇ ( ⁇ ) I z, eg as stated above
  • a method according to the invention for computing a spy protected masked secret RSA decryption exponent d 'in a processor is characterized by the steps of:
  • Step g) is preferably designed as: calculating the masked RSA decryption exponent d 'according to the calculation rule
  • a random number is selected as masking number r.
  • the masking number is prime or not prime. In general, the masking number will not be prime.
  • the decryption exponent d 'masked with the masking number r is usually used only once. For each new use of a masked decryption exponent d ', a new masking number, in particular a random number r, is usually selected and a new masked decryption exponent d' is calculated.
  • the method according to the invention is still safe even if e is small and therefore the attack on a conventionally masked RSA decryption exponent d proposed by the applicant could be successful.
  • the invention thus offers particular protection for an RSA method in which a relatively small public encryption exponent e is used.
  • Decryption for decrypting a ciphertext x to a plaintext u is performed by modular exponentiation as described above.
  • a signature calculation for signing an input data set x into a signature u is likewise carried out by modular exponentiation as described above.
  • a new masking number r is selected for each exponentiation and a new masked RSA decrypting exponent d 'is calculated.
  • Fig. 1 is a histogram for power consumption measurements of squares and multiplications
  • Fig. 2 is a schematic power profile T ⁇ of a processor in calculating a sequence of squares and multiplications.
  • FIG. 1 shows a histogram of a processor for measurements of the current consumption I (in arbitrary units au) of squaring S and multiplication M (multiplication), in which is plotted which current consumption I occurs with which relative frequency F.
  • squaring S and multiplication M were carried out with the processor in a targeted manner and the power consumption during the respective operation was determined.
  • Squarings S are represented by black bars, multiplications M by gray bars.
  • standard distributions bell curves, black for squaring S, gray for multiplications M
  • their mean values vertical arrow S for mean of the squaring or M for mean of the multiplication
  • FIG. 1 further shows that power consumptions of squares occur in which the value of power consumption would suggest that multiplication would have been performed, and vice versa. It follows that when measuring the power consumption of an unknown operation can be specified only with a certain probability, whether a squaring or multiplication was performed.
  • Fig. 2 shows a schematic power profile ⁇ .
  • a processor ie the power P consumed by the processor as a function of time t, in the calculation of a sequence of squares and multiplications, as may occur when carrying out a modular exponentiation.
  • the power profile is equal to the current profile, ie the power consumption as a function of time multiplied by an applied voltage.
  • Each power peak in Figure 2 corresponds to a single operation, squaring S or multiplication M.
  • line 6 there is one operation sequence squaring and multiplication SM for each exponent bit with value 1, and a single operation squaring S for each exponent bit 0.
  • a probability is assigned to each identified operation and a probability profile W is assigned to the operation profile, which indicates with which probability the respective value in the operation profile, S or M, is a squaring S (alternatively: probability that the operation plication is).
  • the attack can be subdivided into three subsections of admission step, SPA phase and DPA phase.
  • Each performance profile is assigned an operation profile and a probability profile.
  • the sequence of operations in the operation profile reflects the masked exponent d '.
  • the goal is to determine the unmasked exponent d.
  • the masking number r is calculated bit by bit on the basis of the equation d'd + r - n valid in this range, with n instead of the Euler function. In the guessing process, the probability profile is taken into account, whereby too poor rate results are sorted out.
  • the condition for the limit of e depends on the computing power of a processor used for the calculation.
  • the remaining unknown bits of the unmasked decryption exponent d are determined bit by bit by statistical evaluation, starting in a manner known per se at the least significant bit.

Abstract

The invention relates to a method for generating a secret RSA decryption exponent d which can be protected against access violation in a processor, having the following steps: a) selecting a construction number z; b) selecting two RSA prime numbers p, q dependent on the selected construction number z; c) calculating the RSA modulus n = pq; d) selecting a public RSA encryption exponent e; and e) calculating an (unmasked) RSA decryption exponent d using the selected construction number z. The decryption exponent d is masked into a protected masked decryption exponent d' by: f) selecting a masking number r; and g) calculating the masked RSA decryption exponent d' using the selected construction number z.

Description

Gegen Ausspähung schützbarer geheimer RSA Verschlüsselungsexponent  Against spying on protectable secret RSA encryption exponent
Die Erfindung betrifft das Gebiet des Schutzes kryptographischer Berechnungen gegen Ausspähung. Die Erfindung betrifft genauer ein Verfahren zum Erzeugen eines gegen Ausspähung schützbaren geheimen RSA Entschlüsselungsexponenten in einem Prozessor, z.B. in einer Chipkarte. Die Erfindung betrifft weiter ein Verfahren zum Durchführen einer krypto- graphischen Berechnung in einem Prozessor unter Verwendung eines solchen geheimen RSA Entschlüsselungsexponenten. The invention relates to the field of protecting cryptographic calculations against spying. More particularly, the invention relates to a method for generating a spyware-protected secret RSA decryption exponent in a processor, e.g. in a chip card. The invention further relates to a method for performing a cryptographic calculation in a processor using such a secret RSA decryption exponent.
Das 1977 von Ronald L. Rivest, Adi Shamir und Leonard Adleman entwickelte und beispielsweise in US 4,405,829 [1] beschriebene asymmetrische Kryptosystem RSA umfasst einen öffentlichen Schlüssel E = (e,n) und einen geheimen privaten Schlüssel D = (d,n), mit dem öffentlichen Verschlüsse- lungsexponenten e, dem privaten Entschlüsselungsexponenten d und dem Modulus n = p*q, der als das Produkt zweier Primzahlen p und q gebildet ist. Der öffentliche Schlüssel E = (e,n) wird verwendet, um eine Nachricht u gemäß der Relation The asymmetric cryptosystem RSA developed in 1977 by Ronald L. Rivest, Adi Shamir and Leonard Adleman and described for example in US 4,405,829 [1] comprises a public key E = (e, n) and a secret private key D = (d, n), with the public encryption exponent e, the private decryption exponent d and the modulus n = p * q, which is formed as the product of two primes p and q. The public key E = (e, n) is used to obtain a message u according to the relation
(1) x = ue modtt (1) x = u e modtt
zu einem Chiff rat x zu verschlüsseln, oder um eine Signatur zu verifizieren. Der private Schlüssel D = (d,n) wird verwendet, um eine zu einem Chiffrat x verschlüsselte Nachricht u gemäß to encrypt a chiff rat x, or to verify a signature. The private key D = (d, n) is used to obtain a message u encrypted to a cipher x according to
(2) u = xJ modrt (2) u = x J modrt
zu entschlüsseln, oder um eine Signatur zu erzeugen. to decrypt or to generate a signature.
Die Exponenten e und d werden gebildet wie folgt. The exponents e and d are formed as follows.
1. Wähle zwei geeignete geheimzuhaltende Primzahlen p * q .  1. Choose two appropriate primes p * q to keep secret.
2. Berechne den öffentlichen RSA Modulus  2. Calculate the public RSA modulus
(3) n = p - q .  (3) n = p - q.
3. Berechne die geheimzuhaltende Eulersche Funktion φ(η) von n 3. Compute the Eulerian function φ (η) of n
(4) <p(n) = (p - l) - (q - l) . 4. Wähle als öffentlichen Verschlüsselungsexponenten e eine zu φ(η) teilerfremde Zahl e mit 1 < e < φ(η) . (4) <p (n) = (p-1) - (q-1). 4. As a public encryption exponent e, choose a number e that is apercentric to φ (η) with 1 <e <φ (η).
5. Berechne den geheimen privaten Entschlüsselungsexponenten d gemäß (5) d = e~l (mod φ(η)) . 5. Compute the secret private decryption exponent d according to (5) d = e ~ l (mod φ (η)).
Die in der Entschlüsselung gemäß der Relation (2) u = xd mod« durchzuführende Exponentiation wird üblicherweise gemäß dem„(Repeated) Square and Multiply" Algorithmus durchgeführt, der beispielsweise in Alfred Me- nezes, Paul C. van Oorschot, and Scott A. Vanstone,„Handbook of applied cryptography" (im Folgenden [2]„Menezes" genannt) in Kapitel 14.6, Algorithmus Nr. 14.79 beschrieben ist. The exponentiation to be performed in the decryption in accordance with the relation (2) u = x d mod "is usually carried out according to the" Repeated Square and Multiply "algorithm described, for example, in Alfred Meenezes, Paul C. van Oorschot, and Scott A Vanstone, "Handbook of applied cryptography" (hereafter referred to as [2] "Menezes") is described in Chapter 14.6, Algorithm No. 14.79.
Der Square and Multiply Algorithmus ist gegenüber Seitenkanalangriffen gefährdet, beispielsweise Stromangriffen wie z.B. einfache Leistungsanalyse (Simple Power Analysis (SPA)) oder differentielle Leistungsanalyse (Differential Power Analysis (DPA)). Seitenkanalangriffe sind beispielsweise in Paul C. Kocher, Joshua Jaffe, and Benjamin Jun,„Differential power analysis", CRYPTO ^99 (M. Wiener, ed.), LNCS, no. 1666, 199, pp. 388-397 [3], oder in Suresh Chari, Josyula R. Rao, and Pankaj Rohatgi,„Template Attacke", Cryptographic Hardware and Embedded Systems 2003 (Burt S. Kaliski, Ce- tin K. Κος, and Christof Paar, eds.), LNCS, no. 2523, Springer-Verlag, 2003, pp. 13-28 [4], beschrieben. Bei einem Seitenkanalangriff wird beispielsweise ein Leistungsprofil erzeugt, indem der Leistungsverbrauch eines Prozessors während des Durchführens einer Berechnung im zeitlichen Verlauf gemes- sen und in Abhängigkeit von der Zeit aufgezeichnet wird. Aus dem Leistungsprofil kann auf die bei der Berechnung verwendeten Daten rückgeschlossen werden. Im (Repeated) Square and Multiply Algorithmus wird der Exponent d bitweise abgearbeitet und die Basis x zu einem ersten Zwischenergebnis quadriert und das Zwischenergebnis fortlaufend wieder quadriert. Ist ein Exponentenbit Eins, wird zusätzlich eine Multiplikation mit der Basis x durchge- führt. Der Leistungsverbrauch des verwendeten Prozessors ist in aller Regel für Quadrierungen und Multiplikationen leicht unterschiedlich. Daher lassen sich im Prinzip mittels einfacher Leistungsanalyse SPA die Werte der Exponentenbits aus dem Leistungsprofil, d.h. dem zeitlichen Verlauf des Leistungsverbrauchs, des Prozessors bei einer einzelnen Durchführung des Square and Multiply Verfahrens ermitteln. Rauschen erschwert in der Praxis die Ermittlung der Werte der Exponentenbits. Da alle Exponentenbits richtig ermittelt werden müssen, ist die Trefferwahrscheinlichkeit für lange Exponenten durch SPA in der Praxis gering. Bei der differentiellen Leistungsanalyse DPA wird aus einer Vielzahl von Durchführungen von Exponentiatio- nen nach zB Gleichung (2) mit stets demselben Entschlüsselungsexponenten d aber jeweils unterschiedlichen Basisdaten x eine Vielzahl von Leistungsprofilen erzeugt, die mittels statistischer Methoden ausgewertet werden, um Rückschlüsse auf den Entschlüsselungsexponenten d zu ziehen. Hierbei lässt sich Rauschen aus den Leistungsprofilen herausmitteln und somit die Tref- ferwahrscheinlichkeit bei der Ermittlung des Exponenten erhöhen. The Square and Multiply algorithm is vulnerable to side-channel attacks, such as power attacks such as simple power analysis (SPA) or differential power analysis (DPA). Side-channel attacks, for example, in Paul C. Kocher, Joshua Jaffe and Benjamin Jun, "Differential power analysis", CRYPTO ^ 99th 388-397 (M. Wiener, ed.), LNCS, No 1666, 199 pp. [3] or in Suresh Chari, Josyula R. Rao, and Pankaj Rohatgi, "Template Attack," Cryptographic Hardware and Embedded Systems 2003 (Burt S. Kaliski, Cetin K. Κος, and Christof Paar, eds.), LNCS, no 2523, Springer-Verlag, 2003, pp. 13-28 [4]. For example, in a side channel attack, a performance profile is generated by measuring the power consumption of a processor while performing a computation over time and recording it as a function of time. The performance profile can be used to deduce the data used in the calculation. In the (Repeated) Square and Multiply Algorithm, the exponent d is processed bit by bit and the base x is squared to a first intermediate result and the intermediate result is continuously squared again. If an exponent bit is one, an additional multiplication with the base x is performed. The power consumption of the processor used is usually slightly different for squaring and multiplication. Therefore, in principle, the values of the exponent bits from the power profile, ie the time profile of the power consumption, of the processor in a single implementation of the square and multiply method can be determined by means of a simple power analysis SPA. Noise makes it difficult in practice to determine the values of the exponent bits. Since all exponent bits have to be determined correctly, the probability of success for long exponents by SPA is low in practice. In the case of the differential power analysis DPA, a multiplicity of performance profiles are generated from a multiplicity of exponentiation implementations according to eg equation (2) with always the same decryption exponent d but respectively different basic data x, which are evaluated by means of statistical methods in order to draw conclusions on the decryption exponent d to draw. Here, noise can be extracted from the performance profiles and thus increase the probability of meeting the exponent.
Im Fachartikel Chevallier-Mämes, B., Ciet, M., Joye, M.:„Low-Cost Solutions for Preventing Simple Side-Channel Analysis: Side-Channel Atomicity"; Cryptology ePrint Archiv, Report 2003/237 (2003), http://eprint.iacr.org/ [5], ist eine Variante des Square and Multiply Algorithmus offenbart, die einen verbesserten Schutz gegenüber Seitenkanalangriffen hat als der in [2] (Menezes) angegebene Algorithmus. In the article Chevallier-Mämes, B., Ciet, M., Joye, M.: "Low-Cost Solutions for Preventing Simple Side-Channel Analysis: Side-Channel Atomicity"; Cryptology ePrint Archive, Report 2003/237 (2003), http://eprint.iacr.org/ [5], a variant of the Square and Multiply algorithm is disclosed which has improved protection against side channel attacks than the algorithm given in [2] (Menezes).
(6) Variante des Square and Multiply Algorithmus aus [5]: Eingabe: ganze Zahlen x, d, n; d in Binärdarstellung d (6) Variant of the Square and Multiply algorithm from [5]: Input: integers x, d, n; d in binary d
Ausgabe: u = xd mod« Output: u = x d mod «
1 uQ <— 1 1 u Q <- 1
2 «i <—  2 «i <-
3 m - 0  3 m - 0
4 y - / - i  4 y - / - i
5 while y > 0 do  5 while y> 0 do
6  6
7 m — (w + i 7 ) mod 2 7 m - (w + i 7 ) mod 2
8 y <— j + m - l  8 y <- j + m - l
9 end  9 end
10 return uQ 10 return u Q
Um Seitenkanalangriffe wie SPA und DPA zu verhindern oder zumindest zu erschweren, wird weiter im Stand der Technik vorgeschlagen, dem privaten Entschlüsselungsexponenten d für jede Durchführung einer Exponentiation nach Algorithmus (2) eine - in der Regel unterschiedliche - Zufallszahl r beizumischen und somit den Entschlüsselungsexponenten d zu einem maskierten Entschlüsselungsexponenten d' zu maskieren, und für Entschlüsselungen bzw. Signaturberechnungen gemäß Algorithmus (2) statt des Entschlüsselungsexponenten d den maskierten Entschlüsselungsexponenten d' zu verwenden. Der maskierte Entschlüsselungsexponent d' hat gegenüber dem unmaskierten Entschlüsselungsexponenten d bei jeder Berechnung eine unterschiedliche Anordnung von Exponentenbits. Daher führt bei Verwendung eines maskierten Exponenten DPA zu keiner Verbesserung der Trefferwahrscheinlichkeit gegenüber SPA. US 5,991,415 A (Shamir) [6] offenbart eine RSA konforme Möglichkeit, den Entschlüsselungsexponenten d zu maskieren, mit einer bei jeder Berechnung zufällig gewählten geheimgehaltenen Zufallszahl r und der geheimen Euler- schen Funktion gemäß der Relation (4): In order to prevent or at least aggravate side channel attacks such as SPA and DPA, it is further proposed in the prior art to add to the private decoding exponent a for each execution of an exponentiation according to algorithm (2) a - usually different - random number r and thus the decryption exponent d to mask to a masked decryption exponent d 'and to use for decryption or signature computations according to algorithm (2) instead of the decryption exponent d the masked decryption exponent d'. The masked decryption exponent d 'has a different array of exponent bits than the unmasked decryption exponent d in each calculation. Therefore, using a masked exponent, DPA will not improve the probability of hit over SPA. US 5,991,415 A (Shamir) [6] discloses an RSA compliant way to mask the decryption exponent d with a secret random number r randomly chosen for each calculation and the secret Euler function according to the relation (4):
(7) cT= d + r - <p(n) . (7) cT = d + r - <p (n).
Die Durchführung einer Exponentiation nach Relation (2) mit einem maskierten Entschlüsselungsexponenten d' nach Relation (7) wird im Stand der Technik im Allgemeinen gegenüber einem Ausspähen des Entschlüsselungs- exponenten d mittels DPA als sicher angesehen. Carrying out an exponentiation according to relation (2) with a masked decryption exponent d 'according to relation (7) is generally considered safe in the prior art from spying the decryption exponent d by means of DPA.
DE 100 42 234 C2 (Infineon) [7] offenbart eine weitere Möglichkeit, den geheimen RSA Entschlüsselungsexponenten zu maskieren zu DE 100 42 234 C2 (Infineon) [7] discloses another way to mask the secret RSA decryption exponent
(8) cT= d + r - Ä(n) ,  (8) cT = d + r - Ä (n),
mit einer bei jeder Berechnung zufällig gewählten geheimgehaltenen Zufallszahl r und der geheimgehaltenen Carmichael-Funktion λ(η) with a secret random number r and the secret Carmichael function λ (η) randomly chosen for each calculation
(9) λ{ ) = φ(η) I g = φ(ή) I ggT(p - \,q - \) ,  (9) λ {) = φ (η) I g = φ (ή) I gcd (p - \, q - \),
wobei φ(η) nach wie vor die Eulersche Funktion ist und where φ (η) is still the Euler function and
(10) g = ggT(p - \, q - l)  (10) g = gcd (p - \, q - l)
der größte gemeinsame Teiler (gcd) von p-1 und q-1 ist. is the largest common divisor (gcd) of p-1 and q-1.
In der vorliegenden Patentanmeldung wird ein Angriffsverfahren vorgeschlagen, mit dem sich an Hand der Durchführung einer Exponentiation gemäß Relation (2) u = xd' mod« mit einem gemäß Relation (7) oder (8) mas- kierten geheimen privaten Entschlüsselungsexponenten d' der maskierte Entschlüsselungsexponent d' ermitteln (ausspähen) lässt. Das Angriffsverfahren ist auch im noch unveröffentlichten Dokument [9] beschrieben. Der vorgeschlagene Angriff auf den Square and Multiply Algorithmus (6) stellt eine Kombination aus einfacher Leistungsanalyse SPA und differentiel- ler Leistungsanalyse DPA dar. Der Angriff gegen einen mit der Eulerschen Funktion und einer Zufallszahl r maskierten Entschlüsselungsexponenten d verwendet die Tatsache, dass ungefähr knapp die Hälfte von höchstwertigen Bits des öffentlich bekannten RSA Modulus (3) n = p q übereinstimmt mit den entsprechenden In the present patent application, an attack method is proposed with which, by carrying out an exponentiation according to relation (2), u = x d ' mod' with a secret private decryption exponent d 'according to relation (7) or (8) masked decryption exponent d 'detect (spy) leaves. The attack procedure is also described in the unpublished document [9]. The proposed attack on the Square and Multiply Algorithm (6) represents a combination of simple performance analysis SPA and differential performance analysis DPA. The attack against a decryption exponent d masked with the Euler function and a random number r uses the fact that approximately just that Half of most significant bits of the publicly known RSA modulus (3) n = pq coincide with the corresponding ones
höchstwertigen Bits der geheimgehaltenen Eulerschen Funktion (4) most significant bits of the secreted Eulerian function (4)
<p(n) = (p - 1) · (q - 1) . Die höchstwertigen Bits des gemäß Gleichung (5) d = e~l (mod<p(n)) berechneten unmaskierten Entschlüsselungsexponenten d lassen sich, wie in Boneh, D.„Twenty Years of Attacks on the RSA Crypto- system", Notices of the AMS 46, 203-213, 1999 [8] beschrieben, erraten. Daher ist in den höchstwertigen Bits der Maskierung des maskierten Entschlüsse- lungsexponenten d' lediglich die Zufallszahl r unbekannt. Auf dieser Grundlage lässt sich die zur Maskierung des geheimen Entschlüsselungsexponenten d verwendete Zufallszahl r mit vertretbarem Rechenaufwand ermitteln. Sobald r ermittelt ist, lassen sich die restlichen, niederwertigeren Bits des Entschlüsselungsexponenten d ermitteln. <p (n) = (p-1) · (q-1). The most significant bits of the unmasked decryption exponent d calculated in accordance with Equation (5) d = e ~ l (mod <p (n)) can be obtained as described in Boneh, D. "Twenty Years of Attacks on the RSA Cryptosystem", Notices of the AMS 46, 203-213, 1999 [8] Therefore, only the random number r is unknown in the most significant bits of the mask of the decrypted descrambling exponent d 'On this basis, the one used to mask the secret decryption exponent d can be used Determine random number r with reasonable computational effort Once r is determined, the remaining, lower-order bits of decoding exponent d can be determined.
Bei der Carmichael Funktion (9) λ( ) - φ(ή) I g = φ(η) I ggT(p - 1, q - 1) stimmen die höchstwertigen Bits zwar nicht überein mit den höchstwertigen Bits der Größe g l n , d.h. des durch den ggT g (10) geteilten RSA Modulus (3) n = p q, jedoch gibt es für den ggT g (10) und damit für die höchstwertigen Bits in aller Regel nur relativ wenige Möglichkeiten, die sich durch Ausprobieren ermitteln lassen. Sobald die höchstwertigen Bits der Carmichael Funktion (9) λ(η) gefunden sind, lässt sich wie beim Angriff gegen die Eulersche Funktion die Zufallszahl r ermitteln. Sobald r ermittelt ist, lassen sich die restlichen, niederwertigeren Bits des Entschlüsselungsexponenten d ermitteln. In the Carmichael function (9) λ () - φ (ή) I g = φ (η) I ggT (p - 1, q - 1), the most significant bits do not match the most significant bits of the quantity gln, ie g by the gCD (10) shared RSA modulus (3) n = p q, however, there is the greatest common divisor g (10) and thus for the most significant bits usually relatively few options, which can be determined by trial and error. As soon as the most significant bits of the Carmichael function (9) λ (η) are found, the random number r can be determined as in the attack against the Euler function. Once r is determined, let the determine remaining, lower-order bits of the decryption exponent d.
Für den Angriff wird mit einem Prozessor eine modulare Exponentiation gemäß Relation (2) mit dem mit einer Zufallszahl r maskierten geheimen Entschlüsselungsexponenten d' durchgeführt und der Leistungsverbrauch des Prozessors während der Exponentiation in Abhängigkeit von der Zeit gemessen und aufgezeichnet. Der aufgezeichnete Leistungsverbrauch in Abhängigkeit von der Zeit wird als Leistungsprofil bezeichnet. For the attack, a processor executes a modular exponentiation according to relation (2) with the secret decryption exponents d 'dotted with a random number r, and the power consumption of the processor during exponentiation as a function of time is measured and recorded. The recorded power consumption as a function of time is called power profile.
Der Angriff umfasst drei Teilabschnitte, nämlich Aufnahmeschritt, SPA Phase und DPA Phase. Im Aufnahmeschritt wird eine Vielzahl von m Leistungsprofilen von m Durchführungen einer Exponentiation (2) aufgenommen, mit Maskierung des Entschlüsselungsexponenten d mit jeweils einer jeweils neu zufällig gewählten Zufallszahl r} . , j = 0 · · · m - 1 . In der SPA Phase werden die Leistungsprofile aus dem Aufnahmeschritt analysiert und daraus ungefähr knapp die Hälfte von höchstwertigen Bits des Entschlüsselungsexponenten d und der Eulerschen Funktion ermittelt, und alle m Zufallszahlen r} . , j = 0· · · m - 1 ermittelt. In der DPA Phase werden mittels statis- tischer Methoden aus mehreren, aus der Vielzahl geeignet ausgewählten Leistungsprofilen die restlichen, niedrigerwertigen Bits des Entschlüsselungsexponenten d und der Eulerschen Funktion ermittelt. The attack consists of three subsections, namely pickup step, SPA phase and DPA phase. In the acquisition step, a multiplicity of m power profiles of m implementations of an exponentiation (2) are recorded, with masking of the decryption exponent d, each with a newly randomly selected random number r } . , j = 0 · · · m - 1. In the SPA phase, the performance profiles from the acquisition step are analyzed and from this approximately just half of the most significant bits of the decryption exponent d and Euler's function are determined, and all m random numbers r } . , j = 0 · · · m - 1 determined. In the DPA phase, the remaining, lower-order bits of the decryption exponent d and the Euler function are determined by means of statistical methods from a plurality of power profiles suitably selected from the plurality.
Der Erfindung liegt die Aufgabe zu Grunde, ein Verfahren zum Erzeugen eines RSA Entschlüsselungsexponenten d zu schaffen, der einen verbesserten Schutz gegen Ausspähung ermöglicht. Insbesondere soll ein Verfahren zum Erzeugen eines RSA Entschlüsselungsexponenten d angegeben werden, der einen guten Schutz gegen den hier vorgeschlagenen Angriff ermöglicht. Weiter soll ein Verfahren zum Erzeugen eines verbessert gegen Seitenkanalan- griffe geschützten maskierten RSA Entschlüsselungsexponenten cT auf Grundlage des erzeugten (unmaskierten) RSA Entschlüsselungsexponenten d angegeben werden. Die Aufgabe wird gelöst durch ein Verfahren nach Anspruch 1. Vorteilhafte Ausgestaltungen der Erfindung sind in den abhängigen Ansprüchen angegeben. It is an object of the invention to provide a method for generating an RSA decryption exponent d which allows improved protection against spying. In particular, a method for generating an RSA decryption exponent d is to be specified, which allows good protection against the attack proposed here. Furthermore, a method for generating an improved against side channel protected masked RSA decryption exponent cT based on the generated (unmasked) RSA decryption exponent d. The object is achieved by a method according to claim 1. Advantageous embodiments of the invention are specified in the dependent claims.
Das Verfahren nach Anspruch 1 zum Erzeugen eines gegen Ausspähung schützbaren geheimen RSA Entschlüsselungsexponenten d in einem Prozessor ist gekennzeichnet durch die Schritte The method of claim 1 for generating a spy-resistant secret RSA decryption exponent d in a processor is characterized by the steps
a) Auswählen einer Konstruktionszahl z; a) selecting a design number z;
b) Auswählen von zwei RSA Primzahlen p, q in Abhängigkeit von der gewählten Konstruktionszahl z; b) selecting two RSA primes p, q as a function of the chosen design number z;
c) Berechnen des RSA Modulus n = p - q ; c) calculating the RSA modulus n = p - q;
d) Auswählen eines öffentlichen RSA Verschlüsselungsexponenten e; d) selecting a public RSA encryption exponent e;
e) Berechnen eines - unmaskierten - RSA Entschlüsselungsexponenten d unter Verwendung der gewählten Konstruktionszahl z. Durch das kontrollierte Auswählen der beiden RSA Primzahlen p, q in Abhängigkeit von der ausgewählten Konstruktionszahl z wird der Entschlüsselungsexponent d gezielt so konstruiert, dass eine nachfolgende Maskierung von d zu d' unter Verwendung der ausgewählten Konstruktionszahl z besonders effizient wirkt. Die Grundlage für die Effizienz der (später noch durchzuführenden) Maskierung von d zu d' ist dabei die gezielte Konstruktionsweise für den unmaskierten Entschlüsselungsexponenten d. Das erfindungsgemäße Verfahren liefert somit einen geheimen RSA Entschlüsselungsexponenten d, der, nachdem er zusätzlich maskiert worden ist, besser gegen Ausspähen geschützt ist, der also, in der gemäß Anspruch 1 erzeugten unmaskierten Form, einen verbesserten Schutz gegenüber Ausspähung des Entschlüsselungsexponenten d ermöglicht. e) calculating an - unmasked - RSA decryption exponent d using the chosen design number z. By selectively selecting the two RSA primes p, q as a function of the selected design number z, the decryption exponent d is deliberately constructed so that subsequent masking from d to d 'using the selected design number z is particularly efficient. The basis for the efficiency of the (later to be performed) masking of d to d 'is the specific construction method for the unmasked decryption exponent d. The inventive method thus provides a secret RSA decryption exponent d, which, after it has been additionally masked, better protected against spying, that is, in the generated according to claim 1 unmasked form, allowing improved protection against spying on the decryption exponent d.
Die Konstruktionszahl z ist vorzugsweise möglichst groß gewählt, dabei aber ausreichend klein, dass noch ausreichend Möglichkeiten vorhanden sind, die beiden Primzahlen p, q auszuwählen. The design number z is preferably chosen as large as possible, but sufficiently small that there are still sufficient possibilities to select the two prime numbers p, q.
Wahlweise hat genauer die Konstruktionszahl z eine Bitlänge lz und der RSA Modulus eine Bitlänge In. Die Bitlänge In des Modulus n ist bereits vor Berechnung des Modulus n bekannt, da die RSA Berechnung so konstruiert wird, dass der Modulus n eine gewünschte Bitlänge hat, beispielsweise 2048 Bit beim RSA-2048, 1024 Bit beim RSA-1024 etc.. Wahlweise wird die Bitlänge lz der Konstruktionszahl z so ausgewählt, dass sie im Bitlängen-Bereich liegt, der sich von 32 bis zu einem Viertel der Bitlänge In des RSA Modulus n erstreckt (z.B. lz bis maximal 512 bei ln=2048), weiter vorzugsweise im Bereich von 64 bis zu einem Viertel der Bitlänge In des RSA Modulus n, weiter vorzugsweise im Bereich von 64 bis zu einem Achtel der Bitlänge In des RSA Modulus n (z.B. lz bis maximal 256 bei ln=2048). Wahlweise beträgt die Bitlänge lz der Konstruktionszahl z genau 64 Bit. An der Bitlänge lz der Kon- struktionszahl bemisst sich, wie viele Bits ein Angreifer zusätzlich erraten muss, nämlich lz, falls alle lz Bits zufällig gewählt sind, oder (lz-1), falls das höchste Bit gesetzt ist und die übrigen Bits zufällig gewählt sind. Daher ist es vorteilhaft, wenn z und lz möglichst groß gewählt wird. Andererseits sollte die Bitlänge lz der Konstruktionszahl ausreichend klein im Vergleich zur Bitlänge In des Modulus sein, da bei zu großer Bitlänge lz der Konstruktionszahl die Auswahlmöglichkeiten für die Zufallszahlen p und q unvorteilhaft eingeschränkt würden. Eine Bitlänge lz der Konstruktionszahl z von 64 Bit stellt dahingehend, insbesondere für RSA-2048 und RSA-1024, einen guten Kompromiss dar. Das Berechnen in Schritt e) ist vorzugsweise gestaltet als: Berechnen des (un- maskierten) RSA Entschlüsselungsexponenten d gemäß der Berechnungsvorschrift d = e'x mod(( 7 - 1) · (q - 1) / z) = φ(ή) I z . Optionally, the design number z has a bit length lz and the RSA modulus has a bit length lz. The bit length In of the modulus n is already known before the modulus n is calculated, since the RSA calculation is constructed such that the modulus n has a desired bit length, for example 2048 bits for the RSA-2048, 1024 bits for the RSA-1024 etc. For example, the bit length lz of the design number z is selected to be in the bit length range extending from 32 to a quarter of the bit length In of the RSA modulus n (eg, lz to a maximum of 512 if ln = 2048), more preferably in the range from 64 to a quarter of the bit length In of the RSA modulus n, more preferably in the range of 64 to one-eighth of the bit length In of the RSA modulus n (eg lz to a maximum of 256 if ln = 2048). Optionally, the bit length lz of the design number z is exactly 64 bits. The bit length lz of the design number is used to determine how many additional bits an attacker must guess, namely lz if all lz bits are randomly selected, or (lz-1) if the highest bit is set and the remaining bits are selected at random are. Therefore, it is advantageous if z and lz is chosen as large as possible. On the other hand, the bit length lz of the design number should be sufficiently small in comparison to the bit length In of the modulus, since too large a bit length lz of the design number would unfavorably limit the choices for the random numbers p and q. A bit length lz of design number z of 64 bits is a good compromise, especially for RSA-2048 and RSA-1024. The calculation in step e) is preferably designed as: calculating the (unmasked) RSA decryption exponent d according to the calculation rule d = e 'x mod ((7 - 1) * (q-1) / z) = φ (ή) I z.
Die Größe ((p - 1) · (q - 1) / z) = <p(n) I z , d.h. der in der Berechnungsformel für den RSA Entschlüsselungsexponenten d verwendete Modulus, hat im Unterschied zur herkömmlicherweise an dieser Stelle verwendeten Eulerschen Funktion φ ή) (vgl. Gig (5)) den Vorteil, dass die höchstwertigen Bits auf Grund der Division durch die Konstruktionszahl z nicht bekannt sind. Somit sind auch die höchstwertigen Bits des RSA Entschlüsselungsexponenten d nicht bekannt. Je größer z ist, umso schwieriger ist es zudem, z zu erraten. Zudem wird durch die Berechnung des Entschlüsselungsexponenten d gemäß der Berechnungsvorschrift d = e~ mod({p - \) - {q - \)l z) erreicht, dass zur Maskierung von d zu d' mittels einer Zufallszahl r analog die verbesserte Maskierungsfunktion φ(ή)Ι z verwendet werden kann, d.h. die Maskierung kann gemäß d'= d + r (p - 1) · (q - 1) I z = d + r φ(η) I z erfolgen. The quantity ((p-1) * (q-1) / z) = <p (n) lz, ie the modulus used in the calculation formula for the RSA decryption exponent d, has the Eulerian function conventionally used at this point φ ή) (compare Gig (5)) has the advantage that the most significant bits are not known due to the division by the design number z. Thus, even the most significant bits of the RSA decryption exponent d are not known. The larger z is, the more difficult it is to guess z. In addition, by calculating the decryption exponent d according to the calculation rule d = e ~ mod ({p - \) - {q - \) lz), the masking function φ (in order to mask d to d 'by means of a random number r) is achieved analogously. ή z can be used, ie the masking can take place according to d '= d + r (p-1) * (q-1) I z = d + r φ (η) I z.
Der Prozessor ist beispielsweise ein Mikroprozessor in einer Chipkarte oder einem anders als kartenf örmig geformten Token. Wahlweise ist der Prozessor ein einem Mikroprozessor zugeordneter Krypto-Coprozessor. For example, the processor is a microprocessor in a smart card or other than card shaped tokens. Optionally, the processor is a crypto-coprocessor associated with a microprocessor.
Der berechnete RSA Entschlüsselungsexponent d kann nachfolgend für prinzipiell beliebig viele Exponentiationen, jeweils Entschlüsselungen oder Signaturerstellungen, z.B. gemäß Gleichung (2), verwendet werden. In der Regel wird der RSA Entschlüsselungsexponent d vor Durchführung der Ex- ponentiation noch maskiert. Die Auswahl der Konstruktionszahl z und der Primzahlen p, q sowie die Berechnung von d muss dabei nur ein einziges Mal durchgeführt werden. Vorzugsweise sind die Primzahlen p, q wie folgt abhängig von der Konstruktionszahl z gebildet, und ist der (unmaskierte) Entschlüsselungsexponent d wie folgt RSA konform gebildet. The calculated RSA decryption exponent d can subsequently be used for in principle any number of exponentiations, respectively decryptions or signature creations, eg according to equation (2). As a rule, the RSA decryption exponent d is still masked before execution of the exponentiation. The selection of the design number z and the prime numbers p, q as well as the calculation of d has to be done only once. Preferably, the prime numbers p, q are formed as follows depending on the design number z, and the (unmasked) decryption exponent d is RSA compliant as follows.
Schritt b) ist vorzugsweise gestaltet als: Auswählen von zwei RSA Primzahlen p, q in Abhängigkeit von der gewählten Konstruktionszahl z derart, dass p/z Rest eins ergibt und q/z Rest eins ergibt. Step b) is preferably designed as: selecting two RSA primes p, q as a function of the selected design number z such that p / z gives remainder one and q / z gives remainder one.
Durch eine derartige Auswahl der Konstruktionszahl z und der Primzahlen p, q wird erreicht, dass der öffentliche Verschlüsselungsexponent e teilerfremd zu φ(η) I z ist. By such a selection of the design number z and the prime numbers p, q, it is achieved that the public encryption exponent e is prime relative to φ (η) I z.
Wahlweise wird als Konstruktionszahl z eine Zufallszahl gewählt. Wahlweise wird als Konstruktionszahl z eine Primzahl gewählt, wahlweise eine nicht-prime Zahl. Eine prime und eine nicht-prime Konstruktionszahl haben jeweils unterschiedliche Vor- und Nachteile, abhängig vom konkreten Beispiel. Optionally, a random number z is chosen as the design number z. Optionally, the design number z is a prime number, optionally a non-prime number. A prime and a non-prime construction number each have different advantages and disadvantages, depending on the concrete example.
Wahlweise wird im Schritt d)„Auswählen eines öffentlichen RSA Verschlüs- selungsexponenten e " die Eulersche Funktion <p(n) gemäß Gig (4) berechnet, sowie φ{η) I z berechnet. Wahlweise wird der öffentliche RSA Verschlüsselungsexponent e so gewählt, dass e teilerfremd zu φ(η) I z ist, z.B. wie oben angegeben. Ein erfindungsgemäßes Verfahren zum Berechnen eines gegen Ausspähung geschützten maskierten geheimen RSA Entschlüsselungsexponenten d' in einem Prozessor ist gekennzeichnet durch die Schritte: Optionally, in step d), "selecting a public RSA encryption exponent e", the Euler function <p (n) is computed according to Gig (4), and φ {η) I z is calculated Optionally, the public RSA encryption exponent e is chosen e is prime to φ (η) I z, eg as stated above A method according to the invention for computing a spy protected masked secret RSA decryption exponent d 'in a processor is characterized by the steps of:
a)-e) Berechnen eines (unmaskierten) RSA Entschlüsselungsexponenten d nach einem Verfahren wie oben angegeben; f) Auswählen einer Maskierungszahl r; a) -e) calculating an (unmasked) RSA decryption exponent d according to a method as stated above; f) selecting a masking number r;
g) Berechnen des maskierten RSA Entschlüsselungsexponenten d' unter Verwendung des RSA Entschlüsselungsexponenten d, der Maskierungszahl r und der gewählten Konstruktionszahl z. g) calculating the masked RSA decryption exponent d 'using the RSA decryption exponent d, the masking number r and the selected design number z.
Schritt g) ist vorzugsweise gestaltet als: Berechnen des maskierten RSA Entschlüsselungsexponenten d' gemäß der Berechnungsvorschrift Step g) is preferably designed as: calculating the masked RSA decryption exponent d 'according to the calculation rule
d'= d + r {p - 1) · (q - 1) I z = d + r · φ(η) I z . Der erfindungsgemäß berechnete RSA Entschlüsselungsexponent d wird also mit der verbesserten Maskierungsfunktion φ(η) I z maskiert. Hierdurch wird erreicht, dass auch die höchstwertigen Bits des maskierten RSA Entschlüsselungsexponenten d' mittels einer auch in diesen höchstwertigen Bits geheimen Maskierungsfunktion φ ή)Ι z und zusätzlich mittels der Zufalls- zahl r geschützt sind, und nicht wie im herkömmlichen RSA Verfahren lediglich mittels der Zufallszahl r. In Verbindung mit einer vorzugsweise großen Größe von z ist auch ein Erraten von z unrealistisch. d '= d + r {p-1) * (q-1) I z = d + r * φ (η) I z. The RSA decryption exponent d calculated according to the invention is thus masked with the improved masking function φ (η) I z. This ensures that even the most significant bits of the masked RSA decryption exponent d 'are protected by means of a masking function φ ή) Ι z, which is also secret in these most significant bits, and additionally by means of the random number r, and not by means of the Random number r. In connection with a preferably large size of z, even guessing z is unrealistic.
Wahlweise wird als Maskierungszahl r eine Zufallszahl gewählt. Wahlweise ist die Maskierungszahl prim oder nicht prim. Im Allgemeinen wird die Maskierungszahl nicht prim sein. Optionally, a random number is selected as masking number r. Optionally, the masking number is prime or not prime. In general, the masking number will not be prime.
Der mit der Maskierungszahl r maskierte Entschlüsselungsexponent d' wird in der Regel nur ein einziges Mal verwendet. Für jede erneute Verwendung eines maskierten Entschlüsselungsexponenten d' wird in der Regel eine neue Maskierungszahl, insbesondere Zufallszahl r ausgewählt und ein neuer maskierter Entschlüsselungsexponent d' berechnet. Wahlweise wird der öffentliche Verschlüsselungsexponent e klein gewählt, gemessen insbesondere an der Leistung des Prozessors, beispielsweise höchstens 217 + 1 oder höchstens 218 + 1 , z.B. e = 216 + 1 = 65537 . Durch die erfindungsgemäße Konstruktion der RSA Primzahlen p und q ist das erfin- dungsgemäße Verfahren auch dann noch sicher, wenn e klein ist und daher der durch die Anmelderin vorgeschlagene Angriff auf einen herkömmlich maskierten RSA Entschlüsselungsexponenten d erfolgreich sein könnte. Die Erfindung bietet somit insbesondere Schutz für ein RSA Verfahren, bei dem ein relativ kleiner öffentlicher Verschlüsselungsexponent e verwendet wird. The decryption exponent d 'masked with the masking number r is usually used only once. For each new use of a masked decryption exponent d ', a new masking number, in particular a random number r, is usually selected and a new masked decryption exponent d' is calculated. Optionally, the public encryption exponent e is chosen to be small, measured in particular by the performance of the processor, for example at most 2 17 + 1 or at most 2 18 + 1, eg e = 2 16 + 1 = 65537. Due to the inventive construction of the RSA primes p and q, the method according to the invention is still safe even if e is small and therefore the attack on a conventionally masked RSA decryption exponent d proposed by the applicant could be successful. The invention thus offers particular protection for an RSA method in which a relatively small public encryption exponent e is used.
Ein erfindungsgemäßes Verfahren zur Berechnung einer modularen Expo- nentiation u = xd' mod« in einem Prozessor wird mit einem maskierten RSA Entschlüsselungsexponenten d' durchgeführt, der nach einem Verfahren wie oben angegeben berechnet wird. A method according to the invention for calculating a modular exponentiation u = x d ' mod in a processor is carried out with a masked RSA decryption exponent d' calculated according to a method as stated above.
Eine Entschlüsselung zur Entschlüsselung eines Chiffrats x zu einem Klartext u wird durch modulare Exponentiation wie oben beschrieben durchgeführt. Eine Signaturberechnung zur Signierung eines Eingabedatensatzes x zu einer Signatur u wird ebenfalls durch modulare Exponentiation wie oben be- schrieben durchgeführt. Decryption for decrypting a ciphertext x to a plaintext u is performed by modular exponentiation as described above. A signature calculation for signing an input data set x into a signature u is likewise carried out by modular exponentiation as described above.
Bei einem Verfahren zum sequentiellen Durchführen einer Mehrzahl von Exponentiationen wird für jede Exponentiation eine neue Maskierungszahl r ausgewählt und ein neuer maskierter RSA Entschlüsselungsexponent d' be- rechnet. In a method for sequentially performing a plurality of exponentiations, a new masking number r is selected for each exponentiation and a new masked RSA decrypting exponent d 'is calculated.
Im Folgenden wird die Erfindung an Hand von Ausführungsbeispielen und unter Bezugnahme auf die Zeichnung näher erläutert, in der zeigen: Fig. 1 ein Histogramm für Messungen des Stromverbrauchs von Quadrierungen und Multiplikationen; In the following the invention will be explained in more detail with reference to exemplary embodiments and with reference to the drawing, in which: Fig. 1 is a histogram for power consumption measurements of squares and multiplications;
Fig. 2 ein schematisiertes Leistungsprofil T} eines Prozessors bei der Berechnung einer Abfolge von Quadrierungen und Multiplikationen. Fig. 2 is a schematic power profile T } of a processor in calculating a sequence of squares and multiplications.
Fig. 1 zeigt ein Histogramm eines Prozessors für Messungen des Stromverbrauchs I (in beliebigen Einheiten a.u.) von Quadrierungen S (Squaring) und Multiplikationen M (Multiplication), in dem aufgetragen ist, welcher Stromverbrauch I mit welcher relativen Häufigkeit F auftritt. Zur Erstellung des Histogramms wurden mit dem Prozessor gezielt Quadrierungen S und Multiplikationen M durchgeführt und der Stromverbrauch während der jeweiligen Operation ermittelt. Quadrierungen S sind durch schwarze Balken dargestellt, Multiplikationen M durch graue Balken. Für die Verteilungen der Häufigkeiten sind, für Quadrierungen S und Multiplikationen M ge- trennt, Standardverteilungen (Glockenkurven, schwarz für Quadrierungen S, grau für Multiplikationen M) und deren Mittelwerte (senkrechter Pfeil S für Mittelwert der Quadrierung bzw. M für Mittelwert der Multiplikation) eingezeichnet. Aus dem Histogramm ist ersichtlich, dass der mittlere Stromverbrauch einer Quadrierung niedriger ist als der mittlere Stromverbrauch einer Multiplikation (Pfeil S liegt links von Pfeil M, bei niedrigerem Wert von I). Der tatsächliche Stromverbrauch einer einzelnen Operation, Quadrierung S oder Multiplikation M, kann bei einem abweichenden Wert liegen. Die Abweichung lässt sich durch die Standardabweichung der Standardverteilung darstellen. Fig. 1 zeigt weiter, dass Stromverbräuche von Quadrie- rungen auftreten, bei denen der Wert des Stromverbrauchs vermuten ließe, eine Multiplikation wäre durchgeführt worden, und umgekehrt. Hieraus ergibt sich, dass bei einer Messung des Stromverbrauchs einer unbekannten Operation nur mit einer gewissen Wahrscheinlichkeit angegeben werden kann, ob eine Quadrierung oder Multiplikation durchgeführt wurde. Um aus einer modularen Exponentiation mit einem Prozessor den bei der Exponentiation als Exponenten verwendeten maskierten geheimen Entschlüsselungsexponenten d' auszuspähen, werden aus mehreren Durchfüh- rungen der Exponentiation Leistungsprofile gewonnen und unter Verwendung eines Histogramms wie des in Fig. 1 gezeigten analysiert. 1 shows a histogram of a processor for measurements of the current consumption I (in arbitrary units au) of squaring S and multiplication M (multiplication), in which is plotted which current consumption I occurs with which relative frequency F. To generate the histogram, squaring S and multiplication M were carried out with the processor in a targeted manner and the power consumption during the respective operation was determined. Squarings S are represented by black bars, multiplications M by gray bars. For the distributions of the frequencies, for squaring S and multiplications M are separated, standard distributions (bell curves, black for squaring S, gray for multiplications M) and their mean values (vertical arrow S for mean of the squaring or M for mean of the multiplication) located. It can be seen from the histogram that the average power consumption of a squaring is lower than the average power consumption of a multiplication (arrow S is to the left of arrow M, the lower value of I). The actual power consumption of a single operation, squaring S or multiplying M, may be at a different value. The deviation can be represented by the standard deviation of the standard distribution. FIG. 1 further shows that power consumptions of squares occur in which the value of power consumption would suggest that multiplication would have been performed, and vice versa. It follows that when measuring the power consumption of an unknown operation can be specified only with a certain probability, whether a squaring or multiplication was performed. In order to spy out from a modular exponentiation with a processor the masked secret decryption exponent d 'used as an exponentiation exponentiation, performance profiles are obtained from several executions of the exponentiation and analyzed using a histogram such as that shown in FIG.
Fig. 2 zeigt ein schematisiertes Leistungsprofil Γ. eines Prozessors, d.h. die vom Prozessor verbrauchte Leistung P als Funktion der Zeit t, bei der Be- rechnung einer Abfolge von Quadrierungen und Multiplikationen, wie sie bei der Durchführung einer modularen Exponentiation vorkommen kann. Das Leistungsprofil ist gleich dem Stromprofil, d.h. dem Stromverbrauch als Funktion der Zeit, multipliziert mit einer angelegten Spannung. Jede Leistungsspitze in Fig. 2 entspricht einer einzelnen Operation, Quadrierung S oder Multiplikation M. Die Gesamtabfolge von Leistungsspitzen und zugeordneten Operationen liefert zum Leistungsprofil ein entsprechendes Operationsprofil O = SMSSSSMSSSMSM ... . Gemäß Algorithmus (6), Zeile 6 steht jeweils eine Operationsfolge Quadrierung und Multiplikation SM für jedes Exponentenbit mit Wert 1, und eine einzelne Operation Quadrierung S für jedes Exponentenbit 0. Damit entspricht das Leistungsprofil aus Fig. 2 einem verarbeiteten Exponenten d = 10001001 1... . An Hand des Leistungsverbrauchs einer einzelnen Operation und der Abweichung dieses Leistungsverbrauchs vom erwarteten, aus dem Histogramm von Fig. 1 ermittelten Mittelwert für die jeweilige Operation, wird jeder identifizierten Opera- tion eine Wahrscheinlichkeit zugeordnet und so dem Operationsprofil ein Wahrscheinlichkeitsprofil W zugeordnet, die angibt, mit welcher Wahrscheinlichkeit der jeweilige Wert im Operationsprofil, S bzw. M, eine Quadrierung S ist (alternativ: Wahrscheinlichkeit, dass die Operation eine Multi- plikation ist). Für O wie oben an Hand von Fig. 2 angegeben könnte das Wahrscheinlichkeitsprofil W beispielsweise die folgende Gestalt haben: W = 0.99,0.65,0.92,0.27,1.00,0.30,0.01,0.63,0.94,0.53,0.02,0.68,0.04, ... . Der Angriff lässt sich, wie weiter oben gesagt, in drei Teilabschnitte Aufnahmeschritt, SPA Phase und DPA Phase unterteilen. Fig. 2 shows a schematic power profile Γ. a processor, ie the power P consumed by the processor as a function of time t, in the calculation of a sequence of squares and multiplications, as may occur when carrying out a modular exponentiation. The power profile is equal to the current profile, ie the power consumption as a function of time multiplied by an applied voltage. Each power peak in Figure 2 corresponds to a single operation, squaring S or multiplication M. The overall sequence of power spikes and associated operations provides a corresponding operation profile to the power profile O = SMSSSSMSSSMSM .... According to algorithm (6), line 6, there is one operation sequence squaring and multiplication SM for each exponent bit with value 1, and a single operation squaring S for each exponent bit 0. Thus, the power profile from FIG. 2 corresponds to a processed exponent d = 10001001 1. ... Based on the power consumption of a single operation and the deviation of this power consumption from the expected average value for the respective operation determined from the histogram of FIG. 1, a probability is assigned to each identified operation and a probability profile W is assigned to the operation profile, which indicates with which probability the respective value in the operation profile, S or M, is a squaring S (alternatively: probability that the operation plication is). For example, as stated above with respect to FIG. 2, the probability profile W could have the following shape: W = 0.99,0.65,0.92,0.27,1.00,0.30,0.01,0.63,0.94,0.53,0.02,0.68,0.04,. ... As mentioned above, the attack can be subdivided into three subsections of admission step, SPA phase and DPA phase.
1. Aufnahmeschritt: Aufnahme der Leistungsprofile In einem Aufnahmeschritt werden Leistungsprofile _Ty , / = 0, · · m - 1 , wie das in Fig. 2 gezeigte, von m Durchführungen des Square and Multiply Algorithmus (6) mit gemäß Relation (7) mit m 1-Bit langen Zufallszahlen 1. Capture step. Accommodating the power profiles in a receiving step, power profiles _T y, / = 0, · · m - 1, such as that shown in Figure 2, of m-throughs of the square and multiply algorithm (6) according to relation (7 ) with m 1-bit long random numbers
. , j = 0, · · · m - 1 maskierten privaten RS A Entschlüsselungsexponenten d'= d + rj φ(η), j = 0, · · · m - 1 , aufgenommen. Jedem Leistungsprofil wird ein Operationsprofil und ein Wahrscheinlichkeitsprofil zugeordnet. Die Operationsfolge im Operationsprofil spiegelt den maskierten Exponenten d' wieder. Ziel ist es, den unmaskierten Exponenten d zu ermitteln. , , J = 0, · · · m - 1 RS private masked A decryption exponent d '= d + r j ■ φ (η), j = 0, · · · m - 1 was added. Each performance profile is assigned an operation profile and a probability profile. The sequence of operations in the operation profile reflects the masked exponent d '. The goal is to determine the unmasked exponent d.
2. SPA Phase 2nd SPA phase
Für die höchstwertigen Bits jedes Leistungsprofils T} wird anhand der in diesem Bereich gültigen Gleichung d'- d + r - n , mit n statt der Eulerschen Funktion, die Maskierungszahl r Bit für Bit erraten. Beim Erraten wird jeweils das Wahrscheinlichkeitsprofil berücksichtigt, wobei zu schlechte Rate- ergebnisse aussortiert werden. Sobald r erraten ist, können, wie in [8] angegeben ist, die höchstwertigen Bits des unmaskierten Entschlüsselungsexponenten d erraten werden, wenn die folgenden Bedingungen erfüllt sind: die Primzahlen p und q haben beide ungefähr den Wert V« , und der öffentliche Verschlüsselungsexponent ist klein, beispielsweise e = 65537 = 216 + l . Die Bedingung für den Grenzwert von e hängt von der Rechenleistung eines zur Berechnung verwendeten Prozessors ab. Unter der Bedingung, dass p und q beide ungefähr den Wert n haben, gibt es für die Mehrzahl von höchstwer- tigen Bits von d nur e - 1 mögliche Werte. Unter der weiteren Bedingung, dass e klein ist, lässt sich die Mehrzahl von höchstwertigen Bits von d durch Ausprobieren ermitteln. For the most significant bits of each power profile T } , the masking number r is calculated bit by bit on the basis of the equation d'd + r - n valid in this range, with n instead of the Euler function. In the guessing process, the probability profile is taken into account, whereby too poor rate results are sorted out. Once r is guessed, as indicated in [8], the most significant bits of the unmasked decryption exponent d can be guessed if the following conditions are met: the prime numbers p and q are both approximately equal to V «, and the public Encryption exponent is small, for example e = 65537 = 2 16 + l. The condition for the limit of e depends on the computing power of a processor used for the calculation. Under the condition that p and q both have approximately the value n, there are only e-1 possible values for the majority of most significant bits of d. Under the further condition that e is small, the plurality of most significant bits of d can be determined by trial and error.
3. DPA Phase 3rd DPA phase
Sobald die höchstwertigen Bits des unmaskierten Entschlüsselungsexponenten d und die Maskierungszahl r aus der SPA Phase bekannt sind, werden mittels DPA, in an sich bekannter Weise, die restlichen noch unbekannten, Bits des unmaskierten Entschlüsselungsexponenten d Bit für Bit durch statis- tische Auswertung ermittelt, beginnend beim niedrigstwertigen Bit. As soon as the most significant bits of the unmasked decryption exponent d and the masking number r from the SPA phase are known, the remaining unknown bits of the unmasked decryption exponent d are determined bit by bit by statistical evaluation, starting in a manner known per se at the least significant bit.
Bei einem erfindungsgemäß konstruierten maskierten Entschlüsselungsexponenten d' ist das Erraten der Maskierungszahl r nicht mehr möglich, da auf Grund der speziellen Auswahl der Primzahlen p und q kein Bereich der Gleichheit zwischen dem bekannten Modulus n - p - q und der geheimgehaltenen, zur Maskierung verwendeten verbesserten Maskierungsfunktion (p - \) - {q - \)l z existiert. Insbesondere bei groß gewählter Maskierungszahl z ist auch ein Erraten unrealistisch. Zudem sind auch die höchstwertigen Bits des unmaskierten Entschlüsselungsexponenten d auf Grund der verbesser- ten Konstruktion von d besser geschützt. Somit lässt sich aus Leistungsprofilen aus Exponentiationen mit dem maskierten geheimen Entschlüsselungsexponenten d' nicht mit vertretbarem Rechenaufwand auf den unmaskierten geheimen Entschlüsselungsexponenten d rückschließen. Literatur: In a masked decryption exponent d 'constructed according to the invention, the guessing of the masking number r is no longer possible because, due to the special selection of the prime numbers p and q, there is no range of equality between the known modulus n-p-q and the secreted masking enhancement used Masking function (p - \) - {q - \) lz exists. In particular, with a large number of masking numbers z, guessing is unrealistic. In addition, even the most significant bits of the unmasked decryption exponent d are better protected due to the improved design of d. Thus, it can not be concluded from performance profiles of Exponentiationen with the masked secret decryption exponent d 'with reasonable computational effort on the unmasked secret decryption exponent d. Literature:
[1] US 4,405,829; [4] US 4,405,829;
[2] Alfred Menezes, Paul C. van Oorschot, and Scott A. Vanstone,„Hand- book of applied cryptography", Kapitel 14.6, Algorithmus Nr. 14.79;  [2] Alfred Menezes, Paul C. van Oorschot, and Scott A. Vanstone, "Handbook of Applied Cryptography," Chapter 14.6, Algorithm No. 14.79;
[3] Paul C. Kocher, Joshua Jaffe, and Benjamin Jun,„Differential power analysis", CRYPTO ^99 (M. Wiener, ed.), LNCS, no. 1666, 199, pp. 388-397; [3] Paul C. Kocher, Joshua Jaffe and Benjamin Jun, "Differential power analysis", CRYPTO ^ 99 (M. Wiener, ed.), LNCS, No 1666, 199, pp 388-397..;
[4] Suresh Chari, Josyula R. Rao, and Pankaj Rohatgi,„Template Attacks", Cryptographic Hardware and Embedded Systems 2003 (Burt S. Kaliski, Ce- tin K. Κος, and Christof Paar, eds.), LNCS, no. 2523, Springer-Verlag, 2003, pp. 13-28; [4] Suresh Chari, Josyula R. Rao, and Pankaj Rohatgi, "Template Attacks," Cryptographic Hardware and Embedded Systems 2003 (Burt S. Kaliski, Cetin K. Κος, and Christof Paar, eds.), LNCS, no 2523, Springer-Verlag, 2003, pp. 13-28;
[5] Chevallier-Mämes, B., Ciet, M., Joye, M.:„Low-Cost Solutions for Pre- venting Simple Side-Channel Analysis: Side-Channel Atomicity; Cryptology ePrint Archiv, Report 2003/237 (2003), http://eprint.iacr.org/;  [5] Chevallier-Mämes, B., Ciet, M., Joye, M.: "Low Cost Solutions for Prevention Simple Side-Channel Analysis: Side-Channel Atomicity; Cryptology ePrint Archive, Report 2003/237 (2003), http://eprint.iacr.org/;
[6] US 5,991,415 A; [6] US 5,991,415 A;
[7] DE 100 42 234 C2; [100] DE 100 42 234 C2;
[8] Boneh, D.„Twenty Years of Attacks on the RSA Cryptosystem", Notices of the AMS 46, 203-213, 1999;  [8] Boneh, D. "Twenty Years of Attacks on the RSA Cryptosystem", Notices of the AMS 46, 203-213, 1999;
[9] Bauer, S., Pulkus, J.,„A Combined SPA/DPA Attack Against a Protected RSA Implementation", noch unveröffentlicht.  [9] Bauer, S., Pulkus, J., "A Combined SPA / DPA Attack Against a Protected RSA Implementation," unpublished.

Claims

P a t e n t a n s p r ü c h e Patent claims
1. Verfahren zum Erzeugen eines gegen Ausspähung schützbaren geheimen RSA Entschlüsselungsexponenten d in einem Prozessor, A method of generating a spyware-protected secret RSA decryption exponent d in a processor,
gekennzeichnet durch die Schritte characterized by the steps
a) Auswählen einer Konstruktionszahl z; a) selecting a design number z;
b) Auswählen von zwei RSA Primzahlen p, q in Abhängigkeit von der gewählten Konstruktionszahl z; b) selecting two RSA primes p, q as a function of the chosen design number z;
c) Berechnen des RSA Modulus n = p q ; c) calculating the RSA modulus n = p q;
d) Auswählen eines öffentlichen RSA Verschlüsselungsexponenten e; d) selecting a public RSA encryption exponent e;
e) Berechnen des RSA Entschlüsselungsexponenten d unter Verwendung der gewählten Konstruktionszahl z. e) calculating the RSA decryption exponent d using the chosen design number z.
2. Verfahren nach Anspruch 1, wobei die Konstruktionszahl z eine Bitlänge lz hat und der RSA Modulus eine Bitlänge In hat, und wobei die Bitlänge lz der Konstruktionszahl z im Bitlängen-Bereich liegt, der sich von 32 bis zu einem Viertel der Bitlänge In des RSA Modulus n erstreckt. 2. The method of claim 1, wherein the design number z has a bit length lz and the RSA modulus has a bit length In, and wherein the bit length lz of the design number z is in the bit length range extending from 32 to a quarter of the bit length In of RSA Modulus n extends.
3. Verfahren nach Anspruch 1 oder 2, wobei Schritt e) gestaltet ist als: Be- rechnen des RSA Entschlüsselungsexponenten d gemäß der Berechnungsvorschrift d = e~ mod((/? - 1) · (q - 1) / z) . 3. The method of claim 1 or 2, wherein step e) is configured as: calculating the RSA decryption exponent d according to the calculation rule d = e ~ mod ((/? -1) · (q-1) / z).
4. Verfahren nach einem der Ansprüche 1 bis 3, 4. The method according to any one of claims 1 to 3,
wobei Schritt b) gestaltet ist als: Auswählen von zwei RSA Primzahlen p, q in Abhängigkeit von der gewählten Konstruktionszahl z derart, dass p/ z Rest eins ergibt und q/ z Rest eins ergibt. wherein step b) is configured as: selecting two RSA primes p, q as a function of the selected design number z such that p / z gives remainder one and q / z gives remainder one.
5. Verfahren zum Berechnen eines gegen Ausspähung geschützten maskierten geheimen RSA Entschlüsselungsexponenten d' in einem Prozessor, gekennzeichnet durch die Schritte a)-e) Berechnen eines RSA Entschlüsselungsexponenten d nach einem Verfahren nach einem der Ansprüche 1 bis 4; A method of calculating a spy protected masked secret RSA decryption exponent d 'in a processor, characterized by the steps a) -e) calculating an RSA decryption exponent d by a method according to any one of claims 1 to 4;
f) Auswählen einer Maskierungszahl r; f) selecting a masking number r;
g) Berechnen des maskierten RSA Entschlüsselungsexponenten d' unter Ver- wendung des RSA Entschlüsselungsexponenten d, der Maskierungszahl r und der gewählten Konstruktionszahl z. g) calculating the masked RSA decryption exponent d 'using the RSA decryption exponent d, the masking number r and the selected design number z.
6. Verfahren nach Anspruch 5, wobei als Maskierungszahl r eine Zufallszahl gewählt wird. 6. The method of claim 5, wherein as the masking number r a random number is selected.
7. Verfahren nach Anspruch 5 oder 6, wobei Schritt g) gestaltet ist als: Berechnen des maskierten RSA Entschlüsselungsexponenten d' gemäß der Berechnungsvorschrift d' = d + r · (p - 1) · (q - 1) / z . The method of claim 5 or 6, wherein step g) is configured as: calculating the masked RSA decryption exponent d 'according to the calculation rule d' = d + r * (p-1) * (q-1) / z.
8. Verfahren zur Berechnung einer modularen Exponentiation 8. Method for calculating a modular exponentiation
u = xd' mod« u = x d ' mod «
in einem Prozessor mit einem maskierten RSA Entschlüsselungsexponenten d', der nach einem Verfahren nach einem der Ansprüche 5 bis 7 berechnet wird. in a processor with a masked RSA decryption exponent d 'calculated by a method according to any one of claims 5 to 7.
9. Entschlüsselung oder Signaturberechnung durch modulare Exponentiation nach Anspruch 8 zur Entschlüsselung eines Chiffrats x zu einem Klartext u bzw. zur Signierung eines Eingabedatensatzes x zu einer Signatur u. 9. decryption or signature calculation by modular exponentiation according to claim 8 for decrypting a cipher x to a plaintext u or for signing an input data set x to a signature u.
10. Verfahren zum sequentiellen Durchführen einer Mehrzahl von Exponen- tiationen nach Anspruch 8 oder 9, wobei für jede Exponentiation eine neue Maskierungszahl r ausgewählt wird und ein neuer maskierter RSA Entschlüsselungsexponent d' berechnet wird. 10. A method for sequentially performing a plurality of exponentiations according to claim 8 or 9, wherein for each exponentiation a new masking number r is selected and a new masked RSA decryption exponent d 'is calculated.
PCT/EP2012/003872 2011-09-19 2012-09-17 Secret rsa encryption exponent that can be protected against access violation WO2013041200A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP12783498.4A EP2759090A1 (en) 2011-09-19 2012-09-17 Secret rsa encryption exponent that can be protected against access violation

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE102011115082.3 2011-09-19
DE102011115082A DE102011115082A1 (en) 2011-09-19 2011-09-19 Against spying on protectable secret RSA encryption exponent

Publications (1)

Publication Number Publication Date
WO2013041200A1 true WO2013041200A1 (en) 2013-03-28

Family

ID=47146306

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2012/003872 WO2013041200A1 (en) 2011-09-19 2012-09-17 Secret rsa encryption exponent that can be protected against access violation

Country Status (3)

Country Link
EP (1) EP2759090A1 (en)
DE (1) DE102011115082A1 (en)
WO (1) WO2013041200A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4405829A (en) 1977-12-14 1983-09-20 Massachusetts Institute Of Technology Cryptographic communications system and method
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
DE19837405A1 (en) * 1998-08-18 2000-02-24 Siemens Ag Secret communication key forming method
DE10042234A1 (en) * 2000-08-28 2002-03-14 Infineon Technologies Ag Method and device for performing a modular exponentiation in a cryptographic processor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4405829A (en) 1977-12-14 1983-09-20 Massachusetts Institute Of Technology Cryptographic communications system and method
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
DE19837405A1 (en) * 1998-08-18 2000-02-24 Siemens Ag Secret communication key forming method
DE10042234A1 (en) * 2000-08-28 2002-03-14 Infineon Technologies Ag Method and device for performing a modular exponentiation in a cryptographic processor
DE10042234C2 (en) 2000-08-28 2002-06-20 Infineon Technologies Ag Method and device for performing a modular exponentiation in a cryptographic processor

Non-Patent Citations (10)

* Cited by examiner, † Cited by third party
Title
"Chapter 8: Public-Key Encryption ED - Menezes A J; Van Oorschot P C; Vanstone S A", 1 October 1996 (1996-10-01), XP001525008, ISBN: 978-0-8493-8523-0, Retrieved from the Internet <URL:http://www.cacr.math.uwaterloo.ca/hac/> *
"SHORT DESCRIPTION OF RSA PUBLIC KEY ALGORITHM", INTERNET CITATION, 22 May 2002 (2002-05-22), XP002199681, Retrieved from the Internet <URL:http://www.belymt.jyu.fi/rp/crypt/rsa/rsa.txt> [retrieved on 20020522] *
ALFRED MENEZES; PAUL C. VAN OORSCHOT; SCOTT A. VANSTONE: "Handbook of applied cryptography"
BAUER, S.; PULKUS, J., A COMBINED SPA/ DPA ATTACK AGAINST A PROTECTED RSA IMPLEMENTATION
BONEH, D.: "Twenty Years of Attacks on the RSA Cryptosystem", NOTICES OF THE AMS 46, 1999, pages 203 - 213, XP055076986
CHEVALLIER-MÄMES, B.; CIET, M.; JOYE, M.: "Low-Cost Solutions for Preventing Simple Side-Channel Analysis: Side-Channel Atomicity", CRYPTOLOGY EPRINT ARCHIV, 2003, Retrieved from the Internet <URL:http://eprint.iacr.org>
FACHARTIKEL CHEVALLIER-MÄMES, B.; CIET, M.; JOYE, M.: "Low-Cost Solutions for Preventing Simple Side-Channel Analysis: Side-Channel Atomicity", CRYPTOLOGY EPRINT ARCHIV, 2003
PAUL C. KOCHER; JOSHUA JAFFE; BENJAMIN JUN: "CRYPTO '99", article "Differential power analysis", pages: 388 - 397
PAUL C. KOCHER; JOSHUA JAFFE; BENJAMIN JUN: "Differential power analysis", CRYPTO '99, pages 388 - 397
SURESH CHARI; JOSYULA R. RAO; PANKAJ ROHATGI: "Cryptographic Hardware and Embedded Systems", 2003, SPRINGER-VERLAG, article "Template Attacks", pages: 13 - 28

Also Published As

Publication number Publication date
DE102011115082A1 (en) 2013-03-21
EP2759090A1 (en) 2014-07-30

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
EP1648111B1 (en) Tamper-resistant encryption using a private key
DE69935469T2 (en) Method for fast execution of decryption or authentication
DE69917592T2 (en) AGAINST ELECTRICAL CONSUMER STOCK RESISTANT CRYPTOGRAPHY
EP1891512B1 (en) Determination of a modular inverse
DE60200496T2 (en) Method and apparatus for performing an efficient password-authenticated key exchange
DE69834431T2 (en) LIQUID RESISTANT CRYPTOGRAPHIC PROCESS AND DEVICE
Homma et al. Collision-based power analysis of modular exponentiation using chosen-message pairs
US20040139136A1 (en) Method for securing a computer installation involving a cryptographic algorithm using boolean operations and arithmetic operations and the corresponding embedded system
EP2901611B1 (en) Side-channel-protected masking
DE112008000668T5 (en) Cryptographic procedure and system
DE602004006628T2 (en) METHOD FOR THE SECURED EXECUTION OF AN RSA CRYPTOGRAPHIC ALGORITHM, AND COMPONENT ITEM.
EP1423786A2 (en) Device and method for calculating the result of a modular exponentiation
Somani et al. An improved RSA cryptographic system
EP1346509B1 (en) Method and device for detecting a key pair and for generating RSA keys
DE60022770T2 (en) OPERATION IN AN ELECTRONIC BUILDING PIECE TO PERFORM A CYLINDER TYPE CRYPTAL GORITHM WITH A PUBLIC KEY OF THE RSA TYPE
KR100731575B1 (en) A secure scalar multiplication method against power analysis attacks in elliptic curve cryptosystem
DE60218421T2 (en) Method and device for generating digital signatures
KR100772550B1 (en) Enhanced message blinding method to resistant power analysis attack
EP2759090A1 (en) Secret rsa encryption exponent that can be protected against access violation
DE10328860A1 (en) Device and method for encrypting data
DE10042234C2 (en) Method and device for performing a modular exponentiation in a cryptographic processor
EP1454260A2 (en) Method and device for securing an exponentiation calculation by means of the chinese remainder theorem (crt)
Kaedi et al. A New Side-Channel Attack on Reduction of RSA-CRT Montgomery Method Based
DE102005032731A1 (en) Method for side channel resistant multiplication

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12783498

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2012783498

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2012783498

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE