Module 10 : Hash Function Digital Signatures

Lecture 2 : Elgamal Digital Signatures

 

2. RSA Digital Signature Scheme
Suppose Alice want to send a message(m) to Bob. She can generate digital signature using RSA digital signature scheme [4] as follow:

Key Generation:-
She can generate key for RSA signature scheme:

  1. Choose two distinct large prime numbers p and q.
  2. Compute n = pq.
  3. n is used as the modulus for both the public and private keys.
  4. Compute φ(n) = (p − 1)(q − 1), where φ is Euler’s totient function.
  5. Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1.
  6. Compute d = e−1 modφ(n).

Then the public key and private key of user will be (e, n) and (d, n) respectively.
Now she have her public and private key. Now she can generate the signature of a message by encrypting it by her private key.
So she can generate signature corresponding to message(mas follow:
Signing:-

  1. Represent the message m as an integer between 0 and n − 1.
  2.  Sign message by raising it to the dth power modulo n.

S ≡ md (mod n)

So S is the signature corresponding to message m. Now she can send message malong with the signature S to Bob.

Upon receiving the message and signature (m, S), Bob can verify the signature by decrypting it by Alice public key as follow:

Verification:-

  1. Verify signature by raising it to the eth power modulo n.

m' ≡ Se (mod n)

  1. If m' = m (mod n) then signature is valid otherwise not.

For a valid signature both mand m' will be equal because:
S ≡ md (mod n)
m' ≡ mde(mod n)
and
e is inverse of d, i.e. ed ≡ 1(mod Φ(n)).

So, by using above algorithm Alice can generate a valid signature S  for her message m, but there is a problem in above define scheme that is the length of the signature is equal to the length of the message. This is a disadvantage when message is long.