Worked Example of Digital Signature Algorithm

Posted by drelihan on Stack Overflow See other posts from Stack Overflow or by drelihan
Published on 2010-05-09T23:33:08Z Indexed on 2010/05/09 23:38 UTC
Read the original article Hit count: 228

Filed under:
|
|

Hi Folks,

Does anybody have a DSA worked example with simple values on how to calculate r,s and verify v == r. As this standard has been around awhile and is implemented in librarys e.g. the Java Cryptography Extension I'm finding it very hard 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,

© Stack Overflow or respective owner

Related posts about cryptography

Related posts about dsa