Certificate Transparency & SPKI Fingerprinting
- •
What it is
- •
Since 2018, Chrome has enforced Certificate Transparency: every CA must publish each certificate it issues to public, append-only logs, searchable via services like crt.sh or censys.io. This exists because CAs occasionally issue fraudulent or unauthorized certificates, and transparency logs make that discoverable. Certificates (and even bare public keys) can be located in these logs by their SHA-256 SPKI fingerprint — the hash of the DER-encoded Subject Public Key Info.
- •
- •
When to apply
- •
You're given a public key (not a full certificate) and asked to identify the real-world domain/certificate that uses it.
- •
- •
Worked example
- •
openssl pkey -pubin -in key.pem -outform der | sha256sumgives a fingerprint you can search directly atcrt.sh/?spkisha256=<fingerprint>.
- •
- •
Python
- •
import hashlib from Crypto.PublicKey import RSA der = RSA.import_key(open("key.pem").read()).publickey().export_key(format="DER") fingerprint = hashlib.sha256(der).hexdigest()
- •
- •
Related
- •