Certificate, CSR & Private Key Matcher
Cryptographically verify whether a Private Key, Certificate Signing Request (CSR), and Leaf Certificate belong to the same certificate/key pair.
No Files Matched Yet
Upload or paste your Private Key, CSR, and Leaf Certificate above to cryptographically verify if they belong to the same key pair. Or click below to try a verified sample matching set.
Understanding Certificate, CSR, and Private Key Matching
Cryptographic Pair VerificationHow Cryptographic Matching Works
In public-key cryptography (such as RSA or ECDSA), every certificate lifecycle revolves around a single asymmetric key pair:
-
Private Key: Kept strictly confidential on your server. For RSA, it contains secret prime numbers
pandqwhich compute the public modulusn = p × qand private exponentd. -
Certificate Signing Request (CSR): Sent to a Certificate Authority (CA). Contains your public key (the modulus
nand exponente) and requested domain identities, cryptographically self-signed with your private key. -
Leaf Certificate: Issued by the CA. Contains your exact public key (the identical modulus
n) signed by the CA's intermediate key. - SPKI Pinning: The Subject Public Key Info (SPKI) SHA-256 hash produces a distinct, format-independent fingerprint of the public key structure, guaranteeing 100% cryptographic certainty.
Matching via OpenSSL CLI
Sysadmins often use OpenSSL to print and compare the SHA-256 or MD5 checksum of the modulus:
If all three commands output the exact same 64-character hash, the files belong to the same key pair. For ECDSA keys, compare the public key coordinates: openssl ec -in key.pem -pubout.
Diagnosing & Resolving Web Server Key Mismatch Errors
When Nginx fails to start with error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch, the certificate specified in ssl_certificate does not correspond to ssl_certificate_key.
.key and .crt files on your server until a 100% Modulus & SPKI match is verified.
Apache HTTP Server logs AH00016: Configuration Failed with SSL Library Error: error:0B080074:key values mismatch when SSLCertificateFile and SSLCertificateKeyFile point to different key generations.
/etc/ssl/private/ or Let's Encrypt live directory.
Common Causes of Mismatches
Generating a new CSR often generates a new private key. If an older private key is deployed instead of the newly generated key, the web server fails to start.
Uploading an Intermediate CA bundle instead of the server Leaf certificate will result in a mismatch because the CA has its own independent key pair.
On servers hosting multiple virtual hosts, accidentally referencing the private key of an adjacent domain or stale certificate is a frequent operational mistake.
Frequently Asked Questions
ENCRYPTED PRIVATE KEY) protect key parameters with a passphrase. To inspect an encrypted key, you must either decrypt it locally with OpenSSL (openssl rsa -in enc.key -out dec.key) or provide an unencrypted PEM/DER key file.