Python coding - DSA implementation
Task 2. Digital Signature Algorithm - DSA (6%) The digital signature algorithm (DSA) was adopted in 1994 as a signature standard by the U.S. Government. Its security is based on the difficulty of the discrete logarithm problem in a large subgroup of the multiplicative group. 1. To generate keys, each user does the following: pick a prime p such that p - 1 has a prime factor q. select a random integer h,1 1;
You are required to develop a program with three major operations. You may use Python, Java and C++ as you want. ● Keygen(x, y): a function to produce the DSA parameters: (p,q,g,y,x) as described above. The output of this function is ((p,q,g,y,x)). Where: x and y in keygen() means p, and q has bit length must greater than or equal to x and y. It is written as |P|_2 >= x and IQ1_2 >= y. Sign(m): a function to sign a message m using the secret key x, generate the signature (r, s). Verify(m, r, s): a function to verify a message m with the signature (r,s). A signature is acceptable if the v= ras described above. To show your individual work, you need to design your own user interface (UI) by referring the sample interactions as below: Display headings including yourname (ID) Select Function Keygen(x,y) | Sign(m) | Verify(m,r,s) ? Keygen(x, y) 10, 5 P = 1129 (11 bits) Q = 47 (6 bits) Key generated: Public Key: g = 30 y = 38 Private Key: x = 31 ? Sign(m) - 35 Signature produced: (5, 19) - ? Verify (m, r, s) 35, 5, 19 (35, 5, 19) is verified! ? Verify (m, r, s) 35, 19, 5 (35, 19, 5) is not verified, Reject! ? \q Good bye!
Python coding - DSA implementation
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am