how to check if a private key does match with a csr or certificate
In RSA public-key cryptography the private and the public key paar are methematically related by sharing the same modulus. The length of the modulus, express in bits, is the key length and should also be the same.