How can i check the authenticity of a private key

Jack Lloyd lloyd at
Fri May 31 10:29:21 PDT 2002

On Fri, 31 May 2002, Mike Rosing wrote:

> With ECC you just recompute the public key from the private
> key and make sure it matches what's out in public.  With
> RSA you just pick some random value (not zero or 1) and
> see if r^(e*d) = 1 mod N, or if you know p and q (where
> N = p*q) check that e*d = 1 mod (p-1)*(q-1).  It's the
> same thing as encrypting/decrypting something to see if
> you get the same thing back.  If not, something is wrong.

Also with RSA, if you know p/q, you should probably check to see if they're
actually prime. :)

For DSA, assuming only one of the keys has been changed, checking y == g^x
mod p should detect it. Again, checking primality (and that q divides p-1)
seems prudent.


More information about the cypherpunks-legacy mailing list