13.2 The ElGamal Signature Scheme

The ElGamal encryption method from Section 10.5 can be modified to give a signature scheme. One feature that is different from RSA is that, with the ElGamal method, there are many different signatures that are valid for a given message.

Suppose Alice wants to sign a message. To start, she chooses a large prime p and a primitive root α. Alice next chooses a secret integer a such that 1ap2 and calculates βαa  (mod p). The values of p, α, and β are made public. The security of the system will be in the fact that a is kept private. It is difficult for an adversary to determine a from (p, α, β) since the discrete log problem is considered difficult.

In order for Alice to sign a message m, she does the following:

  1. Selects a secret random k with 1kp2 such that gcd(k, p1)=1.

  2. Computes rαk  (mod p) (with 0<r<p).

  3. Computes sk1(mar)  (mod p1).

The signed message is the triple (m, r, s).

Bob can verify the signature as follows:

  1. Download Alice’s public key (p, α, β).

  2. Compute v1βrrs  (mod p), and v2αm  (mod p).

  3. The signature is declared valid if and only if v1v2  (mod p).

We now show that the verification procedure works. Assume the signature is valid. Since sk1(mar)  (mod p1), we have skmar  (mod p1), so msk+ar  (mod p1). Therefore (recall that a congruence mod p1 in the exponent yields an overall congruence mod p),

v2αmαsk+ar(αa)r(αk)sβrrsv1  (mod p).

Suppose Eve discovers the value of a. Then she can perform the signing procedure and produce Alice’s signature on any desired document. Therefore, it is very important that a remain secret.

If Eve has another message m, she cannot compute the corresponding s since she doesn’t know a. Suppose she tries to bypass this step by choosing an s that satisfies the verification equation. This means she needs s to satisfy

βrrsαm(mod p).

This can be rearranged to rsβrαm  (mod p), which is a discrete logarithm problem. Therefore, it should be hard to find an appropriate s. If s is chosen first, the equation for r is similar to a discrete log problem, but more complicated. It is generally assumed that it is also difficult to solve. It is not known whether there is a way to choose r and s simultaneously, though this seems to be unlikely. Therefore, the signature scheme appears to be secure, as long as discrete logs mod p are difficult to compute (for example, p1 should not be a product of small primes; see Section 10.2).

Suppose Alice wants to sign a second document. She must choose a new random value of k. Suppose instead that she uses the same k for messages m1 and m2. Then the same value of r is used in both signatures, so Eve will see that k has been used twice. The s values are different; call them s1 and s2. Eve knows that

s1km1ars2km2(mod p1).

Therefore,

(s1s2)km1m2(mod p1).

Let d=gcd(s1s2, p1). There are d solutions to the congruence, and they can be found by the procedure given in Subsection 3.3.1. Usually d is small, so there are not very many possible values of k. Eve computes αk for each possible k until she gets the value r. She now knows k. Eve now solves

arm1ks1(mod p1)

for a. There are gcd(r, p1) possibilities. Eve computes αa for each one until she obtains β, at which point she has found a. She now has completely broken the system and can reproduce Alice’s signatures at will.

Example

Alice wants to sign the message m1=151405 (which corresponds to one, if we let 01=a, 02=b, ). She chooses p=225119. Then α=11 is a primitive root. She has a secret number a. She computes βαa18191  (mod p). To sign the message, she chooses a random number k and keeps it secret. She computes rαk164130  (mod p). Then she computes

s1k1(m1ar)130777(mod p1).

The signed message is the triple (151405, 164130, 130777).

Now suppose Alice also signs the message m2=202315 (which is two) and produces the signed message (202315, 164130, 164899). Immediately, Eve recognizes that Alice used the same value of k, since the value of r is the same in both signatures. She therefore writes the congruence

34122k(s1s2)km1m250910(mod p1).

Since gcd(34122, p1)=2, there are two solutions, which can be found by the method described in Subsection 3.3.1. Divide the congruence by 2:

17061k25455(mod (p1)/2).

This has the solution k239  (mod (p1)/2), so there are two values of k  (mod p), namely 239 and 239+(p1)/2=112798. Calculate

α239164130,  α11279859924(mod p).

Since the first is the correct value of r, Eve concludes that k=239. She now rewrites s1km1ar  (mod p1) to obtain

164130aram1s1k187104(mod p1).

Since gcd(164130, p1)=2, there are two solutions, namely a=28862 and a=141421, which can be found by the method of Subsection 3.3.1. Eve computes

α28862206928,  α14142118191(mod p).

Since the second value is β, she has found that a=141421.

Now that Eve knows a, she can forge Alice’s signature on any document.

The ElGamal signature scheme is an example of a signature with appendix. The message is not easily recovered from the signature (r, s). The message m must be included in the verification procedure. This is in contrast to the RSA signature scheme, which is a message recovery scheme. In this case, the message is readily obtained from the signature s. Therefore, only s needs to be sent since anyone can deduce m as seA  (mod n). It is unlikely that a random s will yield a meaningful message m, so there is little danger that someone can successfully replace a valid message with a forged message by changing s.

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

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