Working example of digital signature algorithm
Does anyone have an example DSA with simple values on how to compute r, s and check v == r. Since this standard has been around for a while and is implemented in libraries like Java Cryptography Extension I find it very difficult to find an example of how the algorithm works.
Compute r=(gk mod p) mod q
Compute s=(k-1 * (x * r + i)) mod q
Verifying a signature; again i is the input, and (r,s) is the signature.
u1 = (s-1 * i) mod q
u2 = (s-1 * r) mod q
v = ((gu1 * yu2) mod p) mod q
If v equals r, the signature is valid.
Thanks,
+2
a source to share