this post was submitted on 18 Oct 2023
9 points (84.6% liked)
Programming
17313 readers
607 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
When Bob sets up an HTTPS web site (call it
bob.com
), he creates a public/private key pair, and has the public key signed by a certificate authority (CA) such as Let's Encrypt, generating a public key certificate. The certificate says that this key was signed forbob.com
on a particular date.Before issuing the certificate, the CA verifies that Bob is actually in charge of
bob.com
. This is important! They can do this, for instance, by asking Bob to put a particular file on thebob.com
server, in a place that's publicly accessible. This proves that Bob actually has control over thebob.com
domain.Bob then puts the key pair and certificate into his web server configuration. Neither the CA, nor anyone else but Bob, have access to the private key; it only lives on Bob's servers.
When Alice's browser connects to
bob.com
it gets the public key certificate, and can check that it was signed by a trusted CA. If Earl injects a different public key, it won't be signed tobob.com
and so Alice's browser will reject it. And without access to Bob's actual private key, Earl can't eavesdrop on the session.If the CA is corrupt or incompetent, and issues
bob.com
certificates to people other than Bob (such as Earl), that's a problem! That has been a problem before. There have been CAs that have been "cancelled" for issuing wrong certificates; they are no longer trusted by browsers. Major web companies have put together Certificate Transparency to keep a public log of what certificates have been seen on the web, which makes it possible to at least notice if someone other than Bob is generating certificates that say they're forbob.com
.