IT Security. In this practical we focus on digital signing based on RSA and ElGamal. We also look at the Digital Signature Standard and the use of hashing when signing.

Authors Avatar

SIT392 PUBLIC KEY CRYPTOGRAPHY   2011  TRIMESTER 1

PRACTICAL SESSION 4 SOLUTIONS

In this practical we focus on digital signing based on RSA and ElGamal. We also look at the Digital Signature Standard and the use of hashing when signing.

A. Using RSA to sign.

1. Alice uses an RSA scheme based on the modulus 1081357. She only signs messages with 6 digits (base 10) and odd numbers, but only Alice knows this. You receive a signed message claiming to be from her which is 725226. You look up her public key: 17. Is the message really from Alice?

Solution.

To retrieve the message, you compute 725226^17 mod (phi(n))= mod (1079260) and get

1029556. So the message is not from Alice and could not have been computed using her private key. You should check with Alice in any case.

B. Using El Gamal to sign.

1. Alice derives an El Gamal signature scheme using p = 5023, α = 5 and y = 5a = 3796. Her computations yield β = 5r ≡ 2294 and γ = (444 – 2294 a)r-1  ≡ 3740, where m = 444 is the message. Determine if Bob should accept the signed message as valid.

Join now!

Solution.

Bob checks by computing 5444 (mod 5023) ≡ 4678

and also yββγ (mod p) ≡3796229422943740 ≡ 728.

So no, Bob should not accept the message as being validly signed by Alice.

C. The questions in this section deal with attacking the El Gamal scheme.

1.  In this case, Oscar, the attacker, uses Alice’s scheme set-up parameters p = 5023, α = 5 and y = 5a = 3796. Oscar picks random , r1 = 205 and r2 = 1021.

He computes β1 = 5205 37961021 (mod p) = 1287 and

γ1 = -β1r2-1 = -1287 * 4417(mod p-1) = 225.

Oscar then sends (β1, γ1) ...

This is a preview of the whole essay