Brian Smith wrote:
I'm attempting to write a C function to match a private key to either it's corresponding public key or certificate for both RSA and DSA algorithms. At this point, I have the keys loaded into their corresponding RSA and DSA structures. From here, what parameter checks are necesary to verify that the corresponding keys match? I'm guessing rsa->n would suffice for RSA, would dsa->p and dsa->q be an appropriate choice? Thanks! Brian
Simple method, without having to know key internals, is to do a sign followed by a verify on some random digest. If the keys match then the verify should pass.
-jb -- Real computer scientists don't comment their code. The identifiers are so long they can't afford the disk space. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
