WO2001052051A2 - Method and devices for carrying out an inversion in the primary number field - Google Patents

Method and devices for carrying out an inversion in the primary number field Download PDF

Info

Publication number
WO2001052051A2
WO2001052051A2 PCT/DE2001/000161 DE0100161W WO0152051A2 WO 2001052051 A2 WO2001052051 A2 WO 2001052051A2 DE 0100161 W DE0100161 W DE 0100161W WO 0152051 A2 WO0152051 A2 WO 0152051A2
Authority
WO
WIPO (PCT)
Prior art keywords
prime number
microprocessor
number field
inversion
numbers
Prior art date
Application number
PCT/DE2001/000161
Other languages
German (de)
French (fr)
Other versions
WO2001052051A3 (en
Inventor
Rainer BLÜMEL
Original Assignee
Cv Cryptovision 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 Cv Cryptovision Gmbh filed Critical Cv Cryptovision Gmbh
Priority to DE10190100T priority Critical patent/DE10190100D2/en
Priority to AU37218/01A priority patent/AU3721801A/en
Publication of WO2001052051A2 publication Critical patent/WO2001052051A2/en
Publication of WO2001052051A3 publication Critical patent/WO2001052051A3/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/721Modular inversion, reciprocal or quotient calculation
    • 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/724Finite field arithmetic
    • G06F7/725Finite field arithmetic over elliptic curves

Definitions

  • the invention relates to the field of cryptographic methods and devices, namely methods and devices which make it possible to carry out a special calculation, namely an inversion in the prime number field as e.g. is required for encryption using elliptic curves.
  • decrypted information is to be decrypted at a location other than the location of the encryption, e.g. information from one computer system (transmitter) to another computer system (receiver) e.g. transmitted over the Internet, the symmetrical method must be the
  • Recipients also receive the key in some form.
  • the asymmetrical methods are considered to be more secure when transmitting encrypted information.
  • the sender and receiver calculate and exchange a private key G s or G E for themselves from a public key G, and then exchange a key G for encryption or decryption SE is used. Even if a third party would query both G s and G E, he would not be able to decipher the message encrypted with the key G SE due to the so-called "problem of the discrete logarithm".
  • Asymmetric encryption methods and devices for performing at least partial steps in the encryption and decryption using asymmetrical methods, in particular using elliptical curves are known from a large number of publications, for example from US 5,159,632, US 5,271,061, US 5,463,690, US 5,581,616. US 5,805,703, US 5,442,707, EP 0 892 520 A2, PCT / DE99 / 00278 and PCT / US99 / 12749, in which also the mathematical foundations of elliptic curves and their application in
  • the cited documents also point out the advantages and disadvantages of the encryption techniques based on elliptic curves compared to the currently most widespread type of asymmetric encryption techniques, the so-called RSA method.
  • the RSA method is based on the problem of factoring large numbers. Smart cards currently available use this algorithm
  • the essential operation in the RSA method is the potentiation of a number m in a number field Z n , where n is a number resulting from the multiplication of two large prime numbers p and q, which as a binary number typically has a bit length of between 1024 and 2048 bits, (p and q usually have
  • Bit lengths between 512 and 1024 bits Bit lengths between 512 and 1024 bits. Implementations of the RSA method on smart cards normally limit n to 1024 bits. In contrast to the RSA method, cryptographic methods based on elliptic curves require divisions in the prime number field. If sufficient resources are available, it is easy to implement such divisions using appropriate computer programs.
  • the object of the invention is therefore on the one hand to provide methods and devices which make it possible to efficiently implement standard algorithms for cryptography with elliptic curves on the processors of smart cards (also called Smaraec ICs) with long-number crypto coprocessors.
  • Another object is to specify methods and devices in which
  • the number field and elliptic curve can be freely selected and can only be read into the EEPROM of the smart card when a corresponding storage medium, for example a smart card, is personalized.
  • the invention proposes the use of the extended Euclidean algorithm for determining an inverse in the prime number field.
  • the recalculation of A and the calculation of x are combined by storing the two values in a register (which then must necessarily be at least twice the length).
  • Another long number register can have the following inscriptions: Q (left-justified), free (length k), B Q (right-justified)
  • a sub-step now ensures that (in the case of processing X) P is set to the rest of the division of P / Q and (at the same time) the value in B P is adjusted accordingly. If Y is processed, the same procedure is followed. These calculations are performed as long as P and Q are greater than zero. If one has reached zero, then B P or B Q contains the inverse sought. With these methods, essentially half as many twice as long registers are sufficient for efficient implementation of the inversions, and the number of memory bits therefore remains unchanged.
  • This new method works with a long-number accumulator and without substantial support from a host processor, since only elementary commands for the long-number register (add, shift, bit test and a way of comparing, this can also be done by a bit test) are required and the dividers with remainder (P and Q) do not have to be buffered.
  • the method describes how a certain class of cryptographic on special microprocessors can be implemented efficiently. With the same security requirements, the necessary computing time on commercially available processors can be considerably reduced compared to the known methods.
  • the algorithm is independent of the special parameters which of the
  • the algorithm described here makes it possible to obtain the results of two necessary operators in one calculation step; this definitely means acceleration.
  • the algorithm presented is an optimization in the event that the microprocessor provides arithmetic routines for numbers with a bit length which is really greater than twice the bit length of the numbers to be processed.
  • Microprocessors with limited performance normally require the inversion of a number modulo a prime number (since an alternative method of calculation requires more buffers than is usually available on these processors). If you have a fast inversion available, the group law for points on elliptic curves is very simple, it is for the
  • the first argument (a) is set to the prime number modulo which one wants to invert the second argument (b); Since the greatest common divisor of a prime number with any other number (smaller than this prime number) is always 1, one has the following identity:
  • Calculation of x can be summarized by storing the two values in a register (which then must necessarily be at least twice the length).
  • the frames should clarify the register length of the processor used below:
  • the algorithm then works with the values of T and U, i.e. processes A and B or x 2 and xi simultaneously.
  • the subtraction V T - q * U then provides the results for r & x 0 in one step.
  • the quotient q is not really calculated in practice. Instead, the maximum possible multiples are successively subtracted (with a power of two). With the subtraction of X 2 and the respective multiple of X-, the sign bit propagates until the representation of A in the usual binary representation of the operands.
  • the Euclidean algorithm is mainly required to calculate an inverse. Let P be a prime element, so the greatest common divisor is the 1 element, and B Q is also searched for
  • the algorithm consists of steps of the form
  • Part b Calculate new intermediate values
  • a Q : p P A Q + qpAp
  • the leading bit from Z is shifted to 0 by operations of the form (15) and the Z register is shifted to the left by 1 bit; It is not known in advance whether the leading bit of Z is 1. Because of this, the subtraction is in the form
  • bit length of P ' A second consequence of the "bit borrow" is the bit length of P '. If the correct value were a power of two (2 ⁇ '1 ), the actual bit representation is 2 n "1 -1, the bit length of the
  • the last question is whether one of the numbers B P B Q can be longer than I bits (more precisely: greater than P). For the Euclidean
  • H hash function H (m) hash value of the message
  • Extended Euclidean algorithm uses 2 Zahieniripei (P, a, b) and (Q, c, d) that switch roles after each step.
  • a single step essentially consists of an arithmetic operation of the form
  • Numbers p or q to be determined can be chosen so that the
  • the algorithm uses the largest common divisor T of P and
  • the length of the long number register is at least 2n + x bits.
  • P and b are loaded into a long number register Z and Q and d into a long number register y and adjusted according to the separating x O bits:
  • both registers are shifted in parallel to the left until the leading bit of the Z register is set (this is necessary for the implementation on CCP / ACE).
  • the leading bit from P to Z is always set after initialization.
  • “Test the most significant bit of the Z register” means the most significant it of the Z register that can be tested.
  • the most significant bit of the Z register is the most significant set bit of P and Z and y are according to the separating one x O bits adjusted:
  • This processor has a mathematical coprocessor with a length of 1120 bits (ACE, Advanced Crypto Engine) or 560 bits (CCP, Crypto Coprocessor) and thus fulfills the necessary requirements for the implementation of the proposed algorithm. It is possible to use the maximum parameter sizes provided in standardization efforts (NIST, ANSI 512 bit). For the use of the commonly used parameter sizes (160-256 Bit), it is sufficient to operate the processor in the operating mode with the short register length.
  • ACE Advanced Crypto Engine
  • CCP Crypto Coprocessor

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

The aim of the invention is to enable to efficiently implement standard algorithms for the cryptography on processors having long number registers and limited computing capacity. Said cryptography is based on elliptic curves. The number field and the elliptic curve can be freely selected in such a way that said field and curve have to be advantageously read in only when a corresponding storage medium is personalised. The invention relates to the use of the extended, euclidian algorithm for detecting an inverse in the prime number field. Two numbers are successively stored in the long number registers of the respective processor. The described algorithm enables to obtain the results of two required operators in one calculating step and as a result calculation is accelerated. Further acceleration is obtained by externally storing the arithmetic unit of the long number arithmetic in the typically used processors. An arithmetic unit is formed by means of a separate register set. Reading in and out the operands into the separated arithmetic unit is time consuming. Half of the load cycles can be dropped by simultaneously processing two operands.

Description

Verfahren und Vorrichtungen zur Durchführung einer Inversion insbesondere bei der Verschlüsselung mittels elliptischer Kurven Methods and devices for performing an inversion, in particular in the case of encryption using elliptical curves
Gebiet der ErfindungField of the Invention
Die Erfindung betrifft das Gebiet der kryptographischen Verfahren und Vorrichtungen, und zwar Verfahren und Vorrichtungen, die die Durchführung einer speziellen Berechnung ermöglichen, nämlich einer Inversion im Primzahlkörper wie sie z.B. bei der Verschlüsselung mittels elliptischer Kurven benötigt wird.The invention relates to the field of cryptographic methods and devices, namely methods and devices which make it possible to carry out a special calculation, namely an inversion in the prime number field as e.g. is required for encryption using elliptic curves.
Hintergrund der ErfindungBackground of the Invention
Zur Verschlüsselung und Entschlüsselung von Informationen aller Art sind verschiedene mathematische Methoden bekannt, die den Bestandteilen einer z.B. aus Zahlen oder Buchstaben bestehenden Information Zahlen zuordnen und aus diesen Zahlen neue Zahlen berechnen, aus denen sich ohne Kenntnis einer Schlüsselzahl, kurz eines Schlüssels, die ursprüngliche Information nicht erhalten läßt.Various mathematical methods are known for encrypting and decrypting information of all kinds. Assign information from numbers or letters to numbers and calculate new numbers from these numbers, from which the original information cannot be obtained without knowing a key number, in short a key.
Diese mathematischen Verfahren lassen sich einteilien in symmetrische Verfahren, bei denen zur Entschlüsselung derselbe Schlüssel verwendet wird wie zur Verschlüsselung, und asymmetrische Verfahren, bei denen zur Entschlüsselung ein anderer Schlüssel verwendet wird als zur Verschlüsselung.These mathematical methods can be divided into symmetrical methods, in which the same key is used for decryption as for encryption, and asymmetrical methods, in which a different key is used for decryption than for encryption.
Soll eine verschlüsselte Information an einem anderen Ort als am Ort der Verschlüsselung entschlüsselt werden, soll also z.B. eine Information von einem Computersystem (Sender) zu einem anderen Computersystem (Empfänger) z.B. über das Internet übertragen werden, so muß bei den symmetrischen Verfahren demIf decrypted information is to be decrypted at a location other than the location of the encryption, e.g. information from one computer system (transmitter) to another computer system (receiver) e.g. transmitted over the Internet, the symmetrical method must be the
Empfänger auch der Schlüssel in irgendeiner Form übermittelt werden. Da die Gefahr besteht, daß der Schlüssel bei dieser Übermittlung abgefangen wird, gelten bei der Übertagung verschlüsselter Informationen die asymmetrischen Verfahren als sicherer. Bei einer Gruppe von auch als Public-Key-Kryptographie bekannten asymmetrischen Verfahren berechnen Sender und Empfänger aus einem öffentlichen Schlüssel G jeweils für sich einen privaten Schlüssel Gs bzw. GE und tauschen diese aus, wobei zur Verschlüsselung bzw. Entschlüsselung dann ein Schlüssel GSE verwendet wird. Selbst wenn dabei ein Dritter sowohl Gs als auch GE abfagen würde, könnte er aufgrund des sogenannten "Problems des diskreten Logarithmus" die mit dem Schlüssel GSE verschlüsselte Nachricht nicht entziffern.Recipients also receive the key in some form. As there is a risk that the key will be intercepted during this transmission, the asymmetrical methods are considered to be more secure when transmitting encrypted information. In a group of asymmetric methods also known as public key cryptography, the sender and receiver calculate and exchange a private key G s or G E for themselves from a public key G, and then exchange a key G for encryption or decryption SE is used. Even if a third party would query both G s and G E, he would not be able to decipher the message encrypted with the key G SE due to the so-called "problem of the discrete logarithm".
Asymmetrische Veschlüsselungsverfahren und Vorrichtungen zum Ausführen zumindest von Teilschritten bei der Verschlüsselung und Entschlüsselung mittels asymmetrischer Verfahren, insbesondere mittels elliptischer Kurven sind aus einer Vielzahl von Druckschriften bekannt, beispielsweise aus den Druckschriften US 5,159,632, US 5,271 ,061 , US 5,463,690, US 5,581 ,616, US 5,805,703, US 5,442,707, EP 0 892 520 A2, PCT/DE99/00278 und PCT/US99/12749, in welchen auch die mathematischen Grundlagen elliptischer Kurven und deren Anwendung in derAsymmetric encryption methods and devices for performing at least partial steps in the encryption and decryption using asymmetrical methods, in particular using elliptical curves, are known from a large number of publications, for example from US 5,159,632, US 5,271,061, US 5,463,690, US 5,581,616. US 5,805,703, US 5,442,707, EP 0 892 520 A2, PCT / DE99 / 00278 and PCT / US99 / 12749, in which also the mathematical foundations of elliptic curves and their application in
Kryptographie beschrieben wird und deren gesamter technischer Offenbarungsgehalt hiermit durch Zitierung voll umfänglich zum Bestandteil dieser Anmeldung gemacht wird.Cryptography is described and the entire technical disclosure content is hereby fully made part of this application by citation.
In den genannten Druckschriften werden auch die Vorteile und Nachteile der auf elliptischen Kurven basierenden Verschlüsselungstechniken gegenüber der zur Zeit noch am weitesten verbreiteten Art asymmetrischen Verschlüsselungstechniken hingewiesen, dem sog. RSA-Verfahren. Das RSA-Verfahren basiert auf dem Problem des Faktorisierens großer Zahlen. Zur Zeit erhältliche Smartcards verwenden diesen AlgorithmusThe cited documents also point out the advantages and disadvantages of the encryption techniques based on elliptic curves compared to the currently most widespread type of asymmetric encryption techniques, the so-called RSA method. The RSA method is based on the problem of factoring large numbers. Smart cards currently available use this algorithm
Dabei ist die wesentliche Operation beim RSA-Verfahren die Potentierung einer Zahl m in einem Zahlenkörper Zn, wobei n eine aus der Multiplikation zweier großer Primzahlen p und q entstandene Zahl ist, die als Binärzahl eine Bitlänge von typischerweise zwischen 1024 bis 2048 Bit besitzt, (p und q besitzen üblicherweiseThe essential operation in the RSA method is the potentiation of a number m in a number field Z n , where n is a number resulting from the multiplication of two large prime numbers p and q, which as a binary number typically has a bit length of between 1024 and 2048 bits, (p and q usually have
Bitlängen zwischen 512 und 1024 Bit). Implementierungen des RSA- Verfahrens auf Smartcards beschränken normalerweise n auf 1024 Bit. Anders als beim RSA-Verfahren sind bei kryptographischen Verfahren auf Basis elliptischer Kurven Divisionen im Primzahlkörper nötig. Stehen genügend Ressourcen zur Verfügung, ist die Ausführung solcher Divisionen mittels entsprechender Computerprogramme leicht realisierbar.Bit lengths between 512 and 1024 bits). Implementations of the RSA method on smart cards normally limit n to 1024 bits. In contrast to the RSA method, cryptographic methods based on elliptic curves require divisions in the prime number field. If sufficient resources are available, it is easy to implement such divisions using appropriate computer programs.
Nun besteht aber das Problem, daß bei vielen Anwendungsfällen, beispielsweise bei den genannten Smartcards, die zur Verfügung stehenden Prozessoren für die Anwendung des RSA-Verfahrens optimiert sind, was bedeutet, daß zwar sog. Langzahlregister zur Verfügung stehen, die es erlauben, sehr lange Zahlen zu handhaben, daß mit diesen Zahlen jedoch nur wenige arithmetische Funktionen ausgeführt werden können. Divisionen in Primzahlkörpern werden von den bekannten Prozessoren für Smartcards und dergleichen nicht unterstützt. Es ist zwar möglich, die Rechenleistung auch bei Smartcards zu erhöhen, jedochvergrößert dies die Chipfläche und erhöht die Kosten.Now there is the problem, however, that in many applications, for example in the aforementioned smart cards, the processors available are optimized for the use of the RSA method, which means that so-called long-number registers are available which allow them to be used for a very long time Handle numbers, but with these numbers only a few arithmetic functions can be performed. Divisions in prime number fields are not supported by the known processors for smart cards and the like. Although it is possible to increase the computing power even with smart cards, this increases the chip area and increases the costs.
Die bisherigen Realisierungen von auf elliptischen Kurven basierenden Verschlüsselungstechniken nutzen im wesentlichen die Standardbefehle des Prozessors und verwenden die Langzahlregister nur an wenigen Stellen und sind daher wenig effizient. Alle bekannte Implementationen auf Prozessoren von Smartcards (auch Smardcard-ICs genannt) und dergleichen beschleunigen dieThe previous implementations of encryption techniques based on elliptic curves essentially use the standard instructions of the processor and use the long number registers only in a few places and are therefore not very efficient. All known implementations on processors of smart cards (also called smart card ICs) and the like accelerate this
Rechenzeiten indem sie die zugrunde liegende Elliptische Kurve und / oder den Grundkörper festlegen. Damit ist es nicht möglich, z.B. mit einer Smartcard Operationen für Benutzergruppen mit verschiedenen Parametersätzen durchzuführen.Computing times by defining the underlying elliptic curve and / or the base body. It is not possible with this, e.g. carry out operations for user groups with different parameter sets with a smart card.
Aufgabe der Erfindung ist es daher zum einen, Verfahren und Vorrichtungen anzugeben, die es ermöglichen, Standardalgorithmen für die Kryptographie mit elliptischen Kurven auf den Prozessoren von Smartcards (auch Smaräcard-ICs genannt) mit Langzahl-Krypto-Koprozessoren effizient zu implementieren.The object of the invention is therefore on the one hand to provide methods and devices which make it possible to efficiently implement standard algorithms for cryptography with elliptic curves on the processors of smart cards (also called Smaraec ICs) with long-number crypto coprocessors.
Eine weitere Aufgabe ist es, Verfahren und Vorrichtungen anzugeben, bei denenAnother object is to specify methods and devices in which
Zahlenkörper und elliptische Kurve frei wählbar sind und erst beim Personalisieren eines entsprechenden Speichermediums, also z.B. einer Smartcard, z.B. in das EEPROM der Smartcard eingelesen werden. Zusammenfassung der ErfindungThe number field and elliptic curve can be freely selected and can only be read into the EEPROM of the smart card when a corresponding storage medium, for example a smart card, is personalized. Summary of the invention
Da eine allgemeine Division sich durch eine Inversion (1/x) und eine Multiplikation ersetzen lassen, genügt ein allgemein einsatzbares Verfahren für Inversionen im Primzahlkörper.Since a general division can be replaced by an inversion (1 / x) and a multiplication, a generally applicable method is sufficient for inversions in the prime number field.
Die Erfindung schlägt die Verwendung des erweiterten euklidischen Algorithmus zur Bestimmung einer Inversen im Primzahlkörper vor.The invention proposes the use of the extended Euclidean algorithm for determining an inverse in the prime number field.
Das Inverse eines Elementes q in Zp (bezeichnet mit q"1) ist eine Zahl so daß giltThe inverse of an element q in Z p (denoted by q "1 ) is a number so that it holds
q q"1 = 1 (mod p).qq "1 = 1 (mod p).
Hintergrund der neuen Lösung ist, daß kryptographische Verfahren auf Basis elliptischen Kurven mit geringeren Bitzahlen auskommen als RSA-Verfahren, so daß die bei bekannten Smartcard-ICs vorhandenen Register mehr als doppelt so lang sind als die für Berechnungen auf elliptischen Kurven eigentlich benötigten. Der Kern der Idee besteht nun darin, in den Langzahlregistern zwei Zahlen hintereinander zu speichern.The background to the new solution is that cryptographic methods based on elliptic curves require fewer bits than RSA methods, so that the registers available in known smart card ICs are more than twice as long as those actually required for calculations on elliptical curves. The essence of the idea is now to store two numbers in a row in the long number registers.
Für die Programmierung von auf elliptischen Kurven basierenden Verschlüsselungsalgorithmen (nachfolgend kurz ECC-Algorithmen genannt) auf Smartcards oder anderen Prozessoren mit beschränktem Leistungsumfang ist die Inversion einer Zahl modulo einer Primzahl notwendig, da ansonsten mehr Zwischenspeicher benötigt wird als auf diesen Prozessoren üblicherweise zurFor the programming of encryption algorithms based on elliptic curves (hereinafter referred to as ECC algorithms for short) on smart cards or other processors with a limited scope of functions, the inversion of a number modulo a prime number is necessary, since otherwise more buffers are required than are usually required on these processors
Verfügung steht.Available.
Diese Inversion wird mit Hilfe des erwweiterten Euklidischen Algorithmus durchgeführt. Es werden also für die Eingabe von zwei Zahlen a, b > 0 der Wert d = ggT(a.b) (ggT=größter gemeinsamer Teiler) sowie zwei Zahlen x und y mit d = x*a + y*b berechnet.This inversion is carried out using the extended Euclidean algorithm. For the input of two numbers a, b> 0, the value d = ggT (a.b) (ggT = largest common divisor) and two numbers x and y with d = x * a + y * b are calculated.
Die grundsätzliche Struktur ist wie folgt: a) Initialisiere A=a, B=b, x=0, y=1 b) Solange B>0 istThe basic structure is as follows: a) Initialize A = a, B = b, x = 0, y = 1 b) As long as B> 0
) Berechne q = A/B i) Berechne r = A mod B ii) Verändere x und y v) Berechne A und B neu) Calculate q = A / B i) Calculate r = A mod B ii) Change x and y v) Recalculate A and B
Erfindungsgemäß werden die Neuberechnung von A und die Berechnung von x zusammengefasst indem die beiden Werte in einem Register gespeichert werden (was dann notwendigerweise mindestens die doppelte Länge haben muß).According to the invention, the recalculation of A and the calculation of x are combined by storing the two values in a register (which then must necessarily be at least twice the length).
Der Vorteil bei dieser Vorgehensweise die beiden Berechnungen zusammen zu fassen liegt nicht nur in der Beschleunigung der Rechenzeiten. Vielmehr ist es so, das auf den verwendeten Prozessoren das Laden der Register mit den Operanden zum Teil mehr Zeit kostet als die eigentliche arithmetische Operation. Da hier durch die gleichzeitige Verarbeitung ein Ladezyklus entfällt ist der Algorithmus schon allein dadurch deutlich schneller. Prinzipiell sieht dazu der Algorithmus folgendermaßen aus:The advantage of using this approach to summarize the two calculations is not only the acceleration of the computing times. Rather, the processors used to load the registers with the operands sometimes take more time than the actual arithmetic operation. Since a loading cycle is omitted due to the simultaneous processing, the algorithm is therefore significantly faster. In principle, the algorithm looks like this:
Initialisiere X = P*2,+k + BP und Y = Q*2l+k + BQ Initialize X = P * 2 , + k + B P and Y = Q * 2 l + k + B Q
wobei X in einem Langzahlregister wie folgt eingeschrieben sein kann P (linksbündig), gefolgt von einer Anzahl freier Bits (Länge k), BP (rechtsbündig)where X can be written in a long number register as follows P (left-justified), followed by a number of free bits (length k), B P (right-justified)
Dementsprechend kann in einem anderen Langzahlregister wie folgt eingeschrieben sein: Q (linksbündig), frei (Länge k), BQ (rechtsbündig)Accordingly, another long number register can have the following inscriptions: Q (left-justified), free (length k), B Q (right-justified)
Der eigentliche Algorithmus arbeitet dann mit den Werten von X und Y, bearbeitet also P und BP bzw. Q und BQ gleichzeitig.The actual algorithm then works with the values of X and Y, ie processes P and B P or Q and B Q simultaneously.
Ein Teilschritt sorgt nun dafür, daß (im Falle der Bearbeitung von X) P auf den Rest der Division von P / Q gesetzt wird und (gleichzeitig) der Wert in BP entsprechend angepasst wird. Im Falle der Bearbeitung von Y wird entsprechend verfahren. Diese Berechnungen werden solange durchgeführt wie P und Q größer als Null sind. Ist man bei Null angelangt, so enthält BP bzw. BQ die gesuchte Inverse. Für eine effiziente Realisierung der Inversionen genügen bei diesen Verfahren im wesentlichen halb so viele doppelt so lange Register, die Anzahl der Speicherbits bleibt daher unverändert. Dieses neue Verfahren kommt mit einem Langzahlakkumulator und ohne wesentliche Unterstützung eines Host-Prozessors aus, da nur elementare Befehle für die Langzahlregister (addieren, shiften, Bit-Test und eine Möglichkeit zum Vergleichen, dies kann auch durch einen Bit-Test geschehen) benötigt werden und die Teiler mit Rest (P und Q) nicht zwischengespeichert werden müssen.A sub-step now ensures that (in the case of processing X) P is set to the rest of the division of P / Q and (at the same time) the value in B P is adjusted accordingly. If Y is processed, the same procedure is followed. These calculations are performed as long as P and Q are greater than zero. If one has reached zero, then B P or B Q contains the inverse sought. With these methods, essentially half as many twice as long registers are sufficient for efficient implementation of the inversions, and the number of memory bits therefore remains unchanged. This new method works with a long-number accumulator and without substantial support from a host processor, since only elementary commands for the long-number register (add, shift, bit test and a way of comparing, this can also be done by a bit test) are required and the dividers with remainder (P and Q) do not have to be buffered.
Das Verfahren beschreibt, wie eine bestimmte Klasse von kryptographischen auf speziellen Mikroprozessoren effizient implementiert werden können. Bei gleichen Sicherheitsanforderungen läßt sich damit die notwendige Rechenzeit auf Marktüblichen Prozessoren gegenüber den bekannten Verfahren erheblich reduzieren.The method describes how a certain class of cryptographic on special microprocessors can be implemented efficiently. With the same security requirements, the necessary computing time on commercially available processors can be considerably reduced compared to the known methods.
Der Algorithmus ist unabhängig von den speziellen Parametern welche derThe algorithm is independent of the special parameters which of the
Berechnung zugrunde liegen. Damit ist es z.B. bei der Implementierung auf Smartcards möglich, diese Parameter erst bei der sogenannte Personalisierung der Karte aufzuspielen (statt sie bereits bei der Herstellung des Mikroprozessors festzulegen).Underlying the calculation. So it is e.g. When implementing on smart cards, it is possible to load these parameters only when the card is personalized (instead of specifying them when the microprocessor is being manufactured).
Auf dem a\s Referenz dienenden Smartcard-Prozessor SLE66CxxS der Firma Infineon benötigt die Erstellung einer Digitalen Signatur ungefähr 500 Millisekunden bis zu einer Sekunde beim Einsatz des RSA-Algorithmus. Mit dem hier verwendeten Verfahren auf Basis Elliptischer Kurven beläuft sich die notwendige Zeit auf 100 bis 200 Millisekunden bei vergleichbarer Sicherheit. Dieser Geschwindigkeitsvorteil ergibt sich aus zwei Aspekten des Verfahrens:On the SLE66CxxS smart card processor from Infineon, which serves as a reference, the creation of a digital signature takes approximately 500 milliseconds to one second when using the RSA algorithm. With the method used here based on elliptic curves, the necessary time amounts to 100 to 200 milliseconds with comparable security. This speed advantage results from two aspects of the process:
Einerseit ist es durch den hier beschriebenen Algorithmus möglich, in einem Rechenschritt die Ergebnisse zweier notwendiger Operatoren zu erhalten; dies bedeutet auf jeden Fall eine Beschleunigung.On the one hand, the algorithm described here makes it possible to obtain the results of two necessary operators in one calculation step; this definitely means acceleration.
Zusätzlich ergibt sich durch die eine weitere Beschleunigung durch die folgende Tatsache: Typischerweise ist bei Smartcard-Prozessoren die Recheneinheit für die Langzahlarithmetik (der sogenannte mathematische Koprozessor) ausgelagert und bildet eine Recheneinheit mit einem separaten Registersatz. Eine Berechnung findet daher in mehreren Schritten statt:In addition, this results in a further acceleration due to the following fact: Typically in smart card processors, the arithmetic unit for the long number arithmetic (the so-called mathematical coprocessor) is outsourced and forms a computing unit with a separate register set. A calculation therefore takes place in several steps:
a) Die Register des Koprozessors werden mit den Operanden geladen b) Die eigentliche Berechnung wird auf dem Koprozessor durchgeführt c) Der Hauptprozessor liest die Ergebnisse aus den Registern des Koprozessorsa) The registers of the coprocessor are loaded with the operands b) The actual calculation is carried out on the coprocessor c) The main processor reads the results from the registers of the coprocessor
Da der Zeitaufwand für die Schritte a) und c) gegenüber der Zeit für die eigentliche Berechnung in Schritt b) relativ groß ist, ist also ein weiterer Zeitvorteil durch die simultane Berechnung von mehr als einem Wert gegeben.Since the time required for steps a) and c) is relatively large compared to the time for the actual calculation in step b), a further time advantage is given by the simultaneous calculation of more than one value.
Der vorgestellte Algorithmus ist eine Optimierung für den Fall, daß der Mikroprozessor Arithmetikroutinen für Zahlen mit einer Bitlänge zur Verfügung stellt welche echt größer als das Doppelte der Bitlänge der zu bearbeitenden Zahlen ist.The algorithm presented is an optimization in the event that the microprocessor provides arithmetic routines for numbers with a bit length which is really greater than twice the bit length of the numbers to be processed.
Kurze Beschreibung der ZeichnungBrief description of the drawing
Fig. 1 zeigt eine im Bereich der reellen Zahlen scheinbar aus zwei unzusammenhängenden Stücken bestehende elliptische Kurve und drei Punkte P,Q und R auf dieser Kurve.1 shows an elliptical curve apparently consisting of two unrelated pieces in the real number range and three points P, Q and R on this curve.
Beschreibung bevorzugter AusführungsformenDescription of preferred embodiments
Für die Programmierung von ECC-Algorithmen auf Smartcards (oder allgemeiner aufFor programming ECC algorithms on smart cards (or more generally on
Mikroprozessoren mit beschränktem Leistungsumfang) ist normalerweise die Inversion einer Zahl modulo einer Primzahl notwendig (da für eine alternative Methode zur Berechnung mehr Zwischenspeicher benötigt wird als auf diesen Prozessoren üblicherweise zur Verfügung steht). Hat man eine schnelle Inversion zur Verfügung, so ist das Gruppengesetz für Punkte auf elliptischen Kurven sehr einfach, es lautet für dieMicroprocessors with limited performance) normally require the inversion of a number modulo a prime number (since an alternative method of calculation requires more buffers than is usually available on these processors). If you have a fast inversion available, the group law for points on elliptic curves is very simple, it is for the
Operation auf der Kurve y2 = x3 + a*x + b:Operation on the curve y 2 = x 3 + a * x + b:
P + 0 = 0 + P = für alle P e £(ZP).P + 0 = 0 + P = for all P e £ (Z P ).
Für P = (x, y) e E(ZP) ist (x, y) + (x, -y) = O. (Der Punkt (x, -y) wird bezeichnet mit -P und wird als das Negative von P bezeichnet; zu beachten ist, daß -P tatsächlich ein Punkt auf der Kurve ist ).For P = (x, y) e E (Z P ) is (x, y) + (x, -y) = O. (The point (x, -y) is denoted with -P and is referred to as the negative of P; note that -P is actually a point on the curve).
Für P = ( ^) e E(ZP) und Q = (x2,y2) e E(ZP) mit P ≠ -Q berechnet sich P+Q = (x3,y3) durch x3 = λ2 - x, - x2 y3 = λ^ - xa) - ^,For P = (^) e E (Z P ) and Q = (x 2 , y 2 ) e E (Z P ) with P ≠ -Q, P + Q = (x 3 , y 3 ) is calculated by x 3 = λ 2 - x, - x 2 y 3 = λ ^ - xa) - ^,
wobeiin which
λ = (y2 - Yι) ^ (X2 - X1) falls P ungleich Q und λ = (3*x1 2 + a) / (2*y 1) falls P gleich Qλ = (y 2 - Yι) ^ (X2 - X1) if P is not Q and λ = (3 * x 1 2 + a) / (2 * y 1 ) if P is Q
Die Fig. 1 stellt diese Operationen graphisch dar.Figure 1 graphically illustrates these operations.
Die Inversion wird mit Hilfe des erweiterten Euklidischen Algorithmus durchgeführt, also einem Verfahren, welches für die Eingabe von 2 Zahlen a, b > 0 den Wert d = ggT(a.b) sowie 2 Zahlen x und y mit d = x*a + y*b berechnet.The inversion is carried out with the help of the extended Euclidean algorithm, i.e. a procedure which, for the input of 2 numbers a, b> 0, has the value d = ggT (ab) and 2 numbers x and y with d = x * a + y * b calculated.
Für die Anwendung bei der Inversion wird dies folgendermaßen verwendet: Man setzt das erste Argument (a) auf die Primzahl modulo derer man das zweite Argument (b) invertieren will; da der größte gemeinsame Teiler einer Primzahl mit einer beliebigen anderen Zahl (kleiner als diese Primzahl) immer 1 ist, hat man die folgende Identität:For the application in the inversion this is used as follows: The first argument (a) is set to the prime number modulo which one wants to invert the second argument (b); Since the greatest common divisor of a prime number with any other number (smaller than this prime number) is always 1, one has the following identity:
1 = ggT (a, p) = x*a + y*p = x*a (mod p)1 = ggT (a, p) = x * a + y * p = x * a (mod p)
wobei die letzte Gleicheit gilt da y*p mod p identisch 0 ist. Damit ist also gezeigt daß x = a _1 mod p gilt und daß x damit die gesuchte Inverse von a ist.the last equality applies since y * p mod p is identical to 0. This shows that x = a _1 mod p and that x is the inverse of a.
Der genaue Algorithmus dazu lautet in diesem Fall (Die erste Vertauschung der Rollen von a & p dient nur dazu daß ein ansonsten durchgeführter, zusätzlicher Schritt entfällt):In this case, the exact algorithm is as follows (the first swapping of the roles of a & p only serves to eliminate an additional step that would otherwise have been carried out):
Gegeben sind a, p in Z mit 0 < a < p, p ist eine Primzahl Gesucht ist x in Z, 0 < x < p mit x*a = 1 mod p a) Initialisiere A=p, B=a, x^ =1 , x2 =0Given a, p in Z with 0 <a <p, p is a prime number We are looking for x in Z, 0 <x <p with x * a = 1 mod p a) Initialize A = p, B = a, x ^ = 1, x 2 = 0
b) Solange B>0 ist: q = A/B r = A - q*B x0 = x2 - q*xn A = B B = r x2 = Xi
Figure imgf000010_0001
b) As long as B> 0: q = A / B r = A - q * B x 0 = x 2 - q * x n A = BB = rx 2 = Xi
Figure imgf000010_0001
c) Setze x = x0 c) Set x = x 0
Der Vorteil des neuen Algorithmus ist, daß die Neuberechnung von A und dieThe advantage of the new algorithm is that the recalculation of A and the
Berechnung von x zusammengefasst werden indem die beiden Werte in einem Register gespeichert werden (was dann notwendigerweise mindestens die doppelte Länge haben muß).Calculation of x can be summarized by storing the two values in a register (which then must necessarily be at least twice the length).
Der Vorteil bei dieser Vorgehensweise die beiden Berechnungen zusammen zu fassen liegt nicht nur in der Beschleunigung der Rechenzeiten. Vielmehr ist es so, das auf den verwendeten Prozessoren das Laden der Register mit den Operanden zum Teil mehr Zeit kostet als die eigentliche arithmetische Operation. Da hier durch die gleichzeitige Verarbeitung ein Ladezyklus entfällt ist der Algorithmus schon allein dadurch deutlich schneller.The advantage of using this approach to summarize the two calculations is not only the acceleration of the computing times. Rather, the processors used to load the registers with the operands sometimes take more time than the actual arithmetic operation. Since a loading cycle is omitted due to the simultaneous processing, the algorithm is therefore significantly faster.
Der zu implementierende Algorithmus sieht dann prinzipiell folgendermaßen aus:The algorithm to be implemented then looks in principle as follows:
Initialisiere T = A*2l+k + x2 sowie U = B*2,+k + ^Initialize T = A * 2 l + k + x 2 and U = B * 2 , + k + ^
Nachfolgend sollen die Rahmen die Registerlänge des verwendeten Prozessors verdeutlichen:The frames should clarify the register length of the processor used below:
Darstellung von T: A (linksbündig) frei (Länge k) x2 (rechtsbündig)Representation of T: A (left-justified) free (length k) x 2 (right-justified)
Darstellung von U:Representation of U:
B (linksbündig) : frei (Länge k) : ! (rechtsbündig)B (left-justified): free (length k) :! (Right-justified)
Der Algorithmus arbeitet dann mit den Werten von T und U, bearbeitet also A und B bzw. x2 und x-i gleichzeitig. Die Subtraktion V = T - q*U liefert dann die Ergebnisse für r & x0 in einem Schritt.The algorithm then works with the values of T and U, i.e. processes A and B or x 2 and xi simultaneously. The subtraction V = T - q * U then provides the results for r & x 0 in one step.
Solange B > 0: q = A/B V = T - q*U (V = (r, x0)) T = U U = VAs long as B> 0: q = A / BV = T - q * U (V = (r, x 0 )) T = UU = V
Wenn B < 0: Setze x = x2 If B <0: set x = x 2
Der Quotient q wird in der Praxis nicht wirklich ausgerechnet. Stattdessen werden sukzessive die maximal möglichen Vielfachen (mit einer Zweierpotenz) abgezogen. Bei der Subtraktion von X2 und dem jeweiligen Vielfachen von X-, pflanzt sich das Vorzeichenbit bei der üblichen Binärdarstellung der Operanden bis zur Darstellung von A fort.The quotient q is not really calculated in practice. Instead, the maximum possible multiples are successively subtracted (with a power of two). With the subtraction of X 2 and the respective multiple of X-, the sign bit propagates until the representation of A in the usual binary representation of the operands.
Dadurch, daß mit dieser Formulierung die Rechnungen deutlich schneller werden, ist man in der Lage, den Programmcode auf der Karte vollkommen unabhängig von den Kurvenparametern zu halten und kann somit diese erst zu einem späteren Zeitpunkt (z.B. bei der Personalisierung der Karte) in das' EEPROM laden.Because the calculations are significantly faster with this formulation, you are able to keep the program code on the card completely independent of the curve parameters and can therefore only enter them into the ' at a later point in time (e.g. when personalizing the card) . Load EEPROM.
Kurze Beschreibung des euklidischen AlgorithmusBrief description of the Euclidean algorithm
Der Algorithmus berechnet von zwei Elementen P und Q den größten gemeinsamen Teiler D = gcd(P,Q) (gcd = greatest commσn divisor = ggT = größter gemeinsamer Teiler) und in der erweiterten Form zusätzlich zwei Elemente AP und BQ mitThe algorithm calculates the largest common of two elements P and Q Divider D = gcd (P, Q) (gcd = greatest common divisor = ggT = greatest common divisor) and in the extended form two elements A P and B Q with
AP P + BQ Q = D (1)A P P + B Q Q = D (1)
Benötigt wird der euklidische Algorithmus vorwiegend zur Berechnung einer Inversen. Dazu sei P ein Primelement, der größte gemeinsame Teiler ist also das 1 -Element, und gesucht wird BQ mitThe Euclidean algorithm is mainly required to calculate an inverse. Let P be a prime element, so the greatest common divisor is the 1 element, and B Q is also searched for
BQ Q = 1 mod P. (2)B Q Q = 1 mod P. (2)
Beschrieben wird zunächst der allgemeine Ablauf des Algorithmus in einer symmetrischen Form; der Grund dafür wird nachgeliefert. Es werden zwei weitere Elemente A Q und B P verwendet, beim Strat finden die folgenden Initialisierungen statt:The general procedure of the algorithm is first described in a symmetrical form; the reason for this will be added. Two further elements A Q and B P are used, with the Strat the following initializations take place:
P'=P Q'=Q
Figure imgf000012_0001
P '= P Q' = Q
Figure imgf000012_0001
Ap=BP=0 (3)Ap = B P = 0 (3)
Der Algorithmus besteht aus Schritten der FormThe algorithm consists of steps of the form
Teil a: Bestimme vier Elemente pP, , pQ, qQ mit gcd(pp P'+qp Q',pQ P'+qQ Q')=DPart a: Determine four elements p P ,, p Q , q Q with gcd (pp P '+ qp Q', p Q P '+ q Q Q') = D
Teil b: Berechne neue Zwischenwerte
Figure imgf000012_0002
Part b: Calculate new intermediate values
Figure imgf000012_0002
Q':=pQ P'+qQ Q' P':=temp
Figure imgf000012_0003
Q ': = p Q P' + q Q Q 'P': = temp
Figure imgf000012_0003
AQ:=pPAQ+qpApA Q : = p P A Q + qpAp
AP:=temp temp:=pQ Bp+qQ BQ
Figure imgf000013_0001
BQ:=temp (4)
A P : = temp temp: = p Q Bp + q Q B Q
Figure imgf000013_0001
B Q : = temp (4)
Wodurch sichergestellt ist, daß die folgenden Gleichungen erfüllt sind:This ensures that the following equations are satisfied:
AQP+BPQ=P' APP+BQQ=Q' (5)A Q P + B P Q = P 'A P P + B Q Q = Q' (5)
Die symmetrische Formulierung macht deutlich (dies ist der Grund für ihre Verwendung), wie sich Zwischenschritte zusammenfassen lassen. Gilt:The symmetrical wording makes it clear (this is the reason for its use) how intermediate steps can be summarized. applies:
D=gcd (P',Q')
Figure imgf000013_0002
P":=pPP'+QPQ' Q"":=pQP'+qQQ' sowie
D = gcd (P ', Q')
Figure imgf000013_0002
P ": = p P P '+ Q P Q'Q"": = p Q P '+ q Q Q' as well
Figure imgf000013_0003
Pm:=pPP"+q'pQ"
Figure imgf000013_0003
P m : = p P P "+ q'pQ"
Q'":=p'QP"+q'QQ" (6) dann lassen sich die beiden Schritte zusammenfassen:Q '": = p' Q P" + q ' Q Q "(6) then the two steps can be summarized:
P'"=(p, PPp+q,pPQ)'P'+(p'pqp+qVqQ)Q'P '"= (p , P Pp + q , pPQ) ' P ' + (p'pqp + qVqQ) Q'
PP,< qp.gPP, <qp.g.
Q"-(p'QP +q'QPQ) '+(p,Q' p+q,Q)Q'Q "- (p'QP + q'QPQ) '+ (p , Q ' p + q , Q) Q '
PQ,g qo,gP Q , g qo, g
Die Berechnung der Vorfaktoren kann man natürlich genauso zusammenfassen: GeltenThe calculation of the pre-factors can of course be summarized in the same way: Apply
Figure imgf000013_0004
Q'=AP P+BQ Q
Figure imgf000013_0004
Q '= A P P + B Q Q
und wirdand will
Figure imgf000014_0001
Figure imgf000014_0001
gesetzt, so gilt auchalso applies
P" -AQ,g P+Bp,g Q Q'" =APιg P+BQιg Q.P "-A Q, g P + Bp , g Q Q '" = A Pιg P + B Qιg Q.
Offensichtlich beeinflussen sich die Faktoren (A für P und b für Q) nicht gegenseitig und die Schritte für ihre Berechnung sind immer völlig analog zu denen von P' und Q'.Obviously, the factors (A for P and b for Q) do not influence each other and the steps for their calculation are always completely analogous to those of P 'and Q'.
Dies heißt zum einen, daß das Inverse Q" mod P unabhängig von A berechnet werden kann und zum anderen, daß die Schritte zum aktualisieren von BP parallel zu denen von P' sind:This means on the one hand that the inverse Q " mod P can be calculated independently of A and on the other hand that the steps for updating B P are parallel to those of P ':
P'neu=pP P'+qP Q'
Figure imgf000014_0002
P ' new = p P P' + q P Q '
Figure imgf000014_0002
und die Berechnung von BQ parallel zu der von Q'and the calculation of BQ parallel to that of Q '
Figure imgf000014_0003
Figure imgf000014_0003
ist.is.
Der Algorithmus endet wegen gcd (P,Q)=gcd(P',Q'), wenn P' oder/und Q' den Wert des größten gemeinsamen Teilers von P und Q annimmt. In diesenm Fall sind entweder die beiden Werte P' und Q' gleich, ocer einer von ihnen ist 0; diese Fälle kennzeichnen das Ende des Algorithmus. 14 -The algorithm ends because gcd (P, Q) = gcd (P ', Q') if P 'or / and Q' takes the value of the greatest common divisor of P and Q. In this case either the two values P 'and Q' are the same, or one of them is 0; these cases mark the end of the algorithm. 14 -
Für die Berechnung der Inversen werden, wenn P das Primelement ist, nur die Werte B Q und B P mitgeführt. Der Algorithmus endet dann, wenn einer der Werte, P' oder Q', das 1-Element ist.If P is the prime element, only the values B Q and B P are included in the calculation of the inverses. The algorithm ends when one of the values, P 'or Q', is the 1 element.
Der beschribene Algorithmus läßt sich weiter verallgemeinern, statt Multiplikationen (mit pP, pQ, qP, qQ ) sind auch Divisionen möglich.The algorithm described can be further generalized, instead of multiplications (with p P , p Q , q P , q Q ) divisions are also possible.
Prinzipielle Umsetzung des euklidischen AlgorithmusBasic implementation of the Euclidean algorithm
Die übliche Formulierung des euklidischen Algorithmus beruht auf einer Division mit Rest. In jedem Teilschritt wird eine der beiden folgenden Operationen ausgeführt:The usual formulation of the Euclidean algorithm is based on division by remainder. In each sub-step, one of the following two operations is carried out:
PP=qQ=1 ; pQ=0P P = q Q = 1; p Q = 0
Figure imgf000015_0001
Figure imgf000015_0001
oder pP=qQ=1 ; qP=0or p P = q Q = 1; q P = 0
PP
Figure imgf000015_0002
Figure imgf000015_0002
wobei elementar nachzurechnen ist, daß gcd(P'neu, Q'πeu)=gcd(P',Q') ist.where it is elementary to calculate that gcd (P ' new , Q' πeu ) = gcd (P ', Q').
Letzteres gilt offensichtlich auch etwas allgemeiner:The latter obviously also applies somewhat more generally:
gcd(a.b) = gcd (a+p'b,b) (10)gcd (ab) = gcd (a + p ' b, b) (10)
In der Konkreten Umsetzung ist netürlich eine echte Division mit Langzahlen nicht praktikabel, es sind effizientere Vorgehensweisen nötig. Die genaue Umsetzung hängt davei von der konkreten Darstellung der Elemente im Computer ab. Mit der üblichen Binärdarstellung und einer damit konsistenten Ordnungsrelation reichen die führenden Bits von P' und Q' zur (evt. Angenäherten) Stimmung der Faktoren p bzw. q des üblichen euklidischen Algorithmus. Diese (meist „kleinen") Faktoren kann man über mehrere Schritte zusammenfassen, bevor man mit der vollständigen Langzahl multiplizieren muß.In the concrete implementation, a real division with long numbers is of course not practical, more efficient procedures are necessary. The exact implementation depends on the concrete representation of the elements on the computer. With the usual binary representation and a consistent order relation, the leading ones are sufficient Bits of P 'and Q' for (possibly approximated) tuning of the factors p and q of the usual Euclidean algorithm. These (mostly "small") factors can be summarized in several steps before you have to multiply by the complete long number.
Man kann auch vollständig auf echte Multiplikationen mit Langzahlen verzichten und nur vergleichsweise günstige Shift-Operationen verwenden (binäre Verfahren). Diese laufen darauf hinaus, Divisionen und Multiplikationen implizit durchzuführen.You can also do without real multiplications by long numbers and only use comparatively cheap shift operations (binary methods). These amount to implicitly performing divisions and multiplications.
Da in jedem Fall eine konkrete Darstellung der Zahl eine Rolle spielt, wird im weiteren einer der beiden FälleSince a concrete representation of the number plays a role in each case, one of the two cases will be discussed below
' Prim∑ahlarithmetik ' Primary arithmetic
Polynomarithmetik (Charakteristik 2 Arithmetik) zugrundeglegt. Based on polynomial arithmetic (characteristic 2 arithmetic).
Effiziente Umsetzung der Inversion im Primzahlkörper mit LangzahlregisternEfficient implementation of inversion in the prime number field with long number registers
Stehen Register mit mehr als der doppelten Länge einer Langzahl zur Verfügung, läßt sich die binäre Methode mit geringen Anforderungen an die Hardware realisieren. Beschrieben wird eine INversion für Primzahlarithmetik, die gleiche technik funktioniert aber auch für Charakteristik 2. Die Realisierung ist algorithmisch äquivalent zum üblichen erweiterten euklidischen Algorithmus.If registers with more than twice the length of a long number are available, the binary method can be implemented with low hardware requirements. An INversion for prime number arithmetic is described, but the same technique also works for characteristic 2. The implementation is algorithmically equivalent to the usual extended Euclidean algorithm.
Als konkretes Modell für die zugrundegelegte Hardware dient die „advanced crypto engine (ACE)" der Sienens/Infineon „ALE66CX... "-Smartcard-Prozessorfamilie.The "advanced crypto engine (ACE)" of the Sienens / Infineon "ALE66CX ..." smartcard processor family serves as a concrete model for the underlying hardware.
Grundsätze des VerfahrensPrinciples of the procedure
Gegeben sind zwei Register N und Z mit fester Bitlänge 2.l+k, zwei binärcodierte Zahlen P(=P') und Q(=Q'), wobei P eine Primzahl ist und Q < P (=nur im Fall vonThere are two registers N and Z with a fixed bit length 2.l + k, two binary-coded numbers P (= P ') and Q (= Q'), where P is a prime number and Q <P (= only in the case of
Polynomarithmetik) sowie zwei Zahlen BP und BQ, initialisiert mit BP=0 bzw. BQ=1. Alle Zahlen werden mit I Bit dargestellt und sind gegebenenfalls mit fürhenden Nullen versehen. Im realisierten euklidischen Algorithmus wird die Division mit Rest nicht direkt durchgeführt sondern durch einzelne Schritte der Form P=P-2s Q(falls P 2S Q ist), (11)Polynomial arithmetic) and two numbers B P and B Q , initialized with B P = 0 and B Q = 1, respectively. All numbers are represented with I bits and may have leading zeros. In the implemented Euclidean algorithm, the division with remainder is not carried out directly, but through individual steps of the form P = P-2 s Q (if P 2 S Q), (11)
wobei s bis 0 heruntergezählt wird. Zum Schluß (es gilt dann P < Q) ist P der Rest der Division. Zum Start des Algorithmus wird
Figure imgf000017_0001
N=Q'2l+k+BQ (12)
where s is counted down to 0. In the end (then P <Q) P is the rest of the division. At the start of the algorithm
Figure imgf000017_0001
N = Q ' 2 l + k + B Q (12)
gesetzt; da alle Zahlen mit max I Bits dargestellt werden (natürlich muß die Anzahl der Trennbits k > 0 sein), findet keine (wesentliche) Beeinflussung zwischen P und Q auf der einen und BP und BQ auf der anderen Seite statt. Für den Ablauf des Algorithmus merkt man sich die aktuelle Bitzahl n der Darstellung von P, ebenso wird mit Q bzw. m verfahren. Ein Teilschritt läuft nach folgendem Muster ab:set; since all numbers are represented with max I bits (of course the number of separating bits must be k> 0), there is no (significant) influence between P and Q on the one hand and B P and B Q on the other. The current number of bits n of the representation of P is noted for the execution of the algorithm, and the same procedure is used with Q or m. A sub-step follows the following pattern:
s=n-m; while (s > 0)s = n-m; while (s> 0)
{ n_temp = n; temp = N; s=s - 1 ; shift (temp.s); // das höchstwertige -Bit von Z ist um 1 größer{n_temp = n; temp = N; s = s - 1; shift (temp.s); // the most significant bit of Z is 1 larger
Z=Z - temp; // als das von temp; Z = Z - N2Λs bestimmte n neu if (n emp ==n)Z = Z - temp; // as that of temp; Z = Z - N2 Λ s determined n new if (n emp == n)
{{
Z = Z-temp; // falls die Bitlänge von z unverändert warZ = Z temp; // if the bit length of z was unchanged
} // kann temp nachmal abgezogen werden bestimmte n neu // nun ist Z um mindestens 1 Bit kürzer s=n-m;} // can be subtracted temp afterwards certain n new // now Z is at least 1 bit shorter s = n-m;
} if (Z>N) // Möglich falls Z und N gleiche Bitlänge} if (Z> N) // Possible if Z and N have the same bit length
{ // haben. Dies kann auch so durchgeführt{ // to have. This can also be done that way
Z = Z - N; // werden, daß erst die Subtraktion durch- //geführt wird, auf Vorzeichen getestet 52051Z = Z - N; // that the subtraction is carried out // is tested for signs 52051
- 17 -- 17 -
bestimme n neu // wird und evt. Die Subtraktion rückgängigdetermine new // will and possibly the subtraction undo
// gemacht wird// is done
Nach jedem Teilschritt tauschen Z und N ihre Rolle; das ganze wiederholt sich, bis die Inverse von Q bestimmt ist. Für den Ablauf des Algorithmus genügen die Grundrechenarten ( + und -, Shift-Operationen sowie die Möglichkeit, das führende Bit von Z zu testen).After each step, Z and N swap roles; the whole thing repeats itself until the inverse of Q is determined. The basic arithmetic operations (+ and -, shift operations and the possibility of testing the leading bit of Z) are sufficient for the algorithm to run.
Eine konkrete UmsetzungA concrete implementation
Für die konkrete Umsetzung wird eine Darstellung der Zahlen im Zweierkomplement vorausgesetzt, das führende (Negativ-)Bit muß man testen können; der Überlauf eine Addition wird am gesetzten Negativbit erkannt.For the concrete implementation, a representation of the numbers in two's complement is required, the leading (negative) bit must be able to be tested; the overflow of an addition is recognized by the set negative bit.
Zum Start des Algorithmus sein die führenden I > 2 Bits von Z mit P -P gefüllt, dann folgen k-viele Null-Bits und dann BP. Im N-Register ist analog in den ersten Bits Q' = Q und in den letzten Bits BQ gespeichert. Zwei Zählvariablen m und n geben die Länge von P und Q in Bit an, es muß I > n > m ( sowie n>2) gelten. Die Ausgangsposition ist also folgendermaßen:At the start of the algorithm, the leading I> 2 bits of Z are filled with P -P, followed by k-many zero bits and then B P. In the N register, Q '= Q is analogously stored in the first bits and B Q in the last bits. Two counting variables m and n indicate the length of P and Q in bits, I>n> m (as well as n> 2) must apply. The starting position is as follows:
))
Figure imgf000018_0001
Figure imgf000018_0001
wobei 0,1 und die Kleinbuchstaben p bzw. q einzelne Bits darstellen.where 0.1 and the lower case letters p and q represent individual bits.
In einem ersten Schritt werden die Register justiert:In a first step, the registers are adjusted:
Figure imgf000018_0002
18 - i i I n Bits k Bits Bits
Figure imgf000018_0002
18 - ii I n bits k bits bits
Figure imgf000019_0001
m Bits
Figure imgf000019_0001
m bits
wesentlich ist hierbei die Differenz zwischen n und m. Konkret heißt dies, daß eine Subtraktion (Z=Z-N) für P' und BP folgende Bedeutung hat:the difference between n and m is essential. Specifically, this means that a subtraction (Z = ZN) for P 'and B P has the following meaning:
p,_p,_2n-mQ,p, _p, _ 2 nm Q ,
Figure imgf000019_0002
Figure imgf000019_0002
hierbei sei zunächst vorausgesetzt, daß n - m - 1 > 0 ist. Da im Algorithmus außer Shift-Operationen nur Subtraktionen und Additionen durchgeführt werden und dasit is assumed that n - m - 1> 0. Since only subtractions and additions are carried out in the algorithm apart from shift operations, and that
Shiften im Wesentlichen nur der Justierung von P' und Q' auf die High-Bits der Register Z und N dient (es werden kein O-Bits nachgeschoben, stattdessen wird die Bitlänge kleiner), sind (15) die einzigen echten arithmetischen Operationen.Shifting essentially only the adjustment of P 'and Q' to the high bits of registers Z and N (no O bits are added, instead the bit length becomes smaller) are (15) the only real arithmetic operations.
Im Laufe des Teilschritts wird das führende Bit von Z durch Operationen der Form (15) zu 0 und das Z-Register um 1 Bit nach links geshiftet; ob danach das führende Bit von Z gleich 1 ist, weiß man nicht im voraus. Aus diesem Grund wird die Subtraktion in der FormIn the course of the substep, the leading bit from Z is shifted to 0 by operations of the form (15) and the Z register is shifted to the left by 1 bit; It is not known in advance whether the leading bit of Z is 1. Because of this, the subtraction is in the form
if (Negativflag gesetzt)if (negative flag set)
{{
Z=Z-N;Z = Z N;
} if (Negativflag gesetzt) {} if (negative flag set) {
Z = Z - N;Z = Z - N;
} durchgeführt; solange das führende Bit gesetzt ist, ist Z > N sichergestellt. Bietet die Hardware einen einfachen Mechanismus zum Größenvergleich, ist es sinnvoller mit einem um 1 nach links geshifteten N zu arbeiten. In diesem Fall bietet sich} carried out; as long as the leading bit is set, Z> N is ensured. If the hardware offers a simple mechanism for size comparison, it makes more sense to work with an N shifted to the left. In this case it is a good idea
if (Z>N)if (Z> N)
{{
Z=Z-N;Z = Z N;
} an. Versucht man das gleiche ohne die Operation (Z>N) zur Verfügung zu haben, kann man auf folgendes Codefragment zurückgreifen:} on. If you try the same thing without having the operation (Z> N) available, you can use the following code fragment:
if (Negativflag gesetzt) // Falls nicht, ist in jedem Fall { // Z<Nif (negative flag set) // If not, then in any case {// Z <N
Z=Z-N;Z = Z N;
if (Negativflag gesetzt) / Falls ein Überlauf stattgefundenif (negative flag set) / If an overflow has occurred
{ // hat, ist das Negativflag gesetzt{// has set the negative flag
Z=Z+N/2 // und die Subtraktion muß rückgängig // gemacht werden.Z = Z + N / 2 // and the subtraction must be undone //.
Dies ist gleichwertig mit dem ersten Codefragment (wo das führende Bit von N=0 ist).This is equivalent to the first code fragment (where the leading bit of N = 0).
Nach der Subtraktion ist das führende Bit sicher gelöscht, der Inhalt der Register sieht nun folgendermaßen aus:After subtraction, the leading bit is safely deleted, the contents of the registers now look like this:
Z=(u,p p,p,p,1 1,1,1 b P , b P ) n Bits k Bits I BitsZ = (u, p p, p, p, 1 1,1,1 b P, b P) n bits k bits I bits
Figure imgf000020_0001
Figure imgf000020_0001
wobei sich BP eine 1 von P' borgt, die Bits-Darstellung von P' in Z ist also die von P'-1. ln jedem Fall ist die Länge von P' (wobei führende O-Bits nicht gezählt werden) nun höchstens noch n-1. Abhängig vom Wert in N (genauer, falls n - 1 > m) wird nun:where B P borrows a 1 from P ', so the bits representation of P' in Z is that of P'-1. In any case, the length of P '(not counting leading O bits) is now at most n-1. Depending on the value in N (more precisely, if n - 1> m):
shiftJeft Z.U; n=n-1 ;shiftJeft Z.U; n = n-1;
was zuwhat to
Z=(p,...,p,p,p,1 ,...,1 ,1 ,1 bP,bP) nneu=na(r1 Bits k Bits I BitsZ = (p, ..., p, p, p, 1, ..., 1, 1, 1 b P , b P ) n new = n a (r 1 bits k bits I bits
führt (das führende Bit von Z kann dabei durchaus 0 sein), durchgeführt und die Subtraktion wiederholt sich. Ist dagegen n=m, kann immer noch Z>N gelten, daher wird zum Abschluß des Teilschritts:leads (the leading bit of Z can be 0), and the subtraction is repeated. If, however, n = m, Z> N can still apply, so at the end of the substep:
Z=Z-N; if (Negativflag gesetzt) //Falls ein Überlauf aufgetreten ist,Z = Z N; if (negative flag set) // If an overflow has occurred,
{{
Z=Z+N; // mache die Subtraktion rückgängig } durchgeführt. War bereits ganz zu Anfang n=m, so darf nur der gerade geschilderte Abschluß durchgeführt werden. Insgesamt ergibt sich für den Teilschritt, der die wesentliche Arbeit verrichtet, folgender Pseudocode:Z = Z + N; // undo the subtraction}. If n = m at the very beginning, only the conclusion just described may be carried out. Overall, the following pseudocode results for the sub-step that does the essential work:
Teilschritt // high-Bit von Z gelöscht,Substep // high bit deleted from Z,
// second-high-Bit von Z gesetzt; // high-Bit von N gelöscht, // second-high-Bit von N gesetzt for (s=n-m-1 ; s>=0; s=s-1 ) { shiftjeft Z, 1 ; n=n-1 ; if (Negativflag gesetzt)// second high bit set by Z; // high bit deleted from N, // second high bit set from N for (s = n-m-1; s> = 0; s = s-1) {shiftjeft Z, 1; n = n-1; if (negative flag set)
{ - 21{ - 21
Z=Z-N;Z = Z N;
} if (Negativflag gesetzt)} if (negative flag set)
{ Z=Z-N;{Z = Z-N;
} }}}
Z=Z-N; if (Negativflag gesetzt) {Z = Z N; if (negative flag set) {
Z=Z+N; }Z = Z + N; }
Die anderen Teilschritte sind, bis auf den Abschluß unproblematisch.The other sub-steps are unproblematic except for the conclusion.
Justiere__Z while ((Negativflag ungesetzt)&&(n>=2))Adjust__Z while ((negative flag not set) && (n> = 2))
{ shiftjβf z.1 ; n=n-1 ;{shiftjβf z.1; n = n-1;
} shift_right Z,1; n=n+1 ;} shift_right Z, 1; n = n + 1;
Tausche_Z_mit_NTausche_Z_mit_N
Z=Z+N; N=Z-N; Z=Z-N; m=m+n; n=m-n; m=m-n;Z = Z + N; N = Z-N; Z = Z N; m = m + n; n = m-n; m = m-n;
Initialisierung // Es muß Z=P*2Λ(l+k)+0 // und N=Q*2Λ(l+k)+1 sein Justiere_Z Tausche_Z_mit_N Justiere_ZInitialization // Z = P * 2 Λ (l + k) +0 // and N = Q * 2 Λ (l + k) +1 be Justiere_Z Swap_Z_mit_N Justiere_Z
Der Gesamtablauf wird dann durch den folgenden Pseudocode beschriebenThe overall process is then described by the following pseudocode
Inversionsroutineinversion routine
Initialisierung while ((n>2) && (m>2))Initialization while ((n> 2) && (m> 2))
{{
Teilschritt; justiere Z; Tausche_Z_mit_N }Partial step; adjust Z; Swap_Z_with_N}
AbschlußGraduation
Für den noch fehlenden Abschluß ist unter vernünftigen Bedingungen sichergestellt, daß im N-Register noch genau 2 Bits von Q' sind, von denen das erst 0 ist, also muß Q' <1 sein. Im Z-Register sind noch mehr als 2 Bits, das führende Bit ist ebenfalls 0 und das Darauffolgende 1 , also insbesondere P'>1. Da bekannt ist, daß 1 der größte gemeinsame Teiler von P und Q ist, muß Q -1 gelten. Im Wesentlichen kann der Pseudocode Teilschritt also nochmal ausgeführt werden, um auch P' auf 1 zu bringen. Nun ist eine der Zahlen BP oder BQ positiv, dies ist die gesuchte Inverse zu Q mod P.For the still missing completion it is ensured under reasonable conditions that there are exactly 2 bits of Q 'in the N register, of which this is only 0, so Q' must be <1. There are more than 2 bits in the Z register, the leading bit is also 0 and the following 1, in particular P '> 1. Since it is known that 1 is the greatest common divisor of P and Q, Q -1 must hold. Essentially, the pseudocode substep can therefore be carried out again in order to also bring P 'to 1. Now one of the numbers B P or B Q is positive, this is the inverse to Q mod P.
Abschluß // high-Bit von Z gelöscht,Termination // high bit of Z deleted,
//second-high-Bit von Z gesetzt; // high-bit von N gelöscht, // second-high-Bit von N gesetzt for (s=n-m-1 ; s>=0; s=s-1 )// second high bit set by Z; // high bit deleted from N, // second high bit set from N for (s = n-m-1; s> = 0; s = s-1)
{ shiftJeft Z, 1 ; n=n-1 ; if (Negativflag gesetzt) Z=Z-N;{shiftJeft Z, 1; n = n-1; if (negative flag set) Z = ZN;
} if (Negativflag gesetzt)} if (negative flag set)
{{
Z=Z-N;Z = Z N;
}}
} shiftjeft Z,2; //teste Trennbit if (Negativflag gesetzt) //B_P ist negativ} shiftjeft Z, 2; // test separating bit if (negative flag set) // B_P is negative
{{
Tausche_Z_mit_N shiftjeft Z, 2;Swap_Z_with_N shift book Z, 2;
} shiftjeft Z, k;} shiftjeft Z, k;
Es bleiben nun noch einige Dinge, die einer genaueren Betrachtung bedürfen.There are still a few things that need to be looked at more closely.
Korrektheitcorrectness
Zunächst muß sichergestellt werden, daß der Algorithmus mit "sinnvollen" Startwerden gefüttert wird. Dies bedeutet, daß P> 2 eine Primzahl ist und Q>1 sein muß.First, it must be ensured that the algorithm is fed with "reasonable" starts. This means that P> 2 is a prime number and Q> 1 must be.
Da sich BP eine 1 von P' borgt, ist die Bit-Darstellung von P', also die ersten n Bits des Z-Registers, in Wirklichkeit die von P'-1. Die Differenz zwischen P' und Q' ist aber bis zum Abschluß größer als der größte gemeinsame Teiler, also mindestens 2. Das Vorzeichen von P'-Q' bzw. Q'-P' wird von diesem "Fehler" damit nicht beeinflußt.Since B P borrows a 1 from P ', the bit representation of P', i.e. the first n bits of the Z register, is actually that of P'-1. However, the difference between P 'and Q' is greater than the largest common divisor, at least 2, until the conclusion. The sign of P'-Q 'or Q'-P' is not affected by this "error".
Eine zweite Folge des "Bit borgens" ist die Bitlänge von P'. Wäre der korrekte Wert eine Zweierpotenz (2π'1), so ist die tatsächliche Bitdarstellung 2n"1-1 , die Bitlänge derA second consequence of the "bit borrow" is the bit length of P '. If the correct value were a power of two (2 π'1 ), the actual bit representation is 2 n "1 -1, the bit length of the
Zahl also um 1 kürzer. Ist die um 1 zu kleine Zahl in Q', so führt dies aber nur dazu, daß die for-Schleife von Teilschritt einen Schleifendurchgang (den ersten) mehr durchführt als nötig. Ist nach anschließenden Tausche_Z_mit_N die um 1 verminderte Zahl im Z-Register wird in Teilschritt der Schleifendurchgang "wegoptimiert". Die eigentliche Rechnung wird, wie nicht anders zu erwarten, durch das "Bit borgen" auch nicht verfälscht, da sie auf die Register als Ganzes zurückgeführt wird:So the number is shorter by 1. If the number in Q 'is too small by 1, this only means that the for loop of partial step performs one loop pass (the first) more than necessary. If, after the subsequent exchange_Z_mit_N, the number in the Z register reduced by 1, the loop passage is "optimized" in partial step. As expected, the actual calculation is not falsified by the "borrow bit", since it is traced back to the register as a whole:
-,1+ . ,1+k l+k .-, 1 +. , 1 + k l + k.
((P,-1)-2,+κ+(2,+κ-(-BP))HQ"2'^+BQ))'2((P , -1) -2 , + κ + (2 , + κ - (- B P )) HQ "2 '^ + B Q )) ' 2
=((P'-Q"2S-1 Y21 +(2 ,+k-(-BP)-BQ-2s))= ((P'-Q "2 S -1 Y2 1 + (2 , + k - (- B P ) -B Q -2 s ))
(Q-2l+k+BQ))-((P,-1 )'2l+k+(2l+k-(-BP)))-2s (Q-2 l + k + B Q )) - ((P , -1) ' 2 l + k + (2 l + k - (- B P ))) - 2 s
=((Q'-P-2s)-2l+k+(BQ+(-Bp)-2s))= ((Q'-P-2 s ) -2 l + k + (B Q + (- Bp) -2 s ))
wobei P',Q', -BP, BQ 0 sind.where P ', Q', -B P , B Q 0.
Insgesamt ist daher klar, daß die um 1 verminderte Bitdarstellung sich nicht fehlerhaft auf den euklidischen Algorithmus auswirkt. Außerdem ist klar, daß BQ und -BP immer positiv sind.Overall, it is therefore clear that the bit representation reduced by 1 does not have an incorrect effect on the Euclidean algorithm. It is also clear that B Q and -B P are always positive.
Bleibt (zumindest im Prinzip) als letztes noch die Frage, ob eine der Zahlen BP BQ länger als I Bits (genauer: größer als P) werden kann. Für den euklidischenThe last question (at least in principle) is whether one of the numbers B P B Q can be longer than I bits (more precisely: greater than P). For the Euclidean
Algorithmus besteht diese Gefahr jedoch nicht, vgl. etwa "Knuth Vol.2p343".However, there is no danger of this algorithm, cf. about "Knuth Vol.2p343".
Hinweise zur effizienten DurchführungInstructions for efficient implementation
Wie der algorithmus zu implementieren ist, damit er möglichst effektiv abläuft, hängt natürlich von der konkret verwendeten Harware ab. Sind Schleifenkonstrukte relativ teuer, bietet es sich an, die for-Schleife im teilschritt zusammenzufassen, so daß in jedem Durchlauf s (falls genügend groß ist) um einen konstanten Wert (etwa zwischen 4 und 10) verringert wird. Auf der "SLE66CX-"-Familie ist dieses Verfahren anzuraten. BEISPIELEHow the algorithm is to be implemented so that it runs as effectively as possible depends, of course, on the specific hardware used. If loop constructs are relatively expensive, it makes sense to combine the for loop in a sub-step, so that s (if it is large enough) is reduced by a constant value (approximately between 4 and 10) in each pass. This procedure is recommended for the "SLE66CX -" family. EXAMPLES
Problemstellung bei ECC-Alqorithmen:Problem with ECC algorithms:
AA
Is Beispiel dient hier der Einfachheit halber die Erstellung einer sogenannten Digitalen Signatur; es gibt aber auch Protokolle zum verschlüsseln von Daten. Dieser ECDSA-For the sake of simplicity, the example here is the creation of a so-called digital signature; there are also protocols for encrypting data. This ECDSA
Algorithmus (s. [ANSI], [IEEE]) zum Erstellen von Digitalen Signaturen funktioniert auf die folgende Art und Weise:Algorithm (see [ANSI], [IEEE]) for creating digital signatures works in the following way:
Legende:Legend:
Domain Parameter: q Primzahl (> 160 Bit)Domain parameters: q prime number (> 160 bit)
E : y2 = x3 + ax + b Elliptische Kurve über Fq a Koeffizient von E (aus Fq) b Koeffizient von E (aus Fq)E: y 2 = x 3 + ax + b elliptic curve over Fq a coefficient of E (from Fq) b coefficient of E (from Fq)
P = (*G> YG) : Basispunkt auf der Kurve xG Koeffizient von G (aus Fq) yG Koeffizient von G (aus Fq) n Ordnung von GP = (* G > YG): base point on the curve xG coefficient of G (from Fq) yG coefficient of G (from Fq) n order of G
I Ordnung von E, wird nicht benutzt h Co-Faktor (I = nh), wird nicht benutztI order of E, is not used h Co-factor (I = nh), is not used
Sonstige Elemente k Zufallszahl m NachrichtOther elements k random number m message
H Hashfunktion H (m) Hashwert der NachrichtH hash function H (m) hash value of the message
Schlüsselelemente d privater SchlüsselKey elements d private key
Q =dP öffentlicher SchlüsselQ = dP public key
Erzeugen von Signaturen: 1 ) Berechne e = H(m)Generating signatures: 1) Calculate e = H (m)
2) Erzeuge eine Zufallszahl k mit 1 < k < n-12) Generate a random number k with 1 <k <n-1
3) Berechne G = (X1 , y1 ) = kP 4) Setze r = X1 mod n3) Calculate G = (X1, y1) = kP 4) Set r = X1 mod n
5) Berechne s = k-1 (e + dr)5) Calculate s = k-1 (e + dr)
6) Die Signatur für m ist (r, s)6) The signature for m is (r, s)
Überprüfen von Signaturen:Check signatures:
1) Berechne e = H(m)1) Calculate e = H (m)
2) Berechne s-1 mod n2) Calculate s-1 mod n
3) Berechne U1 = e S-1 mod n3) Calculate U1 = e S-1 mod n
4) Berechne U2 = r S-1 mod n 5) Berechne U1P + U2Q = (X1 , Y1)4) Calculate U2 = r S-1 mod n 5) Calculate U1P + U2Q = (X1, Y1)
6) Berechne t = X1 mod n6) Calculate t = X1 mod n
7) Signatur ist gültig falls t = r7) Signature is valid if t = r
Mathematische GrundlagenMathematical basics
Mit Hilfe des euklidischen Algorithmus läßt sich für zwei gegebene Zahlen a und b der größte gemeinsame Teiler d berechnen; die erweiterte Version liefert zusätzlich Koeffizienten x und y so daß sich d als Linearkombination von a und b darstellen läßt, d.h. es gilt: d=xa+ybWith the help of the Euclidean algorithm, the greatest common divisor d can be calculated for two given numbers a and b; the extended version also provides coefficients x and y so that d can be represented as a linear combination of a and b, i.e. the following applies: d = xa + yb
Dies kann für die notwendige Inversion folgendermaßen verwendet werden: Das In- verse eines Elementes q in Zp (bezeichnet mit q-1 ) ist eine Zahl so daß gilt q q-1 = 1 ( mod p ) d.h. es gilt q q-1 = n p für ein beliebiges n (ist aiso ein beliebiges Vielfaches von p).This can be used for the necessary inversion as follows: The inverse of an element q in Zp (denoted by q-1) is a number so that q q-1 = 1 (mod p) applies. q q-1 = n p applies to any n (aiso is an arbitrary multiple of p).
Berechnet man nun (mit der erweiterten Version des Algorithmus) den ggT von q und p (und beachtet daß dieser 1 ist da p in unserem Fall eine Primzahl darstellt) so erhält man Zahlen a und b mit 1=d=aq+bp Da nach Definition bp = O (mod p) gilt hat man also a q = 1 (mod p) und das gewünschte Ergebnis lautet q-1 = a.If you now calculate (with the extended version of the algorithm) the PGD of q and p (and note that this is 1 since p in our case represents a prime number), you get numbers a and b with 1 = d = aq + bp Da after Definition bp = O (mod p) we have aq = 1 (mod p) and the desired result is q-1 = a.
Anpassung des erweiterten euklidischen Algorithmus Enveiterter euklidischer Algorithmus lm erweiterten euklidischen Algorithmus werden 2 Zahieniripei (P ,a,b ) und (Q,c,d) verwendet, die nach jedem Schritt Ihre Rollen tauschen. Ein einzelner Schritt besteht im wesentlichen aus einer Rechenoperation der FormAdaptation of the extended Euclidean algorithm. Extended Euclidean algorithm The extended Euclidean algorithm uses 2 Zahieniripei (P, a, b) and (Q, c, d) that switch roles after each step. A single step essentially consists of an arithmetic operation of the form
P=P-pQ a = a - pc b=b-pd mit einer geeignet zu bestillenden, relativ kleinen Zahl (wenige Bits) p. Das die Tripel die Rollen tauschen, heißt, daß im nächsten SchrittP = P-pQ a = a - pc b = b-pd with a relatively small number (a few bits) suitable for breastfeeding p. The fact that the triples swap roles means that in the next step
Q = Q - qP c = c - qa d=d-qb berechnet wird. Der euklidische Algorithmus funktioniert dadurch, daß die in jedemQ = Q - qP c = c - qa d = d-qb is calculated. The Euclidean algorithm works in that the in each
Schritt zu bestimmenden Zahlen p bzw. q so gewählt werden können, daß dieNumbers p or q to be determined can be chosen so that the
Langzahlen P und Q mit jedem Doppelschritt kleiner werden .Beim Start des Algorithmus wird c und d auf 1 , a und b auf 0, Q auf die zu invertierende Zahl und P auf die Primzahl, modulo der invertiert wird, gesetzt.Long numbers P and Q become smaller with each double step. At the start of the algorithm, c and d are set to 1, a and b to 0, Q to the number to be inverted and P to the prime number, modulo which is inverted.
Im Allgemeinen wird durch den Algorithmus der größte gemeinsame Teiler T von P undIn general, the algorithm uses the largest common divisor T of P and
Q berechnet, man erhält als ErgebniscP+bQ=T.Calculate Q, the result is cP + bQ = T.
Bei einer Inversion bezüglich einer Primzahl kennt man den ggT (T=l) und das Inverse von Q ist b oder d; man braucht c und a nicht zu berechnen. Die sukzessiv zu bestimmenden Zahlen p und q ergeben sich durch Teilen mit Rest von P durch Q (p =In the case of an inversion with respect to a prime number, the ggT (T = 1) is known and the inverse of Q is b or d; there is no need to calculate c and a. The numbers p and q to be determined successively result from dividing with the remainder of P by Q (p =
P/Q + Rest).P / Q + rest).
Anpassungen für Langzahlregister Prozessoren mit Langzahlregistern haben bei der Umsetzung des euklidischenAdjustments for long number registers Processors with long number registers have to implement the Euclidean
Algorithmus zwei Probleme:Algorithm two problems:
1. Divisionen mit Rest, auch solche mit kleinen Zahlen, sind nicht ohne weiteres möglich. Daher kann bei der Division immer nur eine Zweierpotenz für p bestimmt werden. Praktisch heißt dies, daß P=P-pQ schrittweise, zuerst P=P-x(n)2AnQ, dann P=P-x(n-1 )2A(n-l)Q und zum Schluß P=P-x(0)2Q (x(i) ist immer 0 oder 1 ), durchgeführt werden muß, wobei n die Differenz der Längen von P und Q in Bit ist; die Division von P durch Q wird also implizit durchgeführt.1. Divisions with remainder, even those with small numbers, are not easily possible. Therefore, only a power of two for p can be determined in the division. In practice this means that P = P-pQ step by step, first P = Px (n) 2AnQ, then P = Px (n-1) 2A (nl) Q and finally P = Px (0) 2Q (x (i) is always 0 or 1), where n is the difference between the lengths of P and Q in bits; the division of P by Q is therefore carried out implicitly.
2. Die Gruppierung von Rechenschritten, hier P=P-pQ und b=b-pd, ist nicht ohne weiteres möglich, d.h. auch eine gleichartige Rechnung mit neuen Operanden kann nicht allein mit Befehlen für Langzahlregister durchgeführt werden (zumindest nicht mit den bisher existierenden Prozessoren für Smartcards). Die Lösung, p im steuernden Hostprozessor zu bestimmen, ist zwar immer möglich, aber ineffizient. Die Lösung besteht darin, P und b, sowie Q und d, je zusammen in einem Register untergebracht werden, jeweils durch einige Bits voneinander getrennt. Wird nun dieRechnung P=P-pQ, für eine Zweierpotenz p, durchgeführt, wird gleichzeitig auch b=b-pd berechnet. Dadurch genügt es, wie oben beschrieben, die Berechnung von p bzw. P=P-pQ schrittweise durchzuführen; dies ist mit geringem Aufwand effizient möglich (z.B. aufden SLE-Chips).Ein Problem ist, daß b und d die Zahlen P und Q nicht (wesentlich) beeinflussen dürfen. Eine Analyse zeigt, daß p und q immer positiv sind, also ist d immer positiv (und damit unproblematisch) und b immer negativ. In der üblichen Binärdarstellung der Langzahlen bedeutet dies, daß sich "b von P eine 1 borgt", ein Umstand der im Algorithmus berücksichtigt werden muß.2. The grouping of calculation steps, here P = P-pQ and b = b-pd, is not readily possible, ie a similar calculation with new operands can also be performed not only with commands for long number registers (at least not with the existing processors for smart cards). The solution to determine p in the controlling host processor is always possible, but inefficient. The solution is to put P and b, as well as Q and d, each together in a register, separated by a few bits. If the calculation P = P-pQ is now carried out for a power of two p, b = b-pd is also calculated at the same time. As described above, it is therefore sufficient to carry out the calculation of p or P = P-pQ step by step; this can be done efficiently with little effort (e.g. on the SLE chips). One problem is that b and d must not (significantly) influence the numbers P and Q. An analysis shows that p and q are always positive, so d is always positive (and therefore unproblematic) and b is always negative. In the usual binary representation of the long numbers, this means that "b borrows 1 from P", a fact that must be taken into account in the algorithm.
Konkretes Vorgehen bei der ImplementierungSpecific implementation procedure
Bestimmung einer Inversen im Primzahlkörper, d.h. geg. : eine Primzahl P eine positive Zahl Q kleiner als P eine Zahl D, so daß DP = 1 mod P ist. Initialisierung des VerfahrensDetermination of an inverse in the prime number field, i.e. opp.: a prime number P a positive number Q less than P a number D, so that DP = 1 mod P. Initialization of the procedure
Die Anzahl der Bits in der Binärdarstellung von P sei n.Let the number of bits in the binary representation of P be n.
Die Anzahl der Bits in der Binärdarstellung von Q sei m (m<=n).Let the number of bits in the binary representation of Q be m (m <= n).
Die Anzahl trennender O-Bits zwischen P und b, bzw. Q und d, ist x (x>=l).The number of separating O bits between P and b, or Q and d, is x (x> = l).
Die Länge der Langzahlregister beträgt mindestens 2n+x Bit. P und b wird in ein Langzahlregister Z und Q und d in ein Laπgzahlregister y geladen und gemäß der trennenden x O-Bits justiert:The length of the long number register is at least 2n + x bits. P and b are loaded into a long number register Z and Q and d into a long number register y and adjusted according to the separating x O bits:
Z = O...OPPP...PPPO...Obbb...bbb y = O...OOQQ...QQQO...Oddd...ddd Hierbei wird b mit 0 und d mit 1 initialisiert und es ist möglich, daß m=n ist, ansonsten kennzeichen Buchstaben Bits, die 0 oder 1 sein können; die fuhrenden O-Bits sind optional.Z = O ... OPPP ... PPPO ... Obbb ... bbb y = O ... OOQQ ... QQQO ... Oddd ... ddd Here b is initialized with 0 and d with 1 and it it is possible that m = n, otherwise characterize letters that can be 0 or 1; the leading O bits are optional.
Abhängig von der konkreten Hardwarearchitektur, zumindest das führende Bit von P muß getestet werden können, werden beide Register parallel nach links geshiftet, bis das fuhrende Bit des Z-Registers gesetzt ist (dies ist bei der Implementierung aufCCP/ACE notwendig). Das fuhrende Bit von P in Z ist nach der Initialisierung in jedem Fall gesetzt.Je nach Realisierung der Hardware muß das nicht das physikalisch höchstwertigste Bit des Z-Registers getestet werden können. Im folgenden ist mitDepending on the specific hardware architecture, at least the leading bit of P must can be tested, both registers are shifted in parallel to the left until the leading bit of the Z register is set (this is necessary for the implementation on CCP / ACE). The leading bit from P to Z is always set after initialization. Depending on the hardware, it may not be possible to test the physically most significant bit of the Z register. The following is with
"testen des höchstwertigsten Bits des Z-Registers" das höchstwertigste it des Z- Registers gemeint, das getestet werden kann.Zum Abschluß der Initialisierung ist das höchstwertige Bit des Z-Registers das höchstwertige gesetzte Bit von P und Z und y sind gemäß der trennenden x O-Bits justiert: Z = PPP. . .PPPO. . .Obbb. . .bbb y = OQQ. . .QQQO. . .Oddd. . .ddd. Hauptschleife des Verfahrens"Test the most significant bit of the Z register" means the most significant it of the Z register that can be tested. At the end of the initialization, the most significant bit of the Z register is the most significant set bit of P and Z and y are according to the separating one x O bits adjusted: Z = PPP. , .PPPO. , .Obbb. , .bbb y = OQQ. , .QQQO. , .Oddd. , .ddd. Main loop of the process
1. Berechne die Differenz u der fuhrenden Nullen von y und Z (u gleich "Anzahl der fuhrenden Nullen von Y" minus "Anzahl der fuhrenden Nullen von Z"). u ist größer oder gleich O.1. Calculate the difference u of the leading zeros of y and Z (u equals "number of leading zeros of Y" minus "number of leading zeros of Z"). u is greater than or equal to O.
Falls 2AUY < Z ist, setze 2 = Z - 2AUYIf 2AUY <Z, set 2 = Z - 2AUY
Setze u = u - 1 ;Set u = u - 1;
Falls u negativ ist, beende die Teilschleife, sonst gehe zur Zeile mit Z = Z - ...If u is negative, end the loop, otherwise go to the line with Z = Z - ...
2. Setzeu=0 Wenn das führende Bit von Z nicht gesetzt, shifte Z um 1 nach links, setze n = n - 1.2. Set = 0 If the leading bit of Z is not set, shift Z to the left by 1, set n = n - 1.
Wiederhole den vorherigen Schritt, falls n>0 ist und das führende Bit von Z nicht gesetzt ist.Repeat the previous step if n> 0 and the leading bit of Z is not set.
. 3. Vertausche y und Z sowie m und n., 3. Swap y and z and m and n.
4. Falls m=0 ist, beende die Hauptschleife Abschlußberechnungen des Verfahrens4. If m = 0, complete the main loop final calculations of the process
Sind mir noch nicht ganz klarI'm not quite clear yet
Die konkrete Umsetzung am Beispiel des SLE66CxxSThe concrete implementation using the example of the SLE66CxxS
Dieser Prozessor besitzt einen mathematischen Koprozessor der Länge 1120 Bit (ACE, Advanced Crypto Engine) bzw. 560 Bit (CCP, Crypto Coprocessor) und erfüllt damit notwendigen Voraussetzungen für die Implementierung des vorgeschlagenen Algorithmus. Es ist die Verwendung der maximalen in Standardisierungsbemühungen vorgesehenen Parametergrößen möglich (NIST, ANSI 512 Bit). Für die Verwendung der üblicherweise eingesetzten Parametergrößen (160- 256 Bit) reicht es, den Prozessor in der Betriebsart mit der kurzen Registerlänge zu betreiben.This processor has a mathematical coprocessor with a length of 1120 bits (ACE, Advanced Crypto Engine) or 560 bits (CCP, Crypto Coprocessor) and thus fulfills the necessary requirements for the implementation of the proposed algorithm. It is possible to use the maximum parameter sizes provided in standardization efforts (NIST, ANSI 512 bit). For the use of the commonly used parameter sizes (160-256 Bit), it is sufficient to operate the processor in the operating mode with the short register length.
Anwendungsgebieteapplication areas
1) Verschlüsseln von Daten: Als Absender einer Nachricht möchte ich diese so behandeln, daß nur der vorgesehene Empfänger sie lesen kann. Dazu nehme ich den öffentlich bekannten Schlüssel und führe eine mathematische Transformation mit Kenntnis des geheimen Schlüssels rückgängig gemacht werden kann.1) Encrypting data: As the sender of a message, I would like to treat it so that only the intended recipient can read it. For this I take the publicly known key and perform a mathematical transformation with knowledge of the secret key can be undone.
2) Digitale Signaturen: Als Absender einer Nachricht möchte ich die Nachricht so kennzeichnen, daß sich der Empfänger davon überzeugen kann, daß diese Nachricht wirklich von mir stammt. Üblicherweise erzeugt man dazu mit Hilfe des geheimen Schlüssels eine zusätzliche Information, so daß sich der Empfänger die2) Digital signatures: As the sender of a message, I would like to mark the message so that the recipient can be convinced that the message really came from me. Usually you use the secret key to generate additional information so that the recipient can
Sicherheit dadurch verschaffen kann indem er prüft ob eine bestimmte Beziehung zwischen der erhaltenen Nachricht, dieser Zusatzinformation und meinem Öffentlichen Schlüssel besteht.Can provide security by checking whether there is a certain relationship between the message I received, this additional information and my public key.
Die Vorteile des Algorithmus entstammen der Tatsache, daß die Registerlänge des verwendeten Prozessors mehr als doppelt so lang wie die zu bearbeitenden Zahlen sind; zu klären ist, ob dieser Vorteil schon sinnvoll für andere Einsatzzwecke ausgenutzt werden konnte und so evtl. schon in anderen Bereichen ein Schutz für diese Idee beantragt wurde.The advantages of the algorithm come from the fact that the register length of the processor used is more than twice as long as the numbers to be processed; It has to be clarified whether this advantage could already be usefully used for other purposes and whether protection for this idea had already been applied for in other areas.
Der beschriebene Algorithmus ist in dieser Form auch in endlichen Körpern mit Charakteristik 2 verwendbar. The algorithm described can also be used in this form in finite fields with characteristic 2.

Claims

Patentansprüche claims
1. Verfahren zur Durchführung einer Inversion im Primzahlkörper inbesondere bei der der Verschlüsselung mittels elliptischer Kurven, wobei eine Inverse zu bestimmen ist, dadurch gekennzeichnet, daß in einem Rechenschritt die Ergebnisse zweier notwendiger Operatoren erhalten werden.1. A method for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptic curves, an inverse being to be determined, characterized in that the results of two necessary operators are obtained in one calculation step.
2. Verfahren insbesondere nach Anspruch 1 zur Durchführung einer Inversion im Primzahlkörper inbesondere bei der der Verschlüsselung mittels elliptischer Kurven, wobei eine Inverse zu bestimmen ist, dadurch gekennzeichnet, daß der erweiterte euklidischen Algorithmus zur Bestimmung der Inversen im Primzahlkörper verwendet wird.2. The method in particular according to claim 1 for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptic curves, an inverse to be determined, characterized in that the extended Euclidean algorithm is used to determine the inverses in the prime number field.
3. Verfahren insbesondere nach Anspruch 1 oder 2 zur Durchführung einer Inversion im Primzahlkörper insbesondere bei der der Verschlüsselung mittels elliptischer Kurven unter Verwendung eines Mikroprozessors, wobei der Mikroprozessor auf wenigstens zwei Register T und U zugreifen kann, deren Registerlänge echt größer als das Doppelte der Bitlänge der zu berechnenden Zahlen, wobei der Mikroprozessor über Arithmetikroutinen für solche Zahlen verfüg, wobei gegeben sind a, p in Z mit 0 < a < p, p ist eine Primzahl, wobei gesucht ist x in Z, 0 < x < p mit x*a = 1 mod p gekennzeichnet durch folgende Schritte3. The method in particular according to claim 1 or 2 for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptic curves, using a microprocessor, the microprocessor being able to access at least two registers T and U, the register length of which is actually greater than twice the bit length of the numbers to be calculated, the microprocessor having arithmetic routines for such numbers, given a, p in Z with 0 <a <p, p is a prime number, looking for x in Z, 0 <x <p with x * a = 1 mod p characterized by the following steps
Initialisiere A=p, B=a, x-i =1 , x2 =0 undInitialize A = p, B = a, xi = 1, x 2 = 0 and
T = A*2l+k + x2 sowie U = B*2l+k + x, Solange B > 0: q = A/BT = A * 2 l + k + x 2 and U = B * 2 l + k + x, as long as B> 0: q = A / B
V = T - q*U (V = (r, Xo))V = T - q * U (V = (r, Xo))
T = U U = V Wenn B < 0: Setze x = x2 T = UU = V If B <0: Set x = x 2
4. Verfahren nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, daß der Primzahlenkörper und die Parameter der elliptischen frei gewählt werden. 4. The method according to any one of claims 1 to 3, characterized in that the prime number body and the parameters of the elliptical are chosen freely.
5. Vorrichtung, insbesondere Smartcard, zur Durchführung einer Inversion im Primzahlkörper inbesondere bei der der Verschlüsselung mittels elliptischer Kurven, wobei eine Inverse zu bestimmen ist, dadurch gekennzeichnet, daß die Vorichtung über einen Mikroprozessor, der derart ausgebildet ist, daß in einem Rechenschritt die Ergebnisse zweier notwendiger Operatoren erhalten werden.5. A device, in particular a smart card, for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptical curves, an inverse to be determined, characterized in that the device has a microprocessor which is designed such that the results in one computing step two necessary operators can be obtained.
6. Vorrichtung, insbesondere Smartcard, insbesondere nach Anspruch 5 zur Durchführung einer Inversion im Primzahlkörper inbesondere bei der der Verschlüsselung mittels elliptischer Kurven, wobei eine Inverse zu bestimmen ist, dadurch gekennzeichnet, daß der Mikroprozessor mit einem Speicher versehen ist, in welchem Befehle gespeichert sind, die den erweiterte euklidischen Algorithmus repräsentieren, mittels welchem die Bestimmung der Inversen im Primzahlkörper möglich ist.6. The device, in particular a smart card, in particular according to claim 5, for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptical curves, an inverse to be determined, characterized in that the microprocessor is provided with a memory in which commands are stored , which represent the extended Euclidean algorithm by means of which the determination of the inverses in the prime number field is possible.
7. Vorrichtung, insbesondere Smartcard, insbesondere nach Anspruch 5 oder 6 zur Durchführung einer Inversion im Primzahlkörper insbesondere bei der der Verschlüsselung mittels elliptischer Kurven unter Verwendung eines Mikroprozessors, wobei der Mikroprozessor auf wenigstens zwei Register T und U zugreifen kann, deren Registerlänge echt größer als das Doppelte der Bitlänge der zu berechnenden Zahlen, wobei der Mikroprozessor über Arithmetikroutinen für solche Zahlen verfügt, wobei gegeben sind a, p in Z mit 0 < a < p, p ist eine Primzahl, wobei gesucht ist x in Z, 0 < x < p mit x*a = 1 mod p, dadurch gekennzeichnet, daß der Mikroprozessor über einen Speicher zur automatischen Ausführung folgender Schritte verfügt: Initialisiere A=p, B=a, x1 =1 , x2 =0 und7. The device, in particular a smart card, in particular according to claim 5 or 6 for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptic curves using a microprocessor, the microprocessor being able to access at least two registers T and U, the register length of which is really greater than twice the bit length of the numbers to be calculated, the microprocessor having arithmetic routines for such numbers, given a, p in Z with 0 <a <p, p is a prime number, looking for x in Z, 0 <x < p with x * a = 1 mod p, characterized in that the microprocessor has a memory for automatically executing the following steps: initialize A = p, B = a, x 1 = 1, x 2 = 0 and
T = A*2l+k + x2 sowie U = B*2l+k + x. Solange B > 0: q = A/BT = A * 2 l + k + x 2 and U = B * 2 l + k + x. As long as B> 0: q = A / B
V = T - q*U (V = (r, x0)) T = UV = T - q * U (V = (r, x 0 )) T = U
U = V Wenn B < 0: Setze x = x2 U = V If B <0: Set x = x 2
8. Vorrichtung, insbesondere Smartcard, insbesondere nach einem der Ansprüche 5 bis 7 zur Durchführung einer Inversion im Primzahlkörper insbesondere bei der der Verschlüsselung mittels elliptischer Kurven unter Verwendung eines Mikroprozessors, dadurch gekennzeichnet, daß der Primzahlenkörper und die Parameter der erst nach Herstellung der Vorrichtung in einen vom Mikroprozessor auslesbaren Speicher, insbesonder ein EEPROM, eingelesen wurden, insbesondere beim Personalisieren der Vorrichtung.8. The device, in particular a smart card, in particular according to one of claims 5 to 7 for performing an inversion in the prime number field, in particular in the case of encryption by means of elliptic curves using a microprocessor, characterized in that the prime number body and the parameters are only in after the device has been manufactured a memory readable by the microprocessor, in particular an EEPROM, has been read in, in particular when personalizing the device.
9. Verwendung eines Verfahrens oder einer Vorrichtung nach einem der vorangehenden Ansprüche bei der digitalen Datenübermittlung, insbesondere bei der9. Use of a method or a device according to one of the preceding claims in digital data transmission, in particular in the
Erzeugung digitaler Signaturen, bei Mobilfunk, Internet und sonstigen digitalen Übertragungsverfahren wie beispielsweise GSM, UMTS und DAB.Generation of digital signatures for mobile radio, internet and other digital transmission methods such as GSM, UMTS and DAB.
10. Maschinenlesbarer Speicher enthaltend die zum automatischen Ausführen eines Verfahrens nach einem der Ansprüche 1 bis 4 benötigten Befehle. 10. Machine-readable memory containing the commands required for automatically executing a method according to one of claims 1 to 4.
PCT/DE2001/000161 2000-01-16 2001-01-16 Method and devices for carrying out an inversion in the primary number field WO2001052051A2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
DE10190100T DE10190100D2 (en) 2000-01-16 2001-01-16 Methods and devices for performing an inversion, in particular in the case of encryption using elliptical curves
AU37218/01A AU3721801A (en) 2000-01-16 2001-01-16 Method and device for carrying out an inversion, especially during encoding by means of elliptic curves

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
DE10002901.9 2000-01-16
DE10002901 2000-01-16

Publications (2)

Publication Number Publication Date
WO2001052051A2 true WO2001052051A2 (en) 2001-07-19
WO2001052051A3 WO2001052051A3 (en) 2001-10-25

Family

ID=7628537

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/DE2001/000161 WO2001052051A2 (en) 2000-01-16 2001-01-16 Method and devices for carrying out an inversion in the primary number field

Country Status (3)

Country Link
AU (1) AU3721801A (en)
DE (2) DE10190100D2 (en)
WO (1) WO2001052051A2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007048430A1 (en) * 2005-10-28 2007-05-03 Telecom Italia S.P.A. A method for scalar multiplication in elliptic curve groups over binary polynomial fields for side-channel attack-resistant cryptosystems
US8913739B2 (en) 2005-10-18 2014-12-16 Telecom Italia S.P.A. Method for scalar multiplication in elliptic curve groups over prime fields for side-channel attack resistant cryptosystems
US9047167B2 (en) 2002-05-06 2015-06-02 Giesecke & Devrient Gmbh Calculating the modular inverses of a value

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999004332A1 (en) * 1997-07-14 1999-01-28 Cipherit Ltd. Composite field multiplicative inverse calculation for elliptic curve cryptography

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999004332A1 (en) * 1997-07-14 1999-01-28 Cipherit Ltd. Composite field multiplicative inverse calculation for elliptic curve cryptography

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BRUCE SCHNEIER: "Applied Cryptography" 1996 , JOHN WILEY & SONS, INC. , UNITED STATES XP002168658 Seite 246 -Seite 248 *
DONALD E. KNUTH: "The Art of Computer Programming" 1998 , ADDISON WESLEY , UNITED STATES XP002168657 Seite 342 -Seite 343 *
SEDLAK H ET AL: "EIN PUBLIC-KEY-CODE KRYPTOGRAPHIC-PROZESSOR A PUBLIC KEY CODE CRYPTOGRAPHY PROCESSOR" INFORMATIONSTECHNIK IT,DE,OLDENBOURG VERLAG. MUNCHEN, Bd. 28, Nr. 3, 1986, Seiten 157-161, XP000615686 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9047167B2 (en) 2002-05-06 2015-06-02 Giesecke & Devrient Gmbh Calculating the modular inverses of a value
US8913739B2 (en) 2005-10-18 2014-12-16 Telecom Italia S.P.A. Method for scalar multiplication in elliptic curve groups over prime fields for side-channel attack resistant cryptosystems
WO2007048430A1 (en) * 2005-10-28 2007-05-03 Telecom Italia S.P.A. A method for scalar multiplication in elliptic curve groups over binary polynomial fields for side-channel attack-resistant cryptosystems
US8243920B2 (en) 2005-10-28 2012-08-14 Telecom Italia S.P.A. Method for scalar multiplication in elliptic curve groups over binary polynomial fields for side-channel attack-resistant cryptosystems

Also Published As

Publication number Publication date
AU3721801A (en) 2001-07-24
WO2001052051A3 (en) 2001-10-25
DE10101884A1 (en) 2001-10-25
DE10190100D2 (en) 2002-06-06

Similar Documents

Publication Publication Date Title
DE69534603T2 (en) ENCRYPTION SYSTEM FOR ELLIPTIC CURVE
DE69829967T2 (en) METHOD AND DEVICE FOR QUICK ELLIPTIC ENCRYPTION WITH IMMEDIATE EMBEDDING
DE2843583C2 (en) Method for access-secure message traffic over an unsecured message transmission channel
DE60121066T2 (en) Attack-resistant cryptographic methods and apparatus
DE60316586T2 (en) EFFICIENT ARITHMETIC IN GALOIS FIELDS OF UNGERADER CHARACTERISTICS ON BINARY HARDWARE
DE102011117236A1 (en) Efficient prime number testing
EP1922837B1 (en) Method for securely encrypting or decrypting a message
DE102015104421A1 (en) Method of using a token in cryptography
DE19829643A1 (en) Digital signature verification method
EP1346509B1 (en) Method and device for detecting a key pair and for generating RSA keys
DE60117813T2 (en) Method and device for storing and retrieving eones private crypto key
DE112018002723B4 (en) SYSTEM, METHOD AND APPARATUS FOR CONCEALING DEVICE OPERATIONS
EP2641241B1 (en) Method for long-number division or modular reduction
DE10328860B4 (en) Device and method for encrypting data
DE10161137A1 (en) Cryptographic data processing system for signature verification tests elliptical and twisted curves and uses one coordinate for data encryption and transmission
WO2001052051A2 (en) Method and devices for carrying out an inversion in the primary number field
EP1442391A2 (en) Method and device for guaranteeing a calculation in a cryptographic algorithm
DE102020134618A1 (en) SECURITY CONTROLLERS AND METHODS FOR PROCESSING DATA ELEMENTS OF A DATA FIELD
WO2013060466A2 (en) Determination of a division remainder and detection of prime number candidates for a cryptographic application
DE10161138A1 (en) Elliptical curve determination method for cryptographic techniques involves evaluating curve to be tested as elliptical curve if defined cryptographic quality criterion is fulfilled for twisted elliptical curve
DE10042234C2 (en) Method and device for performing a modular exponentiation in a cryptographic processor
EP2128754B1 (en) Safe sliding window exponentiation
DE102004001659B4 (en) Apparatus and method for converting a first message into a second message
DE10156708A1 (en) Method and device for multiplying and method and device for adding on an elliptic curve
EP1271304B1 (en) Method for calculating the modular inverses of two numbers

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A2

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

AL Designated countries for regional patents

Kind code of ref document: A2

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

121 Ep: the epo has been informed by wipo that ep was designated in this application
AK Designated states

Kind code of ref document: A3

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

AL Designated countries for regional patents

Kind code of ref document: A3

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

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP