Skip to content

Free certificate key matcher

Check that a certificate, a private key and a CSR belong together before you install them. Your private key never leaves your browser.

PEM or DER, such as cert.pem or cert.crt

Stays in this browser. PEM or DER: PKCS#8, PKCS#1 RSA or SEC1 EC

PEM or DER, such as request.csr

Fill in at least two of the three boxes to compare them. A private key stays in this browser; only public keys, certificates and CSRs are sent. What happens to what you paste

Example report

Synthetic certificate, key and CSR
  • Certificate and keyNo match

    The certificate and public key carry different ECDSA P-256 public keys.

  • Certificate and CSRMatch

    The certificate and CSR carry the same ECDSA P-256 public key.

  • Key and CSRNo match

    The public key and CSR carry different ECDSA P-256 public keys.

  • CSR signatureMatch

    The CSR is signed by the private key of the public key it carries.

Certificate: ECDSA P-256
SPKI SHA-256 3f8a1c0e9b7d64524e1a0f9c8b7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d
Key: ECDSA P-256
SPKI SHA-256 c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5
CSR: ECDSA P-256
SPKI SHA-256 3f8a1c0e9b7d64524e1a0f9c8b7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d

What the key matcher compares

  • Certificate and key

    See whether the certificate was issued for this key.

  • Certificate and CSR

    See whether the certificate came from this request.

  • Key and CSR

    See whether the request was made with this key.

  • CSR signature

    Check the request's own signature verifies.

The private key is read in your browser: only its public key is compared.

Understand a mismatch and your next step

Each result says which pair was compared, whether the public keys are the same, and why. Start with the pair that does not match, then find the key or the certificate that belongs with the rest.

  1. Add any two of the three
  2. Read the four results
  3. Replace what does not match
Example finding

Certificate and key do not matchHigh

The certificate carries a different public key from the private key supplied, so a server given both will refuse to start or fail the handshake.

Certificate SPKI SHA-256  3f8a1c0e9b7d6452...
Key SPKI SHA-256          c4d5e6f7a8b9c0d1...

Common key problems you can put right

  • Old key after a renewalHigh

    A renewal made a new key and CSR, but the server still has the previous key. Install the key that was used for the new CSR.

  • Certificate issued for another CSRHigh

    The certificate and the CSR carry different keys, so it was issued for a different request. Check the order with the certificate authority, or reissue from this CSR.

  • Altered CSRMedium

    The CSR signature does not verify, so it was changed after it was signed. Make a fresh CSR from the key rather than editing one.

  • Encrypted or bundled keyLow

    A passphrase-protected key, a .pfx or a Java KeyStore cannot be read here. Export the plain PEM key on your own machine and use that.

Keep watch after you've fixed it

Ironfang Security rechecks a verified domain every week or every day and tells you what changed: new findings, fixes and certificates nearing expiry.

Free during the preview. Domain verification required.

  1. NewIssue detected
  2. FixedConfirmed by recheck
  3. ReopenedDetected again

How the check works

  • Whether the certificate and the key carry the same public key: the same RSA modulus and exponent, the same EC curve and point, or the same Ed25519 key.
  • Whether the certificate and the CSR carry the same public key, so the certificate was issued for this request.
  • Whether the key and the CSR carry the same public key.
  • Whether the CSR's own signature verifies with the public key it carries, so it has not been altered since it was signed.

Reading a result

Each pair reads Match when both sides carry the same public key, No match when they carry different keys, Not supplied when one side was left empty, and Unable to verify when a key could not be read or uses an algorithm the tool does not compare. Unable to verify is never a match.

A private key is turned into its public key in your browser with Web Crypto, and a test signature made with it must verify before that public key is used. Only the public key is compared with the certificate and the CSR, so a key that is internally inconsistent shows as Unable to verify rather than a match.

Any two of the three boxes are enough. Fill in all three and you get all four results; with two, the pairs that need the missing one say Not supplied.

What it does not do

  • It does not check that the certificate is trusted, in date, issued for the right names or still valid: the certificate checker reads the one a site serves.
  • Encrypted private keys, PKCS#12 (.pfx or .p12) bundles, Java KeyStores and OpenSSH or PuTTY keys are refused. Decrypt or convert the key on your own machine first, and use the unencrypted PEM copy.
  • RSA and EC P-256, P-384 and P-521 keys are compared, and Ed25519 keys where your browser supports them. Other algorithms show as Unable to verify.
  • It reads one of each. In a bundle, the first certificate is the one compared; the key box takes one key.
  • It does not fetch anything: no issuer download, no revocation check and no look at a live site.

What happens to what you paste

Your private key stays in your browser: the page derives its public key with Web Crypto, then drops the private key. Only the public key, the certificate and the CSR are sent to Ironfang, which compares them and stores and logs none of them. Nothing goes into the page address, and the boxes are cleared when you leave the page.

Guides

A few things worth knowing

Is it safe to paste my private key here?
The private key never leaves your browser. The page derives its public key locally with Web Crypto and sends only that public key, the certificate and the CSR. The key box is cleared when you start again or leave the page, and the key is never shown, saved or put in an error. If your policy forbids pasting a private key into any web page, paste its public key instead (openssl pkey -in key.pem -pubout): the result is the same.
How do I check that a certificate matches a private key with OpenSSL?
Compare the public keys: openssl x509 -in cert.pem -noout -pubkey and openssl pkey -in key.pem -pubout should print the same block. For a CSR, openssl req -in request.csr -noout -pubkey. Comparing modulus hashes works for RSA only; comparing public keys works for every algorithm.
Why does my certificate not match my key?
Usually because the key was generated again: a renewal made a new key and CSR, and the server still has the old key, or the certificate was issued for a different CSR. Find the key that was used for the CSR the certificate was issued from, or make a new CSR from the key you have and reissue.
What does the CSR signature check mean?
A CSR is signed with the private key whose public key it carries. If that signature does not verify, the CSR was altered after it was made or was not signed by that key, and a certificate authority will reject it.