I'm trying to understand the following:

Lets say Alice wants to encrypt a message with the public key of bob. There can be a man-in-the-middle attack who impersonates bob. So we uses digital certificates so we know the public key is who alice thinks the public key is from. But I don't really understand how this concept works..

Even if there is a digital certificate, you will still use the public key written in the certificate, how is the certificate bound to a specific identity (in this case to Bob)? Is is for example based on the ip-address?

I really want to understand this, If someone could help me out, I would really appreciate it!

  • tangentially related, but you could look at how the web of trust works --- it's trying to solve a similar sort of problem – Sam Mason Nov 20 '19 at 8:29

This is really an often overlooked mechanism.

The way a digital cert is bound to an identity is by digital signature from a certificate authority.

A certificate authority (CA), is an entity which is entitled to sign and 'vouch' for the identity of other entities.

They act as a trusted party.

Even more interesting is that for this whole system to work, all OS/browsers ship with a list of trusted 'root' certs, or certs of certificate authorities :D

Here's a list of all of the root certs Apple trusts.

Certs are thus bound to domains.

Not very decentralised is it!

  • 3
    The answer is correct but is a little too specific to the browser model for authenticating TLS/SSL servers. Most non-browser apps ship with only a handful of trusted public keys/certificates, a process generally referred to as "pinning". Of course then you have to trust the channel you got the app from, which could be https through a browser, so we're right back to your model again. Trust is complicated, unfortunately. – James Reinstate Monica Polk Nov 19 '19 at 14:15
  • Good point James – Woodstock Nov 19 '19 at 14:23
  • Thank you for your response. If I'm correct you are talking about client/server, but what if I want to chat with a person over a channel (whatsapp/skype etc..) how would it work in that case? You can't bind it to a domain.. – M Yil Nov 20 '19 at 10:06
  • Hey @MYil in that instance, you don't need a CA, you just need to ensure the fingerprint of the keys don't change. Similar to how SSH works... – Woodstock Nov 20 '19 at 10:12
  • For a more decentralized system, there is the web-of-trust model, which PGP uses. See en.wikipedia.org/wiki/Web_of_trust. Or, Alice can verify Bob's public key by some out-of-band method, such as phone, SMS, postal mail, etc. – mti2935 Nov 23 '19 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy