21.5 Elliptic Curve Cryptosystems

Elliptic curve versions exist for many cryptosystems, in particular those involving discrete logarithms. An advantage of elliptic curves compared to working with integers mod p is the following. In the integers, it is possible to use the factorization of integers into primes (especially small primes) to attack the discrete logarithm problem. This is known as the index calculus and is described in Section 10.2. There seems to be no good analog of this method for elliptic curves. Therefore, it is possible to use smaller primes, or smaller finite fields, with elliptic curves and achieve a level of security comparable to that for much larger integers mod p. This allows great savings in hardware implementations, for example.

In the following, we describe three elliptic curve versions of classical algorithms. Here is a general procedure for changing a classical system based on discrete logarithms into one using elliptic curves:

Nonzero numbers mod p Points on an elliptic curve
Multiplication mod p Elliptic curve addition
1 (multiplicative identity) (additive identity)
Division mod p Subtraction of points
Exponentiation: gk Integer times a point: kP=P++P
p1 n= number of points on the curve
Fermat: ap11 nP= (Lagrange’s theorem)
Discrete log problem: Elliptic curve discrete log problem:
Solve gkh for k Solve kP=Q for k

Notes:

  1. The elliptic curve is an elliptic curve mod some prime, so n,  the number of points on the curve, including ,  is finite.

  2. Addition and subtraction of points on an elliptic curve are of equivalent complexity (if Q=(x, y),  then Q=(x, y) and PQ is computed as P+(Q)), but multiplication mod p is much easier than division mod p (via the extended Euclidean algorithm). Both mod p operations are usually simpler than the elliptic curve operations.

  3. The elliptic curve discrete log problem is believed to be harder than the mod p discrete log problem.

  4. If we fix a number m and look at the set of all integers mod m,  then the analogues of the above are: addition mod m,  the additive identity 0, subtraction mod m,  multiplying an integer times a number mod m (that is, ka=a+a++a(modm)), m= the number of integers mod m,  the relation ma0(modm),  and the additive discrete log problem: Solve kab(modm) for k,  which can be done easily via the Extended Euclidean algorithm. This shows that the difficulty of a discrete log problem depends on the binary operation.

21.5.1 An Elliptic Curve ElGamal Cryptosystem

We recall the non-elliptic curve version. Alice wants to send a message x to Bob, so Bob chooses a large prime p and an integer α mod p. He also chooses a secret integer s and computes βαs(modp). Bob makes p, α, β public and keeps s secret. Alice chooses a random k and computes y1 and y2,  where

y1αkandy2xβk(modp).

She sends (y1, y2) to Bob, who then decrypts by calculating

xy2y1s(modp).

Now we describe the elliptic curve version. Bob chooses an elliptic curve E(modp),  where p is a large prime. He chooses a point α on E and a secret integer s. He computes

β=sα(=α+α++α).

The points α and β are made public, while s is kept secret. Alice expresses her message as a point x on E (see Section 21.5). She chooses a random integer k,  computes

y1=kαandy2=x+kβ, 

and sends the pair y1, y2 to Bob. Bob decrypts by calculating

x=y2sy1.

A more workable version of this system is due to Menezes and Vanstone. It is described in [Stinson1, p. 189].

Example

We must first generate a curve. Let’s use the prime p=8831,  the point G=(x, y)=(4, 11),  and b=3. To make G lie on the curve y2x3+bx+c(modp),  we take c=45. Alice has a message, represented as a point Pm=(5, 1743),  that she wishes to send to Bob. Here is how she does it.

Bob has chosen a secret random number sB=3 and has published the point sBG=(413, 1808).

Alice downloads this and chooses a random number k=8. She sends Bob kG=(5415, 6321) and Pm+k(sBG)=(6626, 3576). He first calculates sB(kG)=3(5415, 6321)=(673, 146). He now subtracts this from (6626, 3576):

(6626, 3576)(673, 146)=(6626, 3576)+(673, 146)=(5, 1743).

Note that we subtracted points by using the rule PQ=P+(Q) from Section 21.1.

For another example, see Example 47 in the Computer Appendices.

21.5.2 Elliptic Curve Diffie-Hellman Key Exchange

Alice and Bob want to exchange a key. In order to do so, they agree on a public basepoint G on an elliptic curve E:y2x3+bx+c(modp). Let’s choose p=7211 and b=1 and G=(3, 5). This forces us to choose c=7206 in order to have the point on the curve. Alice chooses NA randomly and Bob chooses NB randomly. Let’s suppose NA=12 and NB=23. They keep these private to themselves but publish NAG and NBG. In our case, we have

NAG=(1794, 6375)andNBG=(3861, 1242).

Alice now takes NBG and multiplies by NA to get the key:

NA(NBG)=12(3861, 1242)=(1472, 2098).

Similarly, Bob takes NAG and multiplies by NB to get the key:

NB(NAG)=23(1794, 6375)=(1472, 2098).

Notice that they have the same key.

For another example, see Example 48 in the Computer Appendices.

21.5.3 ElGamal Digital Signatures

There is an elliptic curve analog of the procedure described in Section 13.2. A few modifications are needed to account for the fact that we are working with both integers and points on an elliptic curve.

Alice wants to sign a message m (which might actually be the hash of a long message). We assume m is an integer. She fixes an elliptic curve E(modp),  where p is a large prime, and a point A on E. We assume that the number of points N on E has been calculated and assume 0m<N (if not, choose a larger p). Alice also chooses a private integer a and computes B=aA. The prime p,  the curve E,  the integer n,  and the points A and B are made public. To sign the message, Alice does the following:

  1. Chooses a random integer k with 1k<N and gcd(k, N)=1,  and computes R=kA=(x, y)

  2. Computes sk1(max)(modN)

  3. Sends the signed message (m, R, s) to Bob

Note that R is a point on E,  and m and s are integers.

Bob verifies the signature as follows:

  1. Downloads Alice’s public information p, E, A, B

  2. Computes V1=xB+sR and V2=mA

  3. Declares the signature valid if V1=V2

The verification procedure works because

V1=xB+sR=xaA+k1(max)(kA)=xaA+(max)A=mA=V2.

There is a subtle point that should be mentioned. We have used k1 in this verification equation as the integer mod N satisfying k1k1(modN). Therefore, k1k is not 1, but rather an integer congruent to 1 mod N. So k1k=1+tN for some integer t. It can be shown that NA=. Therefore,

k1kA=(1+tN)A=A+t(NA)=A+t=A.

This shows that k1 and k cancel each other in the verification equation, as we implicitly assumed above.

The classical ElGamal scheme and the present elliptic curve version are analogs of each other. The integers mod p are replaced with the elliptic curve E,  and the number p1 becomes N. Note that the calculations in the classical scheme work with integers that are nonzero mod p,  and there are p1 such congruence classes. The elliptic curve version works with points on the elliptic curve that are multiples of A,  and the number of such points is a divisor of N.

The use of the x-coordinate of R in the elliptic version is somewhat arbitrary. Any method of assigning integers to points on the curve would work. Using the x-coordinate is an easy choice. Similarly, in the classical ElGamal scheme, the use of the integer r in the mod p1 equation for s might seem a little unnatural, since r was originally defined mod p. However, any method of assigning integers to the integers mod p would work (see Exercise 16 in Chapter 13). The use of r itself is an easy choice.

There is an elliptic curve version of the Digital Signature Algorithm that is similar to the preceding (Exercise 24).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset