AU2198399A - Transformation methods for optimizing elliptic curve cryptographic computations - Google Patents
Transformation methods for optimizing elliptic curve cryptographic computations Download PDFInfo
- Publication number
- AU2198399A AU2198399A AU21983/99A AU2198399A AU2198399A AU 2198399 A AU2198399 A AU 2198399A AU 21983/99 A AU21983/99 A AU 21983/99A AU 2198399 A AU2198399 A AU 2198399A AU 2198399 A AU2198399 A AU 2198399A
- Authority
- AU
- Australia
- Prior art keywords
- point
- mapping
- field
- elliptic curve
- given
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/60—Methods 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/72—Methods 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/724—Finite field arithmetic
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/60—Methods 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/72—Methods 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/724—Finite field arithmetic
- G06F7/725—Finite field arithmetic over elliptic curves
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/60—Methods 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/72—Methods 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/728—Methods 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 using Montgomery reduction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L9/3066—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
- H04L9/3073—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves involving pairings, e.g. identity based encryption [IBE], bilinear mappings or bilinear pairings, e.g. Weil or Tate pairing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S40/00—Systems for electrical power generation, transmission, distribution or end-user application management characterised by the use of communication or information technologies, or communication or information technology specific aspects supporting them
- Y04S40/20—Information technology specific aspects, e.g. CAD, simulation, modelling, system security
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Algebra (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Complex Calculations (AREA)
Description
WO 99/30458 PCT/US98/25824 TRANSFORMATION METHODS FOR OPTIMIZING ELLIPTIC CURVE CRYPTOGRAPHIC COMPUTATIONS TECHNICAL FIELD OF INVENTION 5 The present invention relates to software and hardware implementation of elliptic curve cryptographic systems, in particular, and systems that require computation of calculations involving a finite number of arbitrary field operations within a finite field, in general. BACKGROUND OF THE INVENTION 10 In the modern information-based society, the need for global computer and network security is becoming increasingly urgent. Cryptographic systems are fundamental tools used to build systems that ensure privacy, trust, and access control in such diverse areas as electronic commerce, corporate security, digital distribution of intellectual property, and national security, among others. 15 "Public-key" cryptographic systems, in turn, provide essential capabilities needed in systems requiring secure exchange of information between entities (people or computer systems) that may have never exchanged data with one another before. Most modern information systems, including the Internet, fit this description. As an example, while a consumer may have never had any contacts with a particular on-line vendor, he or she should be able to purchase an item from 20 that vendor in a secure manner. Public-key cryptosystems enable such purchases through providing capabilities such as encryption, decryption, digital signatures, and signature verification. In public-key cryptography, an entity interested in receiving secure messages from others publishes his or her "public key." Others use this public-key to encrypt messages they send to the entity. These messages can be decrypted only through the use of a "private key" which is known 25 only to the entity. The entity can also use this private key to digitally "sign" a piece of data. 1 WO 99/30458 PCT/US98/25824 Others, in turn, can use the public key to verify the signature and ascertain that the data was indeed signed by the signing entity. The security of a public-key cryptosystem depends on how difficult it is to derive a private key from its associated, known public key. The more complex it is to mathematically derive the 5 private key, the more time it takes a computer to "break" a public key by "guessing" its corresponding private key. Today, the most commonly used public-key cryptography system is the RSA public-key cryptosystem. The relationship between RSA's public and private keys is governed by the mathematics of factorization of large composite integers. RSA public and private keys are large integers represented as a binary bit pattern. The longer a key, the harder it is and 10 the longer it takes a computer to break it by deriving its private key. For example, modern advances in factorization algorithms and distributed computing have made breaking 400-bit RSA keys possible. Breaking an RSA key of length 1024 or 2048 bits, however, is thought to be virtually impossible given the computing resources available today. To retain an acceptable level of security, modern systems have been using longer RSA keys. Since performing public-key 15 cryptography using longer keys requires more computing resources, it is economically ideal to use an alternative public-key cryptosystem that provides the same level of security with shorter keys. Over the last decade, Elliptic Curve Cryptography ("ECC") has emerged as one possible alternative for an effective cryptosystem. ECC offers the same level of security as RSA with keys that are one-sixth the length of RSA keys. Until now, however, existing software implementations 20 of ECC have been too inefficient to be commercially viable. In order to be commercially viable, ECC needs to allow the same functionality as RSA at comparable speeds, as well as lower costs of implementation in hardware and software. Efficient ECC will enable implementation of many envisioned modern systems that would otherwise be economically infeasible. As such, much research has been focused on achieving efficient ECC in the academia and industry. The most 25 common approach to achieving efficient ECC is briefly described below. 2 WO 99/30458 PCT/US98/25824 To perform public-key cryptography, ECC methods take advantage of specific features of mathematical "groups" called "elliptic curves." An elliptic curve is related to and "constructed over" a mathematical "field." Any finite field can be chosen to construct an elliptic curve, but the exact choice of the field significantly affects the properties of the elliptic curve and the efficiency 5 of computer implementations that represent the "operations" defined within that elliptic curve. One of the most computationally intense operations used in all ECC implementations is known as "elliptic curve point multiplication." Point multiplication requires the computation of eP, where P is a "point" in the elliptic curve and e is a positive integer. This operation is central to many elliptic curve cryptography functions, including encryption, decryption, random number 10 generation, key-exchange, digital signing, and signature verification. Over the last decade, a debate has been carried on in the cryptography community over which categories of fields provide the best choices for use with ECC. Two broad categories of fields, called GF(p) and GF(2k) have been chosen by the Institute of Electrical and Electronics Engineers (IEEE) as international standards for Elliptic Curve Cryptography. While most 15 academic and commercial research today is concentrated on implementing ECC over either GF(p) or GF(2k), the exact advantages or disadvantages of each choice with respect to cryptography is not clearly understood at this point. Furthermore, both GF(p) and GF(2k) encompass countless particular individual member fields within them. Each individual member field has its own properties that affect the computational characteristics of an ECC implementation. Furthermore, 20 given a particular individual member field within GF(p) or GF(2k), numerous elliptic "curves" can be constructed over such field. The choice of the curve, too, affects the computational characteristics of the resulting ECC implementation. Prior attempts for creating efficient ECC implementations have usually been based on finding either specific individual member fields in GF(2k) or GF(p) or specific curves defined over 25 such individual member fields which possess "special" mathematical or computational properties. 3 WO 99/30458 PCT/US98/25824 These special properties would then be exploited to optimize ECC computations. This approach does not attempt to achieve efficient ECC across all mathematical fields. Rather, it concentrates on carefully choosing a particular field so that a specific mathematical or computational technique can be deployed to achieve efficient ECC computations. 5 An example of this is the proposal by Agnew, et al to utilize a method called "Normal Basis" to achieve fast ECC in particular fields in GF(2k). While, most academic and industry research has focused on using an alternate method known as "Polynomial Basis" for fields in GF(2k), the use of Normal Basis in six particular fields within GF(2k) has allowed commercialization of a particular implementation of ECC. One disadvantage of this approach is 10 that key lengths are limited to the six values allowed by those particular fields. MATHEMATICAL BACKGROUND OF THE INVENTION This Section presents a list of some of the mathematical terms that are used in this document. Some key concepts that can be useful in following the methodology of the invention 15 are also briefly described in this Section. The descriptions in this Section are not meant to be mathematically precise or rigorous. Sets A "set" is any collection of objects, including mathematical and physical objects. Often, a 20 set is represented in print by enclosing a comma-separated list of the objects that make up the set within the curly brackets, " {" and " }". For example, let F represent the set of all non-negative integers smaller than 7. That set can be written as F= {0, 1, 2, 3, 4, 5, 6}. An object that belongs to a set is a "member" or "element" of the set. In another example, F denotes the set of all polynomials of order 4, and p() represents the specific polynomial x 4 + - x +1. Since p(x) is a 25 polynomial of order 4, then p(x) is an element of F. In mathematical shorthand, p(x) c F, where 4 WO 99/30458 PCT/US98/25824 the symbol " e " is commonly read as "belongs to" or "is a member of." A particular set S is a "subset" of another set F if every element of the set S is also an element of the set F. This is denoted by the shorthand notation S c F. For instance {5, 1, 3} c {0, 1, 2, 3, 4, 5, 6}. The "c" symbol is read as "is a subset of " Every set is a subset of itself Given any set S, then S c S. 5 Mappings A "mapping" is a relationship that associates each member of a set with a particular member of another set. For instance, T can be defined as the relationship that "maps" each member of the set of all human beings to the integer that represents that person's age. If Tom is 10 32 years old, then T( Tom) = 32 is written to denote the relationship that T establishes between the integer 32 and the human being Tom. 32 is said to be the "image" of Tom "under" the mapping T In another example, let p be a prime number, n denote any non-negative integer, and r denote the integer remainder which results when n is divided by p. A mathematical shorthand for 15 this is r = n modp. For instance, ifp = 7 and n = 15, then r = 15 mod 7 = 1, which is the remainder of 15 divided by 7, since 15 = 2 - 7 - 1. A mapping T may be constructed between the set of all non-negative integers N= { 0, 1, 2, 3, ... } and the set R= {0, 1, 2, 3, 4, 5, 6, 7, 8} in the following manner: given that p = 7 and given any non-negative integer n e N, let T(n) = r = n mod p. Thus, T(37) = r = 37 mod 7 = 2. Note that regardless of what value n takes, T(n) is an 20 integer less than 7. In other words, given any n E N, then T(n) e R. By convention, T is said to map the set N"into" the set R. This is denoted in shorthand as T: N -R, which is read, "Tis a mapping from the set N into the set R." N is referred to as the "domain" of the mapping T, while R is said to be the "range" of the mapping T. The "image" of the set N under the mapping T is the unique subset of R where every 5 WO 99/30458 PCT/US98/25824 element is an image of at least one element of N. In other words, if F denotes the image of N under T, then, given any element y e F, there exists at least one element x G N, such that T(x) = y. Since the remainder of the division of any positive integer by 7 is one of the numbers from 0 to 6, the image of N under T in the above example is the set F = {0, 1, 2, 3, 4, 5, 6}. Since F c- R 5 (recall that R = {0, 1, 2, 3, 4, 5, 6, 7, 8}), and no element of N is mapped to any element of R outside ofF, then T is also a mapping from N into F. In other words, T: N -- F. Since every member ofF is an image of some element of N under T, then T is said to map N "onto" F. Sometimes, the word "transformation" is used to refer to a mapping. 10 Set Operations An "ordered pair" is a mathematical notion that references pairs of objects under circumstances where one needs to keep track of which object is the "first" element of the pair and which object is the "second" element of the pair. For instance, the set of all pairs of husbands and wives is a set of ordered pairs, whose members can be represented by the notation (x, y), where x 15 is an element of the set of all husbands, and y is an element of the set of all wives. Let X and Y be any arbitrary sets. The "cross product" of X and Y is the set of all ordered pairs whose first elements come from X and whose second elements come from Y. In mathematical parlance, the cross product of X and Y is written as X x Y and is defined by the set of all ordered pairs (x, y), where x e X, andy e Y. As an example, let X {0,1} and Y= {0,1,2}, thenXx Y = {(0, 0), (0, 20 1), (0, 2), (1, 0), (1, 1), (1, 2)} Given any set S, then a mapping from S x S into S can be referred to as a "binary set operation" defined within S (the word binary underscores the fact that each element of the domain of the mapping is an ordered pair.) For instance, let F= {0, 1, 2, 3, 4, 5, 6}. Next, construct a mapping T. F xF -x F as follows: given any ordered pair (xC, y) F x F, where x C F 6 WO 99/30458 PCT/US98/25824 and y E F, let the image of (x, y) under T be the integer that is the result of calculating the expression (x + y) mod 7. In other words, let T( (x, y)) = (x + y) mod 7. It is relatively straightforward to verify that the range of T is in fact the set F. For example, T( (4, 6)) = (4 + 6) mod 7 = 10 mod 7 = 3. Regardless of the value of x + y, the integer which is the result of the 5 expression (x + y) mod 7 is the remainder of a division by 7 and therefore an integer between 0 and 6, and a member ofF. Hence, T is a binary set operation defined within F. For the sake of convenience, when working with a given binary operation T, the construct T((x, y)) is often written as x -y. The symbol "." is called the "binary operator" and is used to represent the binary operation T For instance, given the above definition for T, instead of writing 10 T((4, 6)) = 3, one writes 4 - 6 = (4 + 6) mod 7 = 3. Other symbols may also be used as binary operator symbols. Two other commonly used such symbols are + and G. The two members of the set S that make up the ordered pair that a binary operation maps into another member of the set S are the "operands" in the operation, which, in turn, is said to "operate on" the operands. For example, in the equation, 4 - 6 = 3, the operands are 4 and 6. 15 Groups A "group" is a set G together with a binary operation "-" defined within the set G such that the following three conditions are satisfied: (i) Given x, y, z e G, then x - (y - z) = (x -y) - z. This is known as the associative 20 property of the group. (ii) There exists a unique element I e G, such that x -I = I -x = x, for all x e G. The element I is referred to as the "identity" element in G. (iii) Given any x G G, there exists an element x
-
' e G, such that x -x
-
' I. The element x
-
' is referred to as the "inverse" of x under the -operation. 7 WO 99/30458 PCT/US98/25824 The -operation is referred to as the "group operation." It is the existence of the group operation defined within the set G that allows G to be a group. In fact, G is said to be group under the operation. An "Abelian" group is a group G such that given any x, y e G, then x .y = y -x. As an example of an Abelian group, consider the set F {1, 2, 3, 4, 5, 6} together with 5 the operation - given by or defined as x -y = (x -y) mod 7 for all elements x, y e F (the second "" represents the common operation of integer multiplication.) It is known that F is a group under this "multiplication operation." To demonstrate this, Table 1, which contains the values of x .y = (x -y) mod 7 for all possible combinations of elements x, y e F, is constructed below. To look up the value of x -y using the table, locate the cell that is at the intersection of the row whose label is 10 the value of x with the column whose label is the value of y. Table 2. The Multiplication Operation in F = {1, 2, 3, 4, 5, 6} Given by x .y = (x -y) mod 7 123456 1123456 2246135 3362514 4415263 5531642 1 2 3 4 5 6 1 1 2 3 4 5 6 2 2 4 6 1 3 5 3 3 6 2 5 1 4 4 4 1 .5 2- 6 3 5 5 3 1 6 -4 2 6 6 5 4 13 2 1 As an example, note that if x = 5 andy = 6, the table gives x -y = 2. To verify the 15 accuracy of this, note that x .y =5 - 6 = (5 - 6) mod 7 = 30 mod 7 = 2. Given the above definitions for and F, the task of verifying that F is a group is tantamount to verifying that conditions (i), (ii), and (iii) above are satisfied: (i) Condition (i) provides that x. (y. - z) = (x -y) • z. Using x=3, y=5 and z=2, consider that 3 -(5 - 2) - 3 ((5 - 2) mod 7) 3 . (10 mod 7) 3 3 = (3 - 3) 20 mod7 9 mod7 = 2: and that (3 - 5) .- 2 (3 - 5) mod 7) - 2 = (15 mod 7) - 2 8 WO 99/30458 PCTIUS98/25824 1 .2 = (1 -2) mod7 == 2 mod 7 = 2. Therefore, (3 - 5) .2 =3 - (5 -. 2). (ii) Table 1 demonstrates that the identity element ofF under the group operation -is 1. For, as the table shows, x -1 = I -x = 1 for all x e F. (iii) Using Table 1, the following values for the inverse, x
-
', of each element x ofF 5 (where x -x
-
' = 1) can be derived: 1-' = 1, 2
-
i = 4, 3 - 1 = 5, 4 - 1 =3, 5
-
' = 3, and 6
-
' = 1. (iv) Examining Table 1 also establishes that for all x, y E F, x .y = y x. Hence, F is an Abelian group under the multiplication operation. Sometimes, the symbol + is used to denote the group operation in F. In such cases, the 10 inverse of any element x c F under + is denoted by -x rather than x
-
i . As another example of an Abelian group, consider the set F = {0, 1, 2, 3, 4, 5, 6} together with the operation + given by or defined as x - y = (x + y) mod 7 for all elements x, y e F (the second "+" represents the common operation of integer addition.) It is known that F is a group under this "addition operation." To demonstrate this, Table 2, which contains the values of x - y = (x + y) mod 7 for all possible 15 combinations of elements x, y e F, is constructed below. Table 2. The Addition Operation in F = {0, 1, 2, 3, 4, 5, 6} Given by x + y = (x + y) mod 7 S0 1 2 3 4 5 6 0 0 1 2 3 4 5 6 1 1 2 3 4 5 6 0 2 2 3 4 5 6 0 1 3 3 4 5 6 0 1 2 4 4 5 6 0 1 2 3 5 5 6 0 1 2 3 4 6 6 0 1 2 3 4 5 As an example, note that if x = 5 andy = 6, the table gives x + y = 4. To verify the 20 accuracy of this, note that x y 5 6 (5 - 6) mod 7 11 mod 7 4. 9 WO 99/30458 PCT/US98/25824 Given the above definitions for + and F, the task of verifying that F is a group is tantamount to verifying that conditions (i), (ii), and (iii) above are satisfied. (i) As an example of condition (i) holding, consider that (3 + 5) + 2 = ((3 - 5) mod 7) + 2 = (8 mod 7) + 2 = 1 + 2 = (1 2) mod 7 = 3 mod 7 = 3; and that 3 + (5 + 2) 5 =3 +((5 + 2) mod 7) =3 +(7 mod 7) =3+0= (3+0) mod7 = 3mod7 =3. Therefore, (3 +5) +2 - 3 +(5 +2). (ii) Table 2 demonstrates that the identity element ofF under the group operation - is 0. For, as the table shows, x + 0 = 0 + x = 0 for all x e F. (iii) Using Table 2, the following values for the inverse, -x, of each element x ofF 10 (where x (-x) = 0) can be derived: -0 = 0, -1 = 6, -2 = 5, -3 = 4, -4 = 3, -5 = 2, and-6 = 1. (iv) Examining Table 2 also establishes that for all x, y e F, x + y = y - x. Hence, F is an Abelian group under the addition operation. 15 Fields A "field" is a set F together with two binary set operations + and - defined within F such that the following conditions are met: (i) F is an Abelian group under the + operation. The + operation is referred to as the "addition operation" of the field. The identity element of the field under the 20 addition operation is denoted as 0. Given any element x e F, the inverse of x under the addition operation of the field is denoted by -x, which is referred to as the "additive inverse" of x. (ii) If 0 were to be removed from the set F, the resulting set would be an Abelian group under the - operation. The - operation is referred to as the "multiplication 10 WO 99/30458 PCT/US98/25824 operation" of the field. The identity element of the field under the multiplication operation is denoted as 1, which is an element ofF distinct from 0. Given any element x e F, the inverse of x under the multiplication operation of the field is denoted by x
-
', which is referred to as the "multiplicative inverse" of x. 5 (iii) Given any x e F, then x - 0 = 0 -x = 0. (iv) Given any x, y, z c F, then x - (y + z) = (x -y) + (x -z). This is known as the "distributive property" of the field. An example of a field is the set F= {0, 1, 2, 3, 4, 5, 6} together with the + operation defined as x + y = (x + y) mod 7 and the operation defined as x .y = (x -y) mod 7 for all x, y 10 F. It is known that F forms a field under these addition and multiplication operations. To demonstrate this fact, it is necessary to show that the four conditions described above are satisfied. Conditions (i) and (ii) where shown to be satisfied in the previous Section. Condition (iii) is evident from the Table 3, below. Table 3. The Multiplication Operation in F = {0, 1, 2, 3, 4, 5, 6} 0 1 2 3 4 5 6 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 2 0 2 4 6 1 3 5 3 0 3 6 2 5 1 4 4 0 4 1 5 2 6 3 5 0 5 3 1 6 4 2 6 0 6 5 4 3 2 1 15 As an example of condition (iv) holding, we will show that 3 - (5 + 6) = (3 - 5) + (3 - 6). Indeed, 3 - (5 + 6) = (3 - ((5 - 6) mod 7)) mod 7 = (3 - (11 mod 7)) mod 7 = (3 - 4) mod 7 = 12 mod 7 = 5, while, (3 - 5) + (3 - 6) = (((3 - 5) mod 7) - ((3 - 6) mod 7)) mod 7 = ((15 mod 7) (18 mod 7)) mod 7 = (1 + 4) mod 7 - 5 mod 7 = 5, too. 20 A field F is a "finite field" if it has a finite number of elements. The field F above is a 11 WO 99/30458 PCT/US98/25824 specific example of a family of finite fields known as GF(p), where p is any prime number. Given a particular prime number p, GF(p) is defined as the set {0, 1, ..., p-1} of non-negative integers less than p, together with the addition operation + given by integer addition modp, and the multiplication operation -given by integer multiplication modp. The field F used in the above 5 example is the field GF(7). Field Arithmetic The mathematical concept of fields is an abstraction of the familiar "rational" number system. The rationals are the set of all integers together with all numbers that can be represented 10 as a fraction whose nominator and denominator are both non-zero integers. The set of all rational numbers can in fact be shown to be a field under the common operations of addition and multiplication of fractions. As such, common mathematical techniques of arithmetic have also been carried over to the more abstract domain of fields. Given a particular field F, mathematical field theory allows the writing and evaluation of "valid" arithmetic expressions and equations 15 whose constants and variables "come from the field, " i.e. are members ofF. For instance, consider the equation y = (2 -x) + 1. The set of all ordered pairs (x, y) of rational numbers that satisfy this equation includes such elements as (0, 1), (2, 5), (4, 9), and (3.45, 7.9). However, since the constants in this equation, 2 and 1, are also members of the field GF(7), the "expression" (2 -x) + 1 is a valid expression in GF(7), meaning that as long as the 20 value that is substituted for x in the expression is a member of GF(7), it is guaranteed that the expression will "evaluate" to a valid member of GF(7). As such, the equation itself is a valid equation in GF(7), too. In fact, the set of all "solutions" to this equation, i.e. the set of all ordered pairs that satisfy the equation in GF(7), is equal to {(0, 1), (1, 3), (2, 5), (3, 0), (4, 2), (5, 4), (6, 6)}. 12 WO 99/30458 PCT/US98/25824 To facilitate working with more complicated expressions, a few mathematical shorthands are utilized in field arithmetic. Given any field F, any element x e F, and any positive integer k, the expression xk represents that unique element ofF which results when x is multiplied by itself k times using the multiplication operation in F. In other words xk = x • x ... x, where there are k-1 5 many - operators in the expression. By convention, xo is defined to be equal to 1. Given any integer k and any element x in F, the expression kx represents that unique element ofF which results when x is added to itself k many times using the addition operation in F. In other words, kx = x + x + ... + x, where there are k-1 many + operators in the expression. Given c a constant in F and x a variable defined over F, the expression c -x is commonly 10 written as cx. Furthermore, given x and y, any two elements ofF, the expression x - (-y) is commonly written as x - y. Given a field F and any element x in F, the task of computing x's additive inverse, -x, or x's multiplicative inverse, x
-
', may be computationally intense. It is possible to view the task of computing the inverse ofx as a set operation. A "unary set operation" T defined within a set S is a 15 mapping from S onto S. The word unary underscores the fact that unlike binary set operations, the domain of T is made up of single, individual members of S. Given any element x of S, let T map x to x
-
i . In other words, let T(x) = x
-
i. Then T is a unary set operation. Given a particular field F and an integer k, a polynomial p(x) of order k defined over F is an expression of the form p(x) = akx -akIX k- + ... + a 1 x + ao. In this definition, x is a variable in 20 F, meaning that before the expression is evaluated, some particular element ofF must be substituted for x in the expression. The particular member ofF which is substituted for x is the value that x is "bound" to. The a,'s (0 i k) are known as the "polynomial coefficients" ofp(x) and are constants in F, meaning that they are chosen before a value for x is selected, and that regardless of the value that x takes on. the values of the polynomial coefficients remain the same. 13 WO 99/30458 PCT/US98/25824 When F = GF(2), the set of all polynomials of degree k defined over GF(2) is referred to as GF(2k). It is known that given any k greater than 1, specific addition and multiplication operations can be defined within GF(2k) in such a way so that GF(2k) forms a field under such operations. The set GF(2k) is the set of all polynomials of order k whose polynomial coefficients 5 are either 0 or 1. For instance, p(x) = x + x 1 is a member of GF(2 5 ) whose polynomial coefficients are given by a 5 = 1, a 4 = 0, a 3 = 0, a 2 = 1, a, = 0, and ao = 1. Optimizing Field Arithmetic Calculations In addition to the fields of information security and cryptography, there are numerous 10 other problems in business and science, which are either based on or utilize the mathematics of finite fields. Computer applications dealing with such problems often need to carry out calculations involving finite field arithmetic. This often takes the form of evaluating a mathematical expressionfinvolving a finite number of constants, variables, coefficients and operations defined within a finite field F. Note that variables and constants must be members of 15 the field F, but coefficients may take any integer value. Coefficients, such as the 5 in the expression x - 5 y, are not elements of the field F, and merely represent a shorthand notation for repeated addition, in this case 5 y = 2 y + 2 y + y, where 2 y = y - y. Since computational efficiency is of concern, we will assume that if the same quantity occurs in more than one part of an expression, such as (x 2 -x) -' does above, each such quantity is only computed once. Also, 20 without loss of generality, the expressionf can and will be assumed to be in fully reduced form, in which all calculations in the expression that involve only constants have already been performed, and the resulting constants substituted into the expression. As an example of such an expression, let F e GF(p), let x;, x 2 , yl, Y2 be variables defined in F let a be a constant that is some element from F, and define, 14 WO 99/30458 PCT/US98/25824 f = ((y2 -y;) " (x, -x;) -) - ((y2 - a) - (x2 -x;) -i) -x, - 5 x2 Since the only variables and constants in the expressionf are x], X 2 , Yl, y2 and a, the expressionf involves a finite number of field elements. Furthermore, the expressionf involves four unary additive inversion operations to calculate -xi, -x 2 , -y;, and -a, a single unary multiplicative 5 inversion operation to calculate (x 2 - x) -', three binary multiplication operations, three binary addition operations to calculate 5 x 2 , four binary addition operations to calculate the expressions in parentheses, and two binary addition operations to calculate (...) - x - 5 x 2 . Hence, the expressionfinvolves a finite number of field operations, too. Consequently, when the expressionf is evaluated, that is, when the calculations specified in the expressionf are carried out, the result 10 of the calculation is going to be a single element in the field F. Any given expressionfdefined within a finite field F is usually composed of "subexpressions." Any part of the expressionf which by itself is a valid expression in F is a subexpression off For instance, the expression s = (x 2 - x) -' is a valid expression in F, if both x 2 and x, are members ofF. Therefore s = (x 2 -x 1 ) is a subexpression of the expressionf = ((y2 15 y) - (x 2 -x;) -'i)- ((Y2 -y) - (x 2 - x ) - -x -x 2 . Some of the other subexpressions of fare s = x,, s = -yl, and s = (y2 -y) Y - (x 2 - x) -'. Note, however, that and s = x 2 - x) -'1) - x is not a subexpression off, because s is not a valid expression in F. Every expressionf is a subexpression of itself Given an expressionf defined within a finite field F, the task of evaluating the expression f 20 can be computationally intense. Techniques that allow efficient calculation of such expressions in computer software and/or hardware may have significant business and scientific value. Given the exact nature of the applications such calculations occur in, different criteria may be used to determine what exactly constitutes an "efficient" calculation. In certain applications, it may be desirable to optimize calculations so that higher computation speeds are achieved. In other 15 WO 99/30458 PCT/US98/25824 applications, it may be important to optimize for minimal use of silicon area in hardware implementations. Still other applications may benefit from optimization that allow parallel computation of the calculations. In particular, the inversion operation, which in the fields GF(p) and GF(2k) uses the Fermat method, is computationally very intensive. To avoid this, methods of 5 formulating problems in "projective coordinates" have been developed, by Menezes and others, which allow calculations to be reformulated in a manner that removes the need to perform any inversion operations, usually at the expense of increasing the number of other operations. The Montgomery Algorithm 10 In 1985, P. L. Montgomery published an algorithm which can be used to optimize the task of computing an expression of the formf = a -b -r "
-
', where a, b, and r are elements of a field F e GF(p) and -is the multiplication operation in F. Since 1985, some Work in industry and academia has been focused on extending the use of the Montgomery algorithm to expressions of a more general form thanf = a -b -r -'. To facilitate discussion of such efforts, this patent defines 15 the term "Montgomery Canonical Form." Given a particular element r of a field F, an expressionf in F is recursively defined to be in the Montgomery Canonical Form with respect to r as such, (i) An expressionf is in the Montgomery Canonical Form with respect to r, if it does not contain any field multiplication operations and also does not contain r. That is, if no subexpression s exists of the form s = s, • S 2 , where s, and s 2 are subexpressions off For 20 example, the expressionf = (x; - xi - a) and the expressionf = xi are both in the Montgomery Canonical Form with respect to r. (ii) An expressionf is in the Montgomery Canonical Form with respect to r, if it can be written in the form off .f -f- -r ', where f, andf 2 are both subexpressions off which are themselves in the Montgomery Canonical Form with respect to r. Note that to 16 WO 99/30458 PCT/US98/25824 determine whether or not an expression is in Montgomery Canonical Form with respect to r, the expression is to be considered in isolation. For example, the expressionf = (xl + x; + x;) -x, -r -1 is in the Montgomery Canonical Form with respect to r. However, f = x; S(x 2 -x 2 ) -r
-
' is not in the Montgomery Canonical Form with respect to r, since although 5 (x2 -x 2 ) -r
-
' is in the Montgomery Canonical Form with respect to r, the single factor of r
-
' cannot simultaneously be considered to be part of the subexpression (x 2 -x 2 ) -r - 1 ' and also of the whole expression, so (x 2
X
2 ) is not in the Montgomery Canonical Form with respect to r. (iii) An expressionf is in the Montgomery Canonical Form with respect to r, if it can be 10 written in the form off = (s) -i'. r 2 where s is a subexpression off which is itself in the Montgomery Canonical Form with respect to r. For example, the expressionf = (x 2 -x1) ' r 2 is in the Montgomery Canonical Form with respect to r. And finally, (iv) The expressionf is in the Montgomery Canonical Form with respect to r, if whenever there exists a subexpression s off which can be written as s = s, - s 2 , where s; and s 2 are 15 subexpressions off which are both in the Montgomery Canonical Form with respect to r, then there exists a unique subexpression s 3 off such that s 3 = SI S2 ' -1. For example, the expressionf = (((xl - x1 + x;) -X 1 r-' + a) - z -r-') - (((x x, + x) -x, -r
-
' + a) z r-') -r-' -x, -x; is in the Montgomery Canonical Form with respect to r. 20 Given a field F e GF(p) and an element r e F, the Montgomery algorithm can be applied effectively to optimize computation of any expressionf in F which is in the Montgomery Canonical Form with respect to r. Given an arbitrary expressionf, then, there may be efficiencies gained by "transforming" the expression f into some other expressionf'(read as "f prime") which is in Montgomery Canonical Form. During the past decade.and a half, an innumerable number of 17 WO 99/30458 PCT/US98/25824 expressions involving a finite number of operations within finite fields in GF(p) have been encountered within the confines of specific applications in business and academia. In some instances, researchers and engineers have transformed certain such expressions into other expressions which are in the Montgomery Canonical Form, and which are therefore faster to 5 compute. Until the present invention, however, no general method for transforming any arbitrary expression involving a finite number of field operations in GF(p) into an expression that is in Montgomery Canonical Form with respect to some r in GF(p) has been known. A particular expression that is commonly encountered in business and academic applications involving fields in GF(p) is one of the formf = xk, where k is some positive integer 10 and x is an element in F e GF(p). Calculatingf = xk is known as the exponentiation of x. It is well known that a particular "substitution technique" described in the next section in this document can be applied to the expressionf = xk to transform it into another expression, f' which is in Montgomery Canonical Form with respect to some particular element r in F. The Montgomery algorithm is commonly applied to the resulting expressionf'to provide an efficient method for 15 exponentiation of x. Although the Montgomery algorithm has been used for over a decade for fast exponentiation in GF(p), no method for extending its speed improvements to general finite field calculations has been available until the present invention. In 1998, C. K. Koc and T. Acar published an algorithm which can be used to optimize the 20 task of computing an expression of the formf = a -b -r
-
', where a, b, and r are elements of a field F e GF(2 k ) and -is the multiplication operation in F. This algorithm is referred to as the Montgomery Algorithm in GF(2k). The Montgomery Algorithm in GF(2k) has been applied in the past to speed up exponentiation in GF(2 k ) in a manner analogous to the method used for speeding up exponentiation in GF(p). Until the present invention, however, no method for extending the 18 WO 99/30458 PCT/US98/25824 speed improvements of this algorithm to general finite field calculations has been available. Substitution Technique This section describes a particular substitution technique that is often used to manipulate 5 expressions involving elements and operations defined within a field F. The technique involves replacing all instances of a specific pattern of operations and/or operands inf with another specific pattern. As an example, let x andy represent any member ofF and let a, b, c, and r be specific elements in F. Then, if all occurrences of the pattern x -y inf = (a - b) + (c - b) are replaced by the pattern x -y • r, the resulting expressionf'is given byf' = (a - b - r) + (c - b -r). To facilitate 10 discussion of the technique, let s be an expression that represents the pattern that is to be replaced. The expression s is called the "source" expression. Let t be an expression that represents the pattern that s is replaced with. The expression t is called the "target" expression. The rest of this section describes how the current substitution technique is applied to three simple types of source expressions. 15 Case 1. The source expression s involves no operators In this case, the source expression s is given by s = x, where x stands for any single variable within the expressionf The substitution technique simply replaces all occurrences of the variable represented by the source expression s by the pattern given by the target expression t. 20 Case 2. The source expression involves a single unary operator In this case, the source expression is given either by s = -x or s = x', where x stands for any subexpression of the expressionf Here, the substitution technique calls for constructing the set S of all subexpressions off that "match" the source expression s. In other words, the set S is 19 WO 99/30458 PCT/US98/25824 given by the set of all subexpressions s of the expressionf which are of the form s = x or s = x
-
C
, where x is itself a subexpression off. Note that given any two subexpressions off in the set S, one may be a subexpression of the other. The substitution technique works by replacing each member of the set S by the corresponding pattern given by the target expression t, except that 5 before the substitution technique is applied to any member s of the set S, it is first applied to any other members of S that s is a subexpression of Case 3. The source expression involves a single binary operator In this case, the source expression is given either by s = x + y or s = x -y, where x and y 10 stand for any subexpressions of the expressionf Here, the substitution technique calls for constructing the set S of all subexpressions off that "match" the source expression s. In other words, the set S is given by the set of all subexpressions s of the expressionf which are of the form s = x + y or s = x • y, where x and y are themselves subexpressions off. Note that given any two subexpressions off in the set S, one may be a subexpression of the other. The substitution 15 technique works by replacing each member of the set S by the corresponding pattern given by the target expression t, except that before the substitution technique is applied to any member s of the set S, it is first applied to any other members of S that s is a subexpression of A substitution technique similar to this has been used in business and industry in the past in 20 a two-step process to transform instances of simple expressions, of the formf = xk, into another expressionf'which is in Montgomery Canonical Form. To illustrate an example, this will be demonstrated for the case when k = 4, which means that the expressionf is given byf = X = x -x Sx .x = ((x .x) -x) -x. (i) Let the source expression s be given by s x -y. Let the target expression t be given by t 20 WO 99/30458 PCT/US98/25824 Sx -y - rF', where r is a constant in the field F. Applying the substitution technique to the expressionf = ((x - x) -x) x yields the expressionf' ((x x -F') x -rF) -x - rF'. Note that the expressionf'is in the Montgomery Canonical Form, since every subexpression off'enclosed in parenthesis is in the Montgomery Canonical Form with 5 respect to r. Because of this, the following step can allow the Montgomery algorithm to be applied to efficiently calculatef'. (ii) Let the source expression s be given by s = x, where x stands for a variable or constant in f Let the target expression t be given by t = x -r. Applying the substitution technique to replace every occurrence ofx with x -r in the expressionfj = ((x - x -r) -x F') -x t 10 yields the expressionf' = (((x - r) - (x -r) * F) (x - r) F') (x - r) F'.. This substitution technique allows efficient computation off = xk, because it can be shown that the expressionfis equivalent tof = f' r
-
'. To see this in the case k = 4, note that f'= (((x r) (x - r) •r
-
F) - (x -r) r
-
F') - (x - r) • F = ((x .r .x .r r') .x .- r
-
F') -x r r 15 = ((r x x r
-
) *x .r
-
f) .x r * =((r.x.x.1) x .1) x 1 =((r -x -x) -x) .x = r - (((x -x) .x) .x) = r - x4 Therefore, f'- r
-
' = r • x 4
•
-1 = x 4 r r
-
' = 4 1 = x 4 =f Sincef'is in the Montgomery Canonical Form with respect to r, it is in general more efficient to computef' - rF', which itself is in the Montgomery Canonical Form, than it is to computef directly. 20 Elliptic Curve Groups An elliptic curve, G, is a mathematical group that is constructed over a specific field F, according to a specific set of rules that depend on the exact nature ofF. In general, G is a subset of f' x F, and the operation in G is defined in terms of the field operations - and - on the 21 WO 99/30458 PCT/US98/25824 elements of F that constitute the ordered-pair elements of G. The two most commonly studied classes of elliptic curves are those constructed over fields belonging to GF(p) or GF(2k) Elliptic Curves over GF(p) 5 An elliptic curve over GF(p) is defined by selected parameters a and b (both members of GF(p)) as the set of the all ordered pairs (x, y) that are solutions to the equationy 2 = x 3 + ax + b, where x, y are members of GF(p) together with an extra point O, usually named as the point at infinity. It is assumed that p is a prime number greater than 3 and a, b in GF(p) are selected such that 4a 3 - 27b 2 0 in GF(p). It has been well established that points on the elliptic curve and O 10 form an Abelian group with respect to the following point addition rules: Equations A 1. O+O=0 2. (x, y) + O = (x, y) 3. (x, y) -- (x, -y) == O 15 4. Addition of two distinct points: (x;,y) - (x 2 ,y2) -3,y3) L = (y2 -y) (x2 -x;) x3 = (L -. L) -x; -x 2 y3 = L - (x; -x 3 ) -y1 5. Doubling of a point: (x 1 ,y;) + (x;,y) = (x 3 ,y 3 ) 20 L = (3x, -x + a) - (2y; x3 = (L L) - (2x ) y3 = L (x; -x3) -y, where the operations , -, , and inverse (-i) are performed in the field GF(p). The above rules define the method by which two points on the elliptic curve are "added" to get a third point. 22 WO 99/30458 PCT/US98/25824 These equations will be referred to in the future as Equation A. Example 2 3 The elliptic curve equation y x + x + 1 over the field GF(23) will be illustrated. It 5 turns out there are 28 points on the curve including the special point O. These points are Point O (0,1) and (0,22) (1,7) and (1,16) (3,10) and (3,13) 10 (4,0) (5,4) and (5,19) (6,4) and (6,19) (7,11) and (7,12) (9,7) and (9,16) 15 (11,3) and (11,20) (12,4) and (12,19) (13,7) and (13,16) (17,3) and (17,20) (18,3) and (18,20) 20 (19,5) and (19,18) For example, (1, 7) is on the elliptic curve because it satisfies the equation y 2 3 x in the field GF(23) (that is, modulo 23) because 72 3 + 1 + 1 mod 23; 49 = 3 mod 23; and 3 = 3 mod 23. The point addition of(3,10) and (9,7) is computed using arithmetic modulo 23, or the field 25 arithmetic of GF(23): 23 WO 99/30458 PCT/US98/25824 L = (7-10) - (9-3)-' = (-3) - 6-' (-3) 4 = -12 11 x3 = (11 .- 11) -3 -9 = 121 -12 = 109 = 17 y3 = (11 (3-17)) -10 = -164 = 20 Therefore, the addition of (3,10) and (9, 7) equals (17,20). This example illustrates that the 5 addition of two points on the curve using the above rules gives a third point on the curve. Elliptic Curves over GF(2k) A non-supersingular elliptic curve over the field GF(2k) is defined by the parameters a and b in GF(2k), with b # 0, as the set of solutions (x, y) to the equation y + xy = x + ax 2 + b 10 together with the extra point O. This set of points form a group with respect to the addition rules: Equations B 1. 0 0=0 2. (x, y) + O = (x, y) 3. (x, y) + (x, x+y) = 0 15 4. Addition of two distinct points: (x;,yl) - (x2,Y2) = (x 3 ,y 3 ) L = (y - y 2 ) - (xl - x,)
-
) x3 = (L -L) - L - x; - x, - a Y3 = (L - (x + x 3 ) ) + x 3 + y; 5. Doubling of a point: (x;,y;) + (x;,y;) = (x 3 ,y3) 20 X3 X1 XI + b -(x;-' ) -(x; - ) y3 = x; x; + (x; + y -XI-1) -x 3 X3 Point Multiplication An elliptic curve cryptographic operation, whether it is an encryption, a decryption, a 24 WO 99/30458 PCT/US98/25824 signature, or a key-pass operation, always involves the computation of eP given e and P, where P is a point on the curve and e is a positive integer. The reverse of this operation, i.e., the computation of e given P and eP is known to be very difficult. This is called the elliptic curve discrete logarithm problem, for which no efficient algorithm is currently known. 5 Since the addition operation in the elliptic curve group, G, is defined using a series of field operations from the underlying field, F, given two points P and 0 in G, computation of P + Q or P + P requires computation of a series of operations in the field. In particular, ifF E GF(2k), the equations 4 above show that computation ofP 0 requires one field inversion, three field multiplications, and nine field additions. On the other hand, the computation ofP + P requires 10 one field inversion, three field multiplications and five field additions, as demonstrated by equations 5. If e is about 500 bits in length, the number of elliptic curve operations (additions and doublings) necessary to calculate eP can be shown to be about 750. Each elliptic curve operation involves several (about 15-20) finite field operations. If the value ofk (from F C GF(2k)) is also 15 high (>100), these computations consume a significant amount of time, particularly in software. Therefore, fast hardware and software implementations of elliptic curve point multiplications are highly desirable in cryptography. The following example in GF(23) illustrates various approaches that can be taken towards optimizing the calculation of eP. Let e = 18 and P = (3,10). Then eP = 18(3,10) can be calculated 20 by successively adding (3,10) to itself 18 times using group addition as defined in equation A: P P + ... - P (18 copies of P), which requires 17 elliptic curve point addition operations. However, there are faster algorithms known as "exponentiation methods," one example of which is a "binary method," shown below, which allows 18P to be computed as Step 1: (P) - (P) -- 2P 25 WO 99/30458 PCT/US98/25824 Step 2: (2P) (2P) = 4P Step 3: (4P) + (4P) = 8P Step 4: (8P) + (8P) = 16P Step 5: (16P) + (2P) =18P 5 Thus, only 5 point additions, or group operations, are utilized. The partial results as well as the final results are points on the curve as illustrated below: Step 1: P + P = 2P (3,10) + (3,10) = (7,12) Step 2: 2P + 2P = 4P : (7,12) + (7,12) = (17,3) Step 3: 4P + 4P = 8P (17,3) - (17,3) = (13,16) 10 Step 4: 8P + 8P = 16P (13,16) - (13,16) = (5,19) Step 5: 16P + 2P =18P : (5,19) - (7,12) = (6,19) Thus, 18(3,10) is (6,19). The elliptic curve discrete logarithm problem then becomes: knowing (3,10) and (6,19) and that (6,19) is an integer multiple of (3,10), what is this integer? The integer used for this example is equal to 18. 15 Given the binary representation of e as ek-1ek-2...e2eeo, the computation of eP can be accomplished using the binary method or any other M-ary method. For example, in order to compute Q = eP, the binary method proceeds as follows: Q:= O for i = k - 1 downto 0 20 Q:=Q+Q if e, = 1 then Q := Q + P return Q. Therefore, the computation of Q is performed by a series of elliptic curve point doublings (0 : 0 - Q) and point additions () : - P). 26 WO 99/30458 PCT/US98/25824 SUMMARY OF THE INVENTION The present invention optimizes the calculation of Elliptic Curve Cryptography computations through a transformation method that permits the use of any elliptic curve defined 5 over any field F in a secure and efficient manner. The invention includes a method and apparatus for producing an elliptic curve point multiplication product, Q = eP. The invention utilizes an arbitrary integer e, and a point P on an elliptic curve group G defined over a field F, where the group G is a subset of the field F crossed with the field F. The present invention constructs a set G', a mapping Tfrom G into the set G a mapping T' from G'onto G, and an operation G 10 defined on G' such that (a) given the point P, T'(T(P)) = P, and (b) P-P = T-'(P'G P), where P'= T(P). An elliptic curve point multiplication product Q is produced by transforming the point P to the point P' using the mapping T, performing the operation @ on the point P' to determine the point Q'= e P', and transforming the point Q' to the product Q using the mapping T'. The product Q is used in an elliptic curve cryptographic operation. 15 The present invention also includes a method for optimizing the calculation of cryptographic operations involving arbitrary expressions in finite field arithmetic through a transformation method that permits the use of any field F in an efficient manner. The invention includes a method for transforming any arbitrary finite calculation in any finite field into a canonical form in which other previously known algorithms can be applied, thereby achieving 20 increased calculation speed and efficiency. The present invention teaches a set of transformations of the cryptographic calculations that allows the use of other known techniques that have only been applicable to certain limited special cases prior to this invention. 27 WO 99/30458 PCT/US98/25824 DETAILED DESCRIPTION OF THE INVENTION The present invention provides a method for optimizing ECC computations for any curve in any field through focusing on one of the most computationally intense operations used in all 5 ECC implementations, known as "elliptic curve point multiplication." Point multiplication requires the computation of eP, where P is a point in the elliptic curve and e is a positive integer. This operation is central to many elliptic curve cryptography functions, including encryption, decryption, random number generation, key-exchange, digital signing, and signature verification. The present invention achieves efficient ECC by providing a methodology for optimizing the 10 implementation of the elliptic curve point multiplication operation. The present invention can be utilized to implement ECC over any curve in any field, including all individual member fields in GF(p) and GF(2k). The present invention further provides a methodology for optimizing computation of calculations involving a finite number of arbitrary field operations within any finite field. These 15 calculations play a key role in computer implementations of numerous systems, including elliptic curve cryptosystems. The present invention provides a "transformation method" which can be used to enable optimized implementations of elliptic curve cryptographic systems in hardware and software. The present invention, because it employs a reversible transformation applied to the 20 elements of the elliptic group, does not in any way alter the fundamental security properties of the mathematical algorithm used to perform the elliptic curve cryptography. The security of the overall ECC algorithm is determined by the choice of elliptic curve equations, number representation, arithmetic algorithms and other implementation aspects. As long as these choices are made according to reliable standards, the security of the implementation is not affected by use 25 of the present invention. 28 WO 99/30458 PCT/US98/25824 The present invention can be used in any and all potential ECC applications, ranging from software for secure distribution of digital products such as movies and songs to hardware chips embedded in consumer electronic products such as cellular phones and smart cards. The cost saving potential of the present invention can significantly enhance existing commercial 5 applications and make previously infeasible business opportunities economically viable. Section A Given G cF x F, an elliptic curve defined over the field F, the present invention provides an improved method to optimize the computation of eP, where e is an integer and P is an element o10 ofG. The present invention includes: (1) construction of a set G' and a method for representation of the members of G' in software and/or hardware; (2) construction of and implementing an algorithm for a first mapping, T, from G into the 15 set G' in software and/or hardware; (3) construction of and implementing an algorithm for a second mapping, T', which acts as the inverse of T, from G'onto G, in software and/or hardware; and (4) construction of and implementing an algorithm, in software and/or hardware, for a set operation (9, defined in G' For each invention, the following three conditions are satisfied: 20 (i) given any P E G, then T
-
'(T(P)) = P; (ii) given any two points P and S in G, then P + S T-'(P' @ S), where P' = T(P) and S' - T(S); and (iii) G , T, G, and T
-
' and the corresponding algorithms are chosen such that given P;, P2, I. P\- E , where N is an integer, computation of f'( T(P;) 7'(P2) 9 ... 9 T(P.\)) is in 29 WO 99/30458 PCT/US98/25824 general more optimized than computation of P, - P 2 - ... P. In other words, the present invention computes Q = eP by first transforming the given point P to a transformed point P'using the algorithm for the first mapping T, then calculating the multiple sum Q'= eP'using a "transformed," more computationally optimized version of the 5 elliptic curve addition operation ( @ ) in the transformed domain, and finally transforming Q'back to Q using the algorithm for the second mapping, T
-
'
. Note that satisfaction of the conditions (i) and (ii) above ensures that this method can be applied to any point P belonging to G. Under certain circumstances, when G' T, T7
-
', and 8 are chosen carefully, it is possible to optimize computation of the point multiplication operation. Depending on the number of point 10 additions to be performed, the additional cost of transforming the elements of G may or may not outweigh the improvements due to more optimized calculations in the transformed domain G' Section B The present invention further provides a particular method for construction of G' T, and 15 T
-
' that can be applied to any elliptic curve group G. Since G is a subset ofF xF, points in G can be written as ordered pairs (x, y), where x and y are elements of the field F. The present invention provides that a particular member r of F is first selected. The element r may be selected to be any member of the field F. Let t be the mapping from G into F xF that maps any point P = (x, y) in G to some point P'= (x' y) in G' 20 The present invention provides that t(P) = t((x, y)) = (x -r, y -r) = P' Since x, y, and r are all members ofF, so are x -randy -r. The present invention provides that G'is the image of G under t. In other words, G'is the set of all elements ofF xFthat have a point in G mapped to them by t. The present invention further provides that T is the transformation from G onto G'such that given any point P in G, then T(P) = t(P) = P' While P' - (x' y) is necessarily a member F x 30 WO 99/30458 PCT/US98/25824 F, it is not necessarily a point in the elliptic curve group, G. P'can be obtained by computing x' = x .randy'=y -r. Let Q'be any element of G' Since G'c F xF, we can write Q'= (u' v), where u'and v' are members ofF. Since G'is the image of G under t, then there must exist u and v, two elements 5 ofF, such that (ui, v) c G and u'= u - r and v' = v
-
r. Since u, v, and r are all members of the field F, then u = u'- r-' and v = v'- r
-
', where r-' is the inverse of r under the multiplicative operation of F. Therefore, one can construct an inverse transformation 7-T': G' - G by letting 7
-
' map Q' = (u v 9, any element of G' to (u'. r-', v' -r-'). In formal terms, this more detailed embodiment of the present invention includes the steps 10 of: (1) constructing G'as the subset ofF xF which is the image of G under the mapping t: G -F x F, where t is constructed by first selecting any element r ofF, and then letting t( (x, y)) = (x -r, y -r), where - is the multiplicative operation in F; (2) constructing the first mapping T: G -- G' by letting T(P) = t(P), where P is any point 15 in G; and (3) constructing the second mapping F-': G' -- G by letting 7-' ((u v)) = (u' -r -1 , v'. -r-'), where (u' v') is any element of G' Given the above choices for G' T, and T
-
', it may be possible to optimize calculation of eP may through careful definition of a @ operation in G'and careful selection of r. Certain values 20 of r, for instance, may provide faster software implementations, while others may enable more algorithmic parallelism. Section C Another detailed embodiment of the present invention applies the methods of Sections A 31 WO 99/30458 PCT/US98/25824 and B to the elliptic curves defined over the specific fields belonging to GF(p). In this embodiment, a new transformed operation @ is constructed such that conditions (i), (ii), and (iii) in Section A are satisfied. The present invention includes a method for optimizing calculations of eP when F is an 5 individual member field of GF(p). In this embodiment, G is an elliptic curve group over F e GF(p), and G T, T~' are constructed in accordance with the method of the invention described in Section B, above, through choosing an arbitrary element r ofF. The present invention constructs a "transformed" operation D in G'as follows. Given any two elements of G' (x , yl 9) and (x 2 Y29, then the present invention defines (xl', y) 9 (x2 Y29 to be given by (x 3 ' y39, where 10 Equations A' z' = (x 2 '- X1 2 L'= (y 2 '-y) z'. r-1 x 3 = L'.L'r
-
' -XI -x2 y3-L'= (x;'-x3) r - 1 -Y 15 Using the above definition of G for the operation of the "addition" of elements of G the present invention derives the following set of field equations for the operation of adding any "point" (xi'" y 9 in G'to itself: (x; 1 y 1 9 (x (X y ) = (x3" y3), where z' = (yl',+ y 9-1' . r 2 20 L'= ((x'+ xi'+ x') "x' "r
-
' + a) -z'. r-'
X
3 '= L'-L.r
-
' -xI'. x; y3' = L'. (Xl'-x39 r -1 -yl It is now shown how the present invention ensures that G' T, 7
-
', and 0 together satisfy 32 WO 99/30458 PCT/US98/25824 conditions (i), (ii), and (iii) set forth in Section A. (i) Let P be any point in the elliptic curve group G. Then there exist some elements x and y of Fsuchthat P = (x, y). Then T'(T(P) ) T( T((x, y))) = T'( (x -r, y r)) = (x - r r
-
1 , y -r -r
-
') = (x, y) = P. Therefore, Condition (i) in Section A is satisfied. 5 (ii) Given any two points P and S in G, then we need to show that P - S = T-F'(P' S), where P' = T(P) and S' = T(S). Let P = (x, y), P' = (x;', y 9, S = (x 2 , Y 2 ), S'= (x2 y2 , Q = P - S = (x 3 , y3) and Q'= P'+ S'= (x 3 ' y3). Then, applying the rules for point addition in the elliptic curve group given by Equations A, the coordinates of 0 are given by x3 = L -L - x, - x 2 and y 3 = L - (x, - x 3 ) - y;, where L = (y2 - y1) -z, and z - (x2 - x;-) 10 Equations A' above, on the other hand, give the coordinates for 0' As such, it can be shown that, z = (x 2 '-x;')-I . r 2 = (x2 - r - x - r)' =(X2 - xi) ' -r 15 =z -r L' = (y2'- Y z1 r = (y - r - yj r) .(z - r) .r S(y'2 -y) -z - r 20 =L r x 3 '= L' L' -r-' -x;'-x,' = (L .r) - (L -r) - r-' - x, r-x, r = (L L - x, - x2) - r 25 = x3 r I y 3 ' = L'- (x'-x3 " r-1 yl = (L •r) (x; -r-x3 r) r - -y;-r = (L (x - x 3 ) -y) r 30 =y3 -r Therefore, (x 3 y 3) = (x 3 -r, y3 -r), which implies that P' 69 S' = T(P - S), as required. Hence, Condition (ii) in Section A is satisfied. (iii) The present invention has provided a method for the selection of G', T, 0, and I' and 33 WO 99/30458 PCT/US98/25824 their corresponding algorithms in a manner such that given P, P,, ... , Pe G, where N is an integer, computation of 7-'( T(P,) T(P 2 ) ... 0 T(P)) is in general more optimized than computation of P + P, .. + Pv. To verify this, note that calculation of T(P) D T(P 2 ) - . T(Pv) involves repeated application of the expressions in 5 Equations A'. Note, however, that these expressions are in the Montgomery Canonical Form with respect to r. As such, the Montgomery Algorithm in GF(p) can be readily applied to the calculation of T(P;) 0 T(P 2 ) G ... D T(Pv) to create an optimized hardware and/or software implementation. Therefore, Condition (ii) in Section A is satisfied. 10 Section D Another detailed embodiment of the present invention applies the methods of Sections A and B to the elliptic curves defined over the specific fields belonging to GF(2k). In this embodiment, a new transformed operation @ is constructed such that conditions (i), (ii), and (iii) 15 in Section A are satisfied. The present invention further includes a method for optimizing calculations of eP when F is an individual member field of GF(2k). In this embodiment, G is an elliptic curve group over F E GF(2k), and G T, 7-' are constructed in accordance with the method of the invention described in Section B, above, through choosing an arbitrary element r ofF. The present invention 20 constructs a "transformed" operation E in G'as follows. Given any two elements of G' say (xl;', y ) and (x 2 ,' y2), then the present invention defines (xl yj) 9 (x 2 2 9) to be given by (x3' y3, where Equations B' S(.'- 29 -r34 34 WO 99/30458 PCT/US98/25824 L' = (yi' y2) -z'- r-1 x3'= (L' -Lr -l) + L'+ x;'i x 2 "+ a y3' = (L'. (x; "+ X3 -r -1 ) X3"+ yl" Using the above definition of @ for the operation of the addition of points in G' the 5 present invention derives the following set of field equations for the operation of "doubling a point", i.e. adding a point (xi ' y;) in G'to itself: (x i ' Y1) 9 (xI y ) = (x 3 ' y3), where z '= (x ')- ' r 2 x3"=x;"l -x ;' - (z' -z' r') -b' r -1 10 y 3 = x, x, r-1 (x +yl z' r
-
')
"
X3' r' - x 3 It is now shown how the present invention ensures that G' T, 7', and G9 together satisfy conditions (i), (ii), and (iii) set forth in Section A. (i) Let P be any point in the elliptic curve group G. Then there exist some elements x and y of 15 FsuchthatP = (x, y). Then f
-
'(T(P)) = T - ( T ((x,y))) = T -1 ((x -r, y -r)) = (x -r r -1, y - r -r
-
') = (x, y) = P. Therefore, Condition (i) in Section A is satisfied. (ii) Given any two points P and S in G, then we need to show that P + S = T-'(P 9 S), where P'= T(P) and S' = T(S). Let P = (x;, y), P'= (x; y; 9, S = (x 2 , y2), S'
"
= (x 2 ' y29, Q = P - S = (x3, y3) and Q'= P'+ S
"
= (x 3 ' y). Then, applying the rules for point 20 addition in the elliptic curve group given by Equations A, the coordinates of Q are given by x 3 = -L - L + x + X2 - a andy 3 =L -(x 1 + x 3 ) +X3 + yl, whereL = (y; + y2 ) z, and z = (x; - x2)'. Equations A' above, on the other hand, give the coordinates for 0 Q As such, it can be shown that, -1 25 f r x- -. r) -. 1r 35 WO 99/30458 PCT/US98/25824 (x - x2) -r ~z * r L' =(y' + y 2 9 "z' r 5 =(y -r +-y -r) (z -r) r = (y, + y2) "z r =L .r x3'= L'.L'.r -i + L'+ x;'- x,'+ a' 10 (L -r) (L r) r
-
' + L -r x -r - x 2 r - a' -r = (L .L + L + x, + x 2 a') r = x 3 - r y 3 '= L'.- (xl'+ x 3 ) r - +x3' +yl' 15 =(L.r).(x r + x 3 r) "r -1 -- X 3 r+yrl' S(L (xI + x 3 ) + X 3 +yl) r = y3 " r Therefore, we have (x 3 ' y39 = (x 3 'r, y3 -r) which implies that P' S'= T(P + S), as 20 required. Hence, Condition (ii) in Section A is satisfied. (iii) The present invention has provided a method for the selection of G' T, @, and T7 - 4 and their corresponding algorithms in a manner such that given P;, P 2 , ... , PN e G, where N is an integer, computation of f-'( T(P) e T(P 2 ) ... T(PN)) is in general more optimized than computation of P, + P 2 + ... + PN. To verify this, note that calculation of 25 T(P) G T(P 2 ) ... T(P,) involves repeated application of the expressions in Equations B'. Note, however, that these expressions are in the Montgomery Canonical Form with respect to r. As such, the Montgomery Algorithm in GF(2k) can be readily applied to the calculation of T(P) 9 T(P2) 9 ... T(PN) to create an optimized hardware and/or software implementation. Therefore, Condition (ii) in Section A is 3 0 satisfied. Section E The present invention further provides a method for achieving higher efficiencies when 36 WO 99/30458 PCT/US98/25824 utilizing the methods of Sections C and D above by providing specific choices of r. The present invention works with any element r in the field F over which the elliptic curve group G is defined. The exact choice of the element r, however, affects the computational characteristics of the resulting calculations. The present invention teaches that the selection of r 5 can optimize specific aspects of a software and/or hardware implementation within specific computer environments. For instance, choosing r to be a multiple of 32 can have beneficial effects on 32-bit computers. Given a particular selection of r, the calculation of a -b -r
-
' may be done in more than one way, some of which may be more computationally efficient. The following selections of r are preferred: 10 1. Field GF(p): r is selected as the smallest power of 2 that is larger than p. 2. Field GF(p): r can be selected as the product of k prime numbers, which gives the resulting algorithm a high degree of parallelism. 3. Field GF(2k): r is selected as xk mod n(x), where n(x) is the irreducible polynomial generating the field GF(2k). 15 Other selections of r for different fields are also possible. The transformation algorithms work independently of this selection. Section F The present invention further provides a method for optimizing calculation of a finite 20 number of arbitrary field operations over any finite field. Letf be a valid expression defined within F involving a finite number of variables, and a finite number of the field operations -, -, -, and The present invention provides a method for optimizing computation off, which includes carrying out the following steps in sequence: (1) Select r to be any single element of the field F. The element r, a constant, will be used to 37 WO 99/30458 PCT/US98/25824 transform the expression f into a new expression f'J"through applying a series of substitutions in accordance with the substitution technique described earlier in this document. If the expressionf already contains a constant or variable denoted by the symbol r, then rename the symbol r in this step-by-step procedure to some unique value, 5 and interpret the subsequent steps of this procedure as if r were renamed appropriately in them. Note that the expressionf may coincidentally contain constants or variables that may have the same field value as the selected element r, without affecting this procedure. Subsequent steps of this procedure will rely on the expressionf being initially free of "primed" symbols such as d' orj ". If the expressionf initially contains any variables or 10 constants which are denoted by "primed" symbols, then replace each primed variable or constant symbol with a unique unprimed name. Subsequent substitution steps of this procedure will employ source expressions containing primed symbols, which by convention in this patent are not allowed to match symbols that are not primed. Note that source expressions containing unprimed symbols, such as x, are allowed by convention in 15 this patent to match variable symbols or constant symbols which may be either primed or unprimed. (2) Transform the expressionf into the expressionf; by replacing all occurrences of the source expression x with the target expression x'. In this substitution, x denotes a variable or constant occurring in the expressionf This replaces all variables and constants with 20 primed symbols. Note that this occurs without affecting any coefficients that may exist in the expressionf (3) Transform the expressionfi into the expressionf2 by replacing all occurrences of the source expression x -y with the target expression x 0 y. In this substitution, x and y denote subexpressions off;, which should contain only primed symbols, and @ is used as 38 WO 99/30458 PCT/US98/25824 an alternate symbol to represent the multiplication operation in the field F. The purpose of this step is to label as 0 all of the original -operators occurring in the expressionf, to distinguish them from the -operators that will be introduced into the transformed expression during the following steps of this method. 5 (4) Transform the expressionf2 into the expressionf3 by replacing all occurrences of the source expression x-' with the target expression x
-
1 - r . In this substitution, x denotes a subexpression off 2 . (5) Transform the expressionf3 into the expressionf 4 by replacing all occurrences of the source expression x 0 y with the target expression x -y -r
-
. In this substitution, x and y 10 denote subexpressions offs. (6) Transform the expressionf4 into the expressionf' by replacing all occurrences of the source expression x' with the target expression x- r. In this substitution, x' denotes a primed variable or primed constant occurring in the expressionf 3 , specifically excluding all instances of the unprimed constant r. The effect of this step is to replace every primed 15 symbol with its unprimed form multiplied by r. Upon completion of the above steps, the expression f is transformed into a new expression f' The present invention has carefully specified the preceding steps in such a way as to ensure that f = f' -r
-
'. To prove this, the result is demonstrated for the four special cases whenf = x - y, f = x -y, f = x .- y, andf = x-', where x and y are elements in the field F. The general result follows 20 from the commutative, associative and distributive properties of the field. Case 1. Transformed Addition Letf - x - y. Applying the substitution method of the present invention to the expression Jresults in the transformed expressionf' x -r - v - r. To see that f' -r', note that f x 39 WO 99/30458 PCT/US98/25824 = (x -y) -r -r- 1 = (x -r - y .r) -r- =f'.r. Case 2. Transformed Subtraction Letf = x -y. Applying the substitution method of the present invention to the expressionf 5 results in the transformed expressionf'= x - r -y • r. To see thatf =f' -r-', note thatf = x -y = (x-y) - r . r
-
'=(x .r -y - r) r-' =f' .- r -1 Case 3 Transformed Multiplication Letf = x .y. Applying the substitution method of the present invention to the expressionf 10 results in the transformed expressionf' = (x -r) • (y r) r
-
.To see thatf =f'. r
-
', note thatf = x .y =x .y - r. -r -2 x .y.r r r -I
.
1 r- =x r y r r -1 r- = (x r) (y .r).r -1 r =f' -1 r. Case 4. Transformed Inversion 15 Letf = x
-
'. Applying the substitution method of the present invention to the expressionf results in the transformed expressionf' = (x -r) - r 2 . To see thatf =f' -r-', note thatf = x-' -r Sr -2
=
x- I .r- ' .? r .r-1 = (x -r) -' -r 2 r- ' =f-.r
-
'. Thus, the present invention provides a method to transform any expressionf involving a 20 finite number of field operations within a finite field F into the formf' -r
-
'. Furthermore, the expressionf'- r-' constructed by the present invention is guaranteed to be in the Montgomery Canonical Form. To verify this, note that (i) the substitution steps of the method of the present invention ensure that if the original expressionf includes any subexpressions that are of the form x -v, such subexpressions are transformed into the form (x - r) r', which is in the 40 WO 99/30458 PCT/US98/25824 Montgomery Canonical Form; and (ii) whenever the substitution steps of the method of the present invention introduce a new multiplication operation into the transformed expression, such operation brings with it a single additional operand which is always a power of r, thus preserving the Montgomery Canonical Form of the subexpression it is introduced into. 5 Depending on the exact nature of F, and the number of the multiplication operations in the expressionf and the exact number and nature of the operations involved in the calculation off', computation of the expressionf' -r -1 ' may be more efficient than direct computation of the expressionf This is particularly likely, when the field F is a member of either GF(p) or GF(2k). For, in such instances, the Montgomery Algorithm can be applied to the expressionf' -r - ' to 10 ensure optimized computation of the value that the expressionf evaluates to. Section G The present invention may also be used with "projective coordinates," which are used to eliminate the need for performing inversion. 15 For example, in projective coordinates, a point on the elliptic curve group G has 3 coordinate values: (x;, y;, z;) while the affine coordinates requires only two values: (x;, y). For example, for elliptic curves defined over GF(2k), given the distinct points P and Q expressed in projective coordinates: P : (x;, y, z) 20 Q := (X 2 , y 2 ,ZZ) the projective coordinates of the sum of 2 points on the elliptic curve are: P + Q := (x3, Y3, z3) using the following addition rules: A41 41 WO 99/30458 PCT/US98/25824 B =y 2 z -y ; - y C=A+B D A 2 -(A -a -z;) +z;-B-C x3 =A -D 5 y 3 = C .D +A 2. (B .xI + A .y) z3 = A _ Zj This computation requires 13 field multiplications, and no inversions. Similarly, the addition formulae for computing 2P is given as: A = x; • z; 10 B = b -z- 4 x x 3 =A -B y3= x4 -A + B (x; 2 + y 1 z I + A) z3 = A 3 This computation requires 7 field multiplications, and no inversions. 15 Thus, the use of projective coordinates eliminate the inversions at the expense of storing 3 GF(2k) values to represent P and performing a few more multiplications. The present invention can also be used in conjunction with projective coordinates. The addition rules would then be modified as follows: A' = x 2 z ' + x -I -I 20 B' = y 2 zl' 'r +yl C'= A' + B' D'= (A' A' r-') (A'+a'.z '-r-') r-' (z'.B'.r') -C'r-' x 3 ' := A D' r -1 Ys'-D'r - - (A'A'r') *(B'.x;' 'r- ' A'.y'.r
-
') r-i 42 WO 99/30458 PCT/US98/25824 z3' = ((A'.A'.r - ) AA'-r
-
i ) "z;'
-
' Similarly the rules for computing 2P are modified as A'= x /.z;' r- 1 B'= (((b'. z, r-') z '".r
-
') -z;'-r-) z'-r-' +((x,'.x,'.r-) xi'-r-) x,'.r 5 x3'= A' B'. r-1 Y3 (((x'x 'r
-
'
) x '.z'r-) xl " r
-
A) -A r B 1/.X .r-1 + ,' z. r-I + .r - 1 IMPLEMENTATION 10 The present invention may be implemented on any conventional or general purpose PC computer system. It may also be used in conjunction with any network system, including the Internet. A preferred embodiment of a computer system for implementing this invention is an Intel Pentium II PC 233 MHz, running Windows NT 4.0. The present invention can be implemented in any programming language including C and 15 Java. The following are examples of pseudo code suitable for implementing the present invention.
---------------------------------------------------------------
Setup: a, b : Parameters of the elliptic curve (EC) F : The field upon which the EC is based Either GF(p) or GF( 2 K) 20 * : field multiplication + : field addition : field subtraction -1 : field inversion P=(P(x), P(y)) : A point on the EC 25 P(x) & P(y) are affine coordinates
-----------------------------------------------------------------
Algorithm Identifier: ExpPoint Input: e : k-bit integer P : Point on the EC, P = (P(x), P(y)) 30 Output: Q : Point on the EC, Q = (Q(x), Q(y)) Q := eP = (P+P+...+P) (e times P) function ExpPoint begin /* Transform P to P' using r */ 35 P'(x) = P(x) * r P,(y) = P(y) * r /* Start with O' point at infinity */ Q' = O' 43 WO 99/30458 PCT/US98/25824 /* Binary method loop */ for i=k-1 downto 0 do Q, := DoublePoint(Q') if e i=l then Q' := AddPoint(Q', P') 5 /* Transform Q' t? Q using r */ Q(x) = Q' (x) * r -1 Q(y) = Q' (y) * r return Q end L0 ------------------------------------------------------------------ Algorithm Identifier: AddPoint Input: P : Transformed Point on the EC Q' : Transformed Point on the EC Output: T' : Transformed Point on the EC 15 T' := P' + Q' using the EC point addition rules function AddPoint begin /* If the underlying field is GF(p) */ lambda' = Multiply((Q'(y) - P'(y)), Inverse(Q' (x) - P'(x)) 20 T'(x) = Multiply(lambda', lambda') - P'(x) - Q'(x) T' (y) = Multiply(lambda', (P' (x) - T'(x))) - P' (y) return T /* If the underlying field is GF(2k) * lambda' = Multiply((P' (y) + Q' (y)), Inverse(P' (x) + Q' (x))) 25 T'(x) = Multiply(lambda', lambda') + lambda' + P'(x) + Q'(x) + a' T' (y) = Multiply(lambda', (P' (x) + T' (x))) + T' (x) + P (y) return T 30 end
------------------------------------------------------------------
Algorithm Identifier: DoublePoint Input: P' : Transformed Point on the EC Output: T' : Transformed Point on the EC 35 T' := P' + P using the EC point doubling rules function DoublePoint begin /* If the underlying field is GF(p) */ lambda' = Multiply(Multiply(3P' (x),P' (x)) + a'), 40 Inverse(2P'(y))) T' (x) = Multiply(lambda', lambda') - 2P'(x) T' (y) = Multiply(lambda', (P' (x) - T'(x))) - P' (y) return T /* Else if the underlying field is GF(2k) * 45 T'(x) = Multiply(P' (x), P' (x)) + Multiply(b', Multiply(Inverse(P' (x), P' (x)))) T' (y) = Multiply(P' I(x), P' (x)) + Multiply(P' (x) + Multiply(P' (y), Inverse(P' x)), T'(x)) + T'(x) 50 return T end
------------------------------------------------------------------
Algorithm Identifier: Inverse Input : u: Field element 55 Output: t: Field element function Inverse begin 1 2 t = u * return t 44 WO 99/30458 PCT/US98/25824 end
-----------------------------------------------------------------
Algorithm Identifier: Multiply Input : u, v: Field elements 5 Output: t: Field element function Multiply begin t = u * V * r return t 10 end
------------------------------------------------------------------
A number of references describe the mathematical background for the present invention. Those references include: P. L. Montgomery, Modular multiplication without trial division, "Mathematics of Computation," 44(170):519-521, April 1985; D. E. Knuth, "The Art of 15 Computer Programming: Seminumerical Algorithms," volume 2, Second edition, Reading, MA: Addison-Wesley, 1981; C. K. Koc and T. Acar, Montgomery multiplication in GF(2k), "Proceedings of Third Annual Workshop on Selected Areas in Cryptography," pages 95-106, Queen's University, Kingston, Ontario, Canada, August 15-16, 1996; C. K. Koc and T. Acar., Fast software exponentiation in GF(2k), "Proceedings, 13th Symposium on Computer 20 Arithmetic," pages 225-231, Asilomar, California, July 6-9, 1997, Los Alamitos, CA: IEEE Computer Society Press; J. C. Bajard, L. S. Didier, and P. Kornerup, An RNS Montgomery multiplication algorithm, "Proceedings, 13th Symposium on Computer Arithmetic," pages 234-239, Asilomar, California, July 6-9, 1997, Los Alamitos, CA: IEEE Computer Society Press; D. R. Stinson. "Cryptography Theory and Practice," CRC Press, 1995; V. Miller, Uses of 25 elliptic curves in cryptography, "Advances in Cryptology - CRYPTO 85, Proceedings," pages 417-426, New York, NY: Springer-Verlag, 1985; N. Koblitz, Elliptic curve cryptosystems, "Mathematics of Computation," 48:203-209, 1987; N. Koblitz, "A Course in Number Theory and Cryptography," New York, NY: Springer-Verlag, 1987; A. J. Menezes, "Elliptic Curve Public Key Cryptosystems," Boston, MA: Kluwer Academic Publishers, 1993; R.L. Rivest, A. Shamir, 30 and L. Adleman, A Method for Obtaining Digital Signatures and Public-key Cryptosystems," 45 WO 99/30458 PCT/US98/25824 Communications of the ACM, 21(2):120-126, 1978; T. Beth, M. Frisch, and G.J. Simmons, Public-key Cryptography: State of the Art and Future Directions. Springer-Verlag, NY, 1991; IEEE Working Group P1363, Working Draft: IEEE 1363: Standard for RSA, Diffie-Hellman and Related Public-key Cryptography. In preparation, 1995; RSA Laboratories, Answers to Frequently Asked Questions about Today's Cryptography. Version 3.0, 1996; G.B. Agnew, R.C. Mullin, I.M. Onyszchuk, and S.A. Vanstone, An implementation of a fast public-key cryptosystem. Journal of Cryptology, 3(2):63-79, 1991. All of these publications are herein incorporated by reference as if each individual publication were specifically and individually set forth herein. Having described and illustrated the principles of our invention with reference to a preferred embodiment, it will be apparent that the invention can be modified in arrangement and detail without departing from such principles. As such, it should be recognized that the detailed embodiment is illustrative only and should not be taken as limiting the scope of our invention. Rather, we claim as our invention all such embodiments as may fall within the scope and spirit of the following claims and equivalents thereto. 46
Claims (23)
1. A method for producing an elliptic curve point multiplication product, Q = eP, using an arbitrary integer e, a point P on an elliptic curve group G defined over a field F, where G cF x F, comprising the steps of: constructing a set G'; .5 constructing a mapping T from G into the set G' constructing a mapping T' from G'onto G, and constructing an operation ® defined on G such that (a) given P e G, T'( T(P)) = P, and (b) P+P = 7-'(P'G P), where P' = T(P); producing an elliptic curve point multiplication product Q by transforming the point P to the point P' using the mapping T, performing the operation G on the point P' to determine the 10 point Q'= e P', transforming the point Q' to the product Q using the mapping T-'; and using the product Q in a cryptographic operation.
2. The method of claim 1 wherein the set G, the set G', the mapping T, the operation G, and the mapping T - ' are constructed such that given P, P 2 , ..., PN E G, where N is an integer, the computation of 7-'( T(P;) G T(P 2 ) ) ... @ T(Pv)) is more efficient than the computation of P, P2 ... Pv.
3. The method of claim 1 wherein: the mapping T is constructed by selecting any element r of the field F, and defining T as T (x, y) -- > (x -r, y -r), where P = (x, y) E G, and -is the multiplication operator in F; and the mapping Tis constructed by defining T: (u,v) -> (u -r - ', v -r-'), where P'= (u,v) E 5 G 47 WO 99/30458 PCT/US98/25824
4. The method of claim 3 wherein the field F is a member of GF(p).
5. The method of claim 4 wherein the element r is selected as the smallest power of 2 that is larger than p.
6. The method of claim 4 wherein the element r is selected as the product of prime numbers.
7. The method of claim 4 wherein the operation @ is constructed such that the addition of two points in the set G'is given by: (x 3 'y 3 9 = (xI y (X2 "Y2 9; z'= (x 2 '-x - r 2 ; 5L = (y2'-Y ) -z' r-; x 3 '= L'. L'. r - x/'-x2'; and y3' = L'- (XI'-X39 .r - Y1
8. The method of claim 4 wherein the operation D is constructed such that the doubling of a point in the set G'is given by: (xI y;,) ( (x;ty;) = (x3 y,3 9; z'= (y'+ y 9 - 1 r; 5 L'= ((x,'+ x;'+x;) "x'- r - ' + a) -z' -r-1; x 3 ' = L' -L' .r - ' - x - x'; and y3'= L'. (xl'-x3) ' r - -y;8 48 WO 99/30458 PCT/US98/25824
9. The method of claim 4 wherein the Montgomery Algorithm in GF(p) is utilized to perform the operation ( on the point P' to determine the point Q' = e P'.
10. The method of claim 3 wherein the field F is a member of GF(2k).
11. The method of claim 10, wherein the operation G is constructed such that the addition of two points in the set G'is given by: (x3'y 3 ) = (x; 'yi) @ (x 2 'y2 ; z' = (x 2 x2- . r 2; 5 L' = (y' Y 2 9 z'" r-; x 3 '= (L' L' -r - ' ) + L' + x' + x 2 '- a' and y 3 '= (L'- (x' "+ x 3 ) r - ') +x3"+ y'
12. The method of claim 10, wherein the operation G is constructed such that the doubling of a point is given by: (x; y;) 9 (x ;y;) = (x 3 Y3); z'= (x')' -r 2 5 x 3 "= x 1 ' x" 'r - I + (z' z' r - 1 ) . b -r-'; and Y3 = x"'xl"' r - 1 + (xI' y '.z'.-r - t) .X3".-r - ' + X3:
13. The method of claim 10 wherein the element r is selected as xk mod n(x), where n(x) is the irreducible polynomial generating the field GF(2k).
14. The method of claim 10 wherein the Montgomery Algorithm in GF(2k) is utilized 49 WO 99/30458 PCT/US98/25824 to perform the operation G on the point P' to determine the point 0' -- e P'
15. The method of claim 1 wherein the step of performing the operation @ on the point P' utilizes a binary method.
16. The method of claim 1 wherein the step of performing the operation D on the point P' utilizes an M-ary method.
17. The method of claim 1 wherein the elements of sets G and G' are implemented using Projective Coordinates.
18. A method for optimizing the calculation of an expression f = f(x, ..., xi, ... , x,, wherein the expression fis comprised of a finite number of arbitrary field operations over any finite field F, and x j, ... , x, ..., x, are all elements ofF, comprising the steps of selecting an element r, a constant, from the field F; 5 transforming the expressionf = f(xl, ..., xi, ... , x) to thef'- f'(xl '..., x, ... x, 9 by replacing all occurrences of x in the expressionf with x', givingfi, where x denotes a variable or constant off; replacing all occurrences ofx.y in the expressionf; with x 0 y, givingf 2 , where x and y denote subexpressions off, ; 10 replacing all occurrences of x - in the expressionf2 with x - ' - r 2 , givingf3, where x denotes a subexpression off 2 ; replacing all occurrences of x ®y in the expressionf3 with x - y - r - , giving .f4, where x and y denote subexpressions of f; and 50 WO 99/30458 PCT/US98/25824 replacing all occurrences of x' in the expressionf4 with x - r; givingf ', 15 where x denotes a primed variable or primed constant inf 4 ; determiningf =f' -m-'I; and using f'. m - ' to calculate fin a cryptographic operation.
19. The method of claim 18 wherein each instance ofx' -y', m - ' is computed using the Montgomery Algorithm when the set F is a member of GF(p).
20. The method of claim 18 wherein each instance of x' y' m - ' is computed using the Montgomery Algorithm in GF(2 k ) when the set F is a member of GF(2k).
21. A method for producing an elliptic curve point addition product, Q = P - P, using a point P on an elliptic curve group G defined over a field F, where G c:F xF, comprising the steps of: constructing a set G'; 5 constructing a mapping T from G into the set G' constructing a mapping T - ' from G 'onto G, and constructing an operation @ defined on G'; such that (a) given P E G, T - ( T(P)) = P, and (b) P+P = T-F'(P'O P), where P'= T(P); and producing an elliptic curve point addition product Q by transforming the point P to the point P' using the mapping T, performing the operation @ on the point P' and the point P' to 10 determine the point Q', transforming the point Q' to the product Q using the mapping T'; and using the product Q in a cryptographic operation.
22. A method for producing an elliptic curve point addition product, Q - P - S, using 51 WO 99/30458 PCT/US98/25824 points P and S on an elliptic curve group G defined over a field F, where G c F x F, comprising the steps of: constructing a set G'; 5 constructing a mapping T from G into the set G' constructing a mapping 7 - 7' from G'onto G, and constructing an operation D defined on G' such that (a) given P E G, 7'( T(P)) = P, and (b) P--S = T-'(P'G S), where P'= T(P) and S'= T(S); and producing an elliptic curve point addition product Q by transforming the point P to the point P' using the mapping T, by transforming the point S to the point S' using the mapping T, 10 performing the operation D on the point P' and the point S' to determine the point Q', transforming the point Q' to the product Q using the mapping T-'; and using the product Q in a cryptographic operation.
23. Apparatus for producing an elliptic curve point multiplication product, Q = eP, using an arbitrary integer e, a point P on an elliptic curve group G defined over a field F, where G cFx F, comprising: means for constructing a set G'; 5 means for constructing a mapping T from G into the set G' constructing a mapping T' from G'onto G, and constructing an operation ( defined on G '; such that (a) given P e G, 7T-'( T(P)) = P, and (b) P+P = T-' (P'S P), where P' = T(P); and means for producing an elliptic curve point multiplication product Q by transforming the point P to the point P' using the mapping T, performing the operation G on the point P' to 10 determine the point Q'= e P', transforming the point Q0' to the product Q using the mapping T'; and means for using the product Q in a cryptographic operation. 52
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US6931497P | 1997-12-05 | 1997-12-05 | |
| US60/069314 | 1997-12-05 | ||
| PCT/US1998/025824 WO1999030458A1 (en) | 1997-12-05 | 1998-12-04 | Transformation methods for optimizing elliptic curve cryptographic computations |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| AU2198399A true AU2198399A (en) | 1999-06-28 |
| AU758621B2 AU758621B2 (en) | 2003-03-27 |
Family
ID=22088145
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| AU21983/99A Ceased AU758621B2 (en) | 1997-12-05 | 1998-12-04 | Transformation methods for optimizing elliptic curve cryptographic computations |
Country Status (7)
| Country | Link |
|---|---|
| EP (1) | EP1038371A4 (en) |
| JP (1) | JP2001526416A (en) |
| CN (1) | CN1280726A (en) |
| AU (1) | AU758621B2 (en) |
| BR (1) | BR9815161A (en) |
| CA (1) | CA2310588A1 (en) |
| WO (1) | WO1999030458A1 (en) |
Families Citing this family (20)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6307935B1 (en) * | 1991-09-17 | 2001-10-23 | Apple Computer, Inc. | Method and apparatus for fast elliptic encryption with direct embedding |
| US6343305B1 (en) | 1999-09-14 | 2002-01-29 | The State Of Oregon Acting By And Through The State Board Of Higher Education On Behalf Of Oregon State University | Methods and apparatus for multiplication in a galois field GF (2m), encoders and decoders using same |
| FR2821944B1 (en) * | 2001-03-12 | 2003-05-30 | Gemplus Card Int | METHOD OF PROTECTION AGAINST ATTACKS BY MEASURING CURRENT OR ELECTROMAGNETIC RADIATION |
| FR2821945B1 (en) * | 2001-03-12 | 2003-05-30 | Gemplus Card Int | METHOD OF PROTECTION AGAINST ATTACKS BY MEASURING CURRENT OR ELECTROMAGNETIC RADIATION |
| FR2824210B1 (en) * | 2001-04-27 | 2003-05-30 | Gemplus Card Int | COUNTER-MEASUREMENT METHOD IN AN ELECTRONIC COMPONENT USING A PUBLIC KEY TYPE CRYPTOGRAPHIC ALGORITHM ON AN ELLIPTICAL CURVE |
| FR2824653B1 (en) * | 2001-05-11 | 2003-08-08 | Gemplus Card Int | DEVICE FOR PERFORMING EXPONENTIATION CALCULATIONS APPLIED TO POINTS OF AN ELLIPTICAL CURVE |
| US7209555B2 (en) * | 2001-10-25 | 2007-04-24 | Matsushita Electric Industrial Co., Ltd. | Elliptic curve converting device, elliptic curve converting method, elliptic curve utilization device and elliptic curve generating device |
| CN100440776C (en) * | 2002-11-29 | 2008-12-03 | 北京华大信安科技有限公司 | Elliptic Curve Signature and Verification Signature Method and Device |
| US7499544B2 (en) | 2003-11-03 | 2009-03-03 | Microsoft Corporation | Use of isogenies for design of cryptosystems |
| US7664957B2 (en) | 2004-05-20 | 2010-02-16 | Ntt Docomo, Inc. | Digital signatures including identity-based aggregate signatures |
| WO2006056234A1 (en) * | 2004-11-24 | 2006-06-01 | Hewlett-Packard Development Company, L.P. | Smartcard with cryptographic functionality and method and system for using such cards |
| US7602907B2 (en) * | 2005-07-01 | 2009-10-13 | Microsoft Corporation | Elliptic curve point multiplication |
| CN100414492C (en) * | 2005-11-04 | 2008-08-27 | 北京浦奥得数码技术有限公司 | Elliptic curve cipher system and implementing method |
| US8311214B2 (en) * | 2006-04-24 | 2012-11-13 | Motorola Mobility Llc | Method for elliptic curve public key cryptographic validation |
| CN101079701B (en) * | 2006-05-22 | 2011-02-02 | 北京华大信安科技有限公司 | Highly secure ellipse curve encryption and decryption method and device |
| US8548160B2 (en) * | 2010-01-13 | 2013-10-01 | Microsoft Corporation | Determination of pairings on a curve using aggregated inversions |
| CN103078732B (en) * | 2013-01-08 | 2015-10-21 | 武汉大学 | A kind of dot product accelerating circuit of prime field elliptic curve cryptography |
| CN104601322A (en) * | 2013-10-31 | 2015-05-06 | 上海华虹集成电路有限责任公司 | Montgomery step algorithm for ternary extension field in cryptographic chip |
| CN104267926B (en) * | 2014-09-29 | 2018-03-09 | 北京宏思电子技术有限责任公司 | The method and apparatus for obtaining elliptic curve cipher data |
| CN108337091A (en) * | 2018-03-22 | 2018-07-27 | 北京中电华大电子设计有限责任公司 | P times of point calculating method of specified point on a kind of SM9 elliptic curves line of torsion |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5271061A (en) * | 1991-09-17 | 1993-12-14 | Next Computer, Inc. | Method and apparatus for public key exchange in a cryptographic system |
| US5159632A (en) * | 1991-09-17 | 1992-10-27 | Next Computer, Inc. | Method and apparatus for public key exchange in a cryptographic system |
| US5373560A (en) * | 1991-12-06 | 1994-12-13 | Schlafly; Roger | Partial modular reduction method |
| US5442707A (en) * | 1992-09-28 | 1995-08-15 | Matsushita Electric Industrial Co., Ltd. | Method for generating and verifying electronic signatures and privacy communication using elliptic curves |
| US5497423A (en) * | 1993-06-18 | 1996-03-05 | Matsushita Electric Industrial Co., Ltd. | Method of implementing elliptic curve cryptosystems in digital signatures or verification and privacy communication |
| US5577124A (en) * | 1995-03-09 | 1996-11-19 | Arithmetica, Inc. | Multi-purpose high speed cryptographically secure sequence generator based on zeta-one-way functions |
| US5854759A (en) * | 1997-05-05 | 1998-12-29 | Rsa Data Security, Inc. | Methods and apparatus for efficient finite field basis conversion |
| ATE245875T1 (en) * | 1998-02-18 | 2003-08-15 | Infineon Technologies Ag | METHOD AND DEVICE FOR CRYPTOGRAPHIC PROCESSING USING AN ELLIPTICAL CURVE ON A COMPUTER |
-
1998
- 1998-12-04 EP EP98965973A patent/EP1038371A4/en not_active Withdrawn
- 1998-12-04 AU AU21983/99A patent/AU758621B2/en not_active Ceased
- 1998-12-04 WO PCT/US1998/025824 patent/WO1999030458A1/en not_active Ceased
- 1998-12-04 CA CA002310588A patent/CA2310588A1/en not_active Abandoned
- 1998-12-04 CN CN98811822A patent/CN1280726A/en active Pending
- 1998-12-04 BR BR9815161-4A patent/BR9815161A/en not_active Application Discontinuation
- 1998-12-04 JP JP2000524894A patent/JP2001526416A/en active Pending
Also Published As
| Publication number | Publication date |
|---|---|
| BR9815161A (en) | 2000-10-10 |
| AU758621B2 (en) | 2003-03-27 |
| JP2001526416A (en) | 2001-12-18 |
| CN1280726A (en) | 2001-01-17 |
| EP1038371A4 (en) | 2002-01-30 |
| CA2310588A1 (en) | 1999-06-17 |
| WO1999030458A1 (en) | 1999-06-17 |
| EP1038371A1 (en) | 2000-09-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Blake et al. | Elliptic curves in cryptography | |
| AU758621B2 (en) | Transformation methods for optimizing elliptic curve cryptographic computations | |
| Galbraith | Elliptic curve Paillier schemes | |
| López et al. | Fast multiplication on elliptic curves over GF (2m) without precomputation | |
| US6876745B1 (en) | Method and apparatus for elliptic curve cryptography and recording medium therefore | |
| Wiener et al. | Faster attacks on elliptic curve cryptosystems | |
| US7961874B2 (en) | XZ-elliptic curve cryptography with secret key embedding | |
| EP1993086B1 (en) | Elliptical curve encryption parameter generation device, elliptical curve encryption calculation device, elliptical curve encryption parameter generation program, and elliptical curve encryption calculation program | |
| US6252959B1 (en) | Method and system for point multiplication in elliptic curve cryptosystem | |
| Ciet et al. | (Virtually) free randomization techniques for elliptic curve cryptography | |
| Robshaw et al. | Elliptic curve cryptosystems | |
| US7379546B2 (en) | Method for XZ-elliptic curve cryptography | |
| US20030059042A1 (en) | Elliptic scalar multiplication system | |
| US7483533B2 (en) | Elliptic polynomial cryptography with multi x-coordinates embedding | |
| US7483534B2 (en) | Elliptic polynomial cryptography with multi y-coordinates embedding | |
| US20030059043A1 (en) | Elliptic curve signature verification method and apparatus and a storage medium for implementing the same | |
| US7139396B2 (en) | Koblitz exponentiation with bucketing | |
| EP1816624A1 (en) | Encryption computing device | |
| Menezes | Evaluation of security level of cryptography: The elliptic curve discrete logarithm problem (ECDLP) | |
| Granger et al. | On the discrete logarithm problem on algebraic tori | |
| Smart | A comparison of different finite fields for elliptic curve cryptosystems | |
| Gong et al. | The GH public-key cryptosystem | |
| De Win et al. | Elliptic curve public-key cryptosystems—an introduction | |
| Shankar et al. | Cryptography with elliptic curves | |
| Khabbazian et al. | Double point compression with applications to speeding up random point multiplication |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| DA3 | Amendments made section 104 |
Free format text: THE NATURE OF THE AMENDMENT IS: AMEND APPLICANTS NAMES TO ADD: ICESOFT TECHNOLOGIES, INC. |
|
| FGA | Letters patent sealed or granted (standard patent) |