3 ms·
HPKP is a workaround, not a solution, to the problem of trusting every CA in the world to certify every site in the world — it's a symptom of the fact that the
by zeveb 10y ago
HPKP is a workaround, not a solution, to the problem of trusting every CA in the world to certify every site in the world — it's a symptom of the fact that the economics of CAs are completely, totally and fundamentally out-of-whack: relying parties have no relationship with the CAs they trust.
There are two things a CA can do: it can a) certify that a key is associated with some real-world identity or b) certify that a key is associated with some DNS name. The first is actually pretty desirable, but … there is no global namespace of real-world identities, so there's nothing a CA CertCorp can certify other than 'public key 0x1234ABCD0987FEDB is associated with CertCorp identity X,' which is … not nearly as desirable, or useful.
The second possibility is actually pretty useful, but also imperfect. To a huge extent, Amazon really is amazon.com; Google really is google.com. But, of course, .com could always decide to reallocate hostnames at will, regardless of its contracts (there may be contractual, civil or criminal remedies, of course).
Where does HPKP come into all this? It really doesn't: it's a half-assed way for a site to say, 'you visited me once, and trusted CA X to verify my identity then; in the future, please trust CAs X & Y' — but it does nothing at all to actually ensure that CA X was reliable in the first place! After all, CA X could have issued a certificate to some malfactor, who served the HPKP instructions to only trust X & Y.
It's smoke and mirrors, all the way down.
- pfg 10y agoThere's nothing stopping you from pinning exclusively to keys under your control. A pin counts as satisfied if the hash matches at least one of the keys in the certificate chain, including the end-entity certificate itself. In other words, if you do not trust any CA, HPKP can still help you. For most sites, pinning to a small set of CAs is sufficient and a vast improvement, but if you chose to trust no one, that's fine too.