开发者

Worked Example of Digital Signature Algorithm

开发者 https://www.devze.com 2022-12-30 04:41 出处:网络
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 Ex

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,


There's a worked example at the end of the standard that defines DSA, FIPS 186.

0

精彩评论

暂无评论...
验证码 换一张
取 消