0% found this document useful (0 votes)
43 views2 pages

Proj 2

This document provides instructions for a project to implement digital signature algorithms based on RSA and ElGamal encryption. Students are asked to write programs that: 1) Generate public keys (p, q, α, β) for the digital signature. 2) Sign messages m by selecting a random k, computing r and s, and reporting the signature (m, r, s). 3) Verify signatures (m, r, s) based on the public key and signature values. Students should test their programs by signing messages m1=511 and m2=911 using their student ID to determine k, and verifying the results. The document also asks if the programs can be extended to

Uploaded by

dipishankar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

Proj 2

This document provides instructions for a project to implement digital signature algorithms based on RSA and ElGamal encryption. Students are asked to write programs that: 1) Generate public keys (p, q, α, β) for the digital signature. 2) Sign messages m by selecting a random k, computing r and s, and reporting the signature (m, r, s). 3) Verify signatures (m, r, s) based on the public key and signature values. Students should test their programs by signing messages m1=511 and m2=911 using their student ID to determine k, and verifying the results. The document also asks if the programs can be extended to

Uploaded by

dipishankar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Project 2: Implementation of Digital Signature

Algorithm(s)
Due by June 1, 2004

This project asks you to develop digital signature algorithms (DSAs) based on the un-
derstanding of encryption/decryption by RSA and ElGamal strategies. For more details,
refer to P.190 of the Cryptography textbook by Trappe and Washington, 2002.
In the initialization step,

1. Alice selects a prime q = 997 (8-bit long) and she finds another prime p = 23929
(16-bit), where q|(p − 1) and p = 24q + 1.

2. Alice picks up g = 7 which is a primitive root (mod p), then she computes α =
g (p−1)/q ≡ 20424 (mod p).

3. Alice chooses a secret a = 127 and computes β ≡ αa ≡ 1483 (mod p).

4. Alice publishes (p, q, α, β) = (23929, 997, 20424, 1483) and keeps a = 127 secret.

5* For steps 2 ∼ 4, g = 19, g = 41, or other primitive roots (mod p) might be used.

For the signing process, Alice signs a message m by the following procedure:

S1. Select a random, secret integer k, such that 0 < k < q − 1.

S2. Compute r = (αk (mod p) (mod q)

S3. Compute s = k −1 (m + ar)) (mod q)

S4. Alice sends the signature (m, r, s) for m to Bob.

For the verification process, Bob verifies the signature by the following procedure:

V1. Bob downloads Alice’s public information (p, q, α, β) = (23929, 997, 20424, 1483).

V2. Compute u1 ≡ s−1 m (mod q), and u2 ≡ s−1 r (mod q).

V3. Compute v = (αu1 β u2 (mod p)) (mod q)

V4. Bob accepts the signature iff v = r.

Your work is to write a set of programs to


(1) select public keys (p, q, α, β) (dsa-ini.c is ready for your reference).

(2) sign a message m (0 < m < q − 1) with a random k and report (m, r, s).

(3) verifies (m, r, s) for m based on the public key (p, q, α, β).

Select k in step (S1.) from your student #, for examples, use k = 118 from id=891518,
and use k = 827 from id=928327. Report the signatures of (m1 , r1 , s1 ) with m1 = 511 and
(m2 , r2 , s2 ) with m2 = 911, respectively. Also, verify your results.
♣ Can you extend your program for 160-bit q and 1024-bit p?

You might also like