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