ietf-openpgp
[Top] [All Lists]

Power function PGP math library?

2005-06-16 22:55:16

Hey,

I need to verify the DSA signature in my application, and the verifier has to compute these parameters, which are defined in the DSS (Digital Signature Standard).

w = (s')^-1 mod q
u1 = ((SHA(M')w) mod q
u2 = ((r')w) mod q
v = (((g)^u1 * (y^u2) mod p) mod q

I'm using PGP math library in calculation. The problem is how to calculate parameter v.

The parameters g (power to u1) and y (power to u2) should be calculated first and then these factors should be calculated together and so on. But there isn't a function in the math library to calculate powers. The calculation could be done with mp_mult, but it is very slow way to do it.

Best regards,

Kimmo

_________________________________________________________________
Nopea ja hauska tapa lähettää viestejä reaaliaikaisesti - MSN Messenger. http://messenger.msn.fi


<Prev in Thread] Current Thread [Next in Thread>