Certificate Authorities Validate Domains, Not Key Security
TLS certificates bind a domain name to a public key, signed by a certificate authority. But CAs only verify domain ownership. They never check whether the key is safe or unique. Generate a reused key and the CA signs it anyway. Their job ends at domain validation. That gap is where the problem starts. If an attacker obtains the private key, they can sit in Starbucks and decrypt every conversation between that site and its users. An ISP with the key can do the same at scale.
Certificate Transparency Logs Reveal a 10% Key Reuse Rate
Certificate transparency grew from a 2011 incident where an Iranian threat actor compromised Diginotar, a Dutch CA. They issued fraudulent certificates for gmail.com and intercepted email for Iranian citizens. Google responded by requiring CAs to log every issued certificate to public append-only ledgers. Those logs now hold over 7 billion entries. Ayrey and Leon downloaded them and found roughly 10% share a private key with at least one other certificate. That is 700 million certificates reusing a key.
Automation Tools Default to Reusing Private Keys
Truffle Security used cert-manager internally and found it defaults to reusing the same key on every renewal. Acme.sh, the second most popular ACME client, does the same. The five-word override flag is --always-force-new-domain-key. Certbot generates a fresh key each renewal by default. The acme.sh maintainers explained the choice: they did not want to overwrite files users might care about. Shorter certificate lifetimes were meant to reduce exposure from compromised keys, but automation running on 90-day cycles keeps stamping out new certificates with the same key.
Verizon’s Ten-Year Key Span and an Active Compromise Case
Crt.sh indexes CT logs by public key hash, showing every certificate sharing a key. Verizon used one key from 2012 to 2022 across properties including verizonbusiness.com portals and ebiz.com subdomains, signed by multiple different CAs. A second case, withheld due to active remediation, shows a key generated in 2013 revoked in March 2024 with reason “key compromise.” New certificates using the same key were still being issued the week of the talk. Customers on that key included Amnesty International and NASA sites.
SSH Keys on GitHub and Cross-Protocol Reuse
GitHub exposes every user’s public SSH keys at their profile URL. By pulling that data for all GitHub accounts via the public event stream, the researchers found 130,000 accounts share an SSH key with another account. That is 2% of all GitHub users. The likely cause: developers who kept the same key across employer accounts as they changed jobs. Also found were a few hundred cases where the same key was used for both SSH and TLS. TruffleHog now checks any found private key against GitHub profiles and CT logs to surface all reuse instances.
Q&A
Was the GitHub profile screen showing the private key? GitHub only stores and exposes public keys. Matching public keys across two profiles proves the private key is shared, but the private key itself never leaves the user’s machine. ▶ Watch (33:12)
Does encrypting a private key with a password protect it? Only if the password is machine-generated. Human-chosen passwords can be cracked offline. TruffleHog already tries the top 200 automatically, and a GPU can test billions. ▶ Watch (36:55)
Were the shared keys caused by weak random number generators? No. For TLS the cause is framework defaults in cert-manager and acme.sh. For GitHub SSH keys the cause is people reusing the same key across multiple employer accounts over their careers. ▶ Watch (38:33)
Notable Quotes
the default is to reuse the same private key over and over and over and over Joe Leon · ▶ Watch (14:49)
130,000 GitHub users are using the same Dylan Ayrey · ▶ Watch (28:53)
we know as an industry that we shouldn’t be reusing password for 10 Dylan Ayrey · ▶ Watch (41:45)
Key Takeaways
- Roughly 10% of 7 billion public TLS certificates share a private key with at least one other certificate.
- Cert-manager and acme.sh both default to reusing the same private key on every 90-day renewal cycle.
- A key compromised once exposes every domain and GitHub account that ever used it, past and present.
About the Speaker(s)
Dylan Ayrey built the open source version of TruffleHog after recognizing how commonly credentials and secrets are exposed in Git repositories. He previously worked on the Netflix security team.
Joseph Leon is a security researcher at Truffle Security, focused on identifying new sources of leaked secrets. He previously led application security assessments at an offensive security consulting firm.