15

So a Certificate Authority certifies that a website corresponds to a given organization. Why is this necessary?

When I interact with a business or organization, I do it one of a couple ways:

  • I interact with them physically in real life, or through mail, or what have you. I can just get their public key when I meet with them.
  • I interact with them solely digitally. I start with no reason to trust them, but gain trust over time. I only really need to make sure someone doesn't impersonate them, so I just check that it is the same key each time.
  • A friend refers me to a site. I can get the key from them.

So why do we need the CA? How does a website having a CA certificate make me trust it more than if it doesn't?

techraf
  • 9,159
  • 11
  • 45
  • 63
Christopher King
  • 2,937
  • 4
  • 17
  • 29
  • 29
    Because have fun teaching your grandma to exchange public keys with businesses. – user253751 Mar 17 '16 at 06:36
  • 1
    How do you know that the box of flash drives out the counter that say "Here's our public key, take one!" is really from the business and that someone didn't just dump some of their own keys in there? Likewise, even if the guy behind the counter gives it to you, how do you know that what he gave you is the real key and that he wasn't paid to hand out fake ones? – Johnny Mar 17 '16 at 16:57
  • 1
    I'm not sure the current duplicate target question "How does SSL/TLS work?" really is a duplicate of this question. This question is quite specifically about CAs (which may or may not have anything to do with SSL/TLS, e.g. S/MIME or code signing). That said, there are already a few other questions that would be quite close to the topic of this question, e.g. here, here (just a few I can remember, I'm sure there's more). – Bruno Mar 17 '16 at 20:03

6 Answers6

24

What you are describing sounds a lot like how I share PGP keys with my friends. It works fine when we're all nerds and adding keys manually and are chatting on the phone while we do it, but this approach doesn't scale very well.

CAs solve your second bullet in cases where you need to trust the connection the first time, in an automated way - which turns out to be absolutely essential more often than you might think. This is generally referred to as the bootstrapping problem - or "...but how do we do it the first time?"

Scenario 1: I'm at a friend's house and want to check my gmail. My friend uses hotmail and so her computer has no prior trust with gmail.com. How do I know it's the real gmail.com and not a phishing site made to look like gmail.com? How do I "build trust" enough to give it my user name and password? CAs solve this problem because the CA's cert is pinned in the browser, and the site presents a certificate signed by a CA, now the browser trusts that this is the real gmail.com.

Scenario 2: consider a CA in the context of a corporate VPN. The company hires a new person who will work remotely from a different country. You want to make sure that the very first time they connect to the corporate network, they can authenticate the server and didn't just give credentials to your corporate network to some hackers. CAs solve this problem because you can embed (or "pin") the CA's cert into the VPN client executable, and have the VPN server present a cert signed by this CA.

Scenario 3: Email. Something goes wrong on my server. I call up some contractors that I've been referred to and they say "Send us the log files for your firewall and we'll figure out what went wrong". I've never met these guys, how do I get their public key? I suppose they could read me the SHA2 hash over the phone for confirmation, but that's a HUGE hassle. CAs solve this problem because (assuming my IT dept has set up Outlook in some complex ways) Outlook will verify their certificate back to a trusted root.

Scenario 4: Bank transfers. I ask my bank to wire money to my friend who uses some small, unknown bank - maybe overseas. You can bet the bank won't just send money off to some server it doesn't trust. You can also bet that with the sheer number of banks on the planet, a bank will not mail out USB sticks to every other bank every time they need to stand up a new server (which may be an automated stand-up in response to a traffic spike). CAs solve this problem. In reality, the banking network SWIFT uses a complex hierarchy of CAs to secure the world's inter-bank transactions.

In addition to the technical scenarios above there's also the usability issue: in the current model, TLS is protecting your data and your connections whether or not you know it's there, which is great news for my grandmother. Being able to verify all certificates back to a trusted root CA is something that's easy for your browser to do behind the scenes. So even if a more manual system of importing / trusting keys worked, even I would find it unusably inconvenient, and I'm part of the 1% who does this for a living. My grandmother would...well, be in trouble.

Mike Ounsworth
  • 59,005
  • 21
  • 158
  • 212
  • 1
    ...I'm not sure that solves the real problem. What about #firstWorldProblems and people who don't have gazoodles of personal devices? What about wanting to check from work, or some other closed network? And besides, the shift towards 2-Factor is (at least trying) to make this a moot point. – Mike Ounsworth Mar 17 '16 at 15:18
  • 2
    Keylogging is not the problem certificates solve anyway. – user253751 Mar 17 '16 at 18:31