I'm trying to understand the following:

Let's say Alice wants to encrypt a message with Bob's public key. There can be a man-in-the-middle attack who impersonates Bob. So Alice uses digital certificates so she knows 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 this, for example, based on the IP address?

  • 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
    Commented Nov 20, 2019 at 8:29

1 Answer 1


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 in the context of web/TLS.

Certs are not necessarily bound to domains, in other contexts certs may be bound to different identities. Its just common for TLS/SSL server certificates.

For example, Hardware Security Modules (HSMs) may create a secure channel and bind certs used for that to IP addresses or pin their fingerprint. In code-signing certificates are bound to legal entities e.g. Google Inc. –

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. Commented Nov 19, 2019 at 14:15
  • 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
    Commented Nov 20, 2019 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
    Commented Nov 20, 2019 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
    Commented Nov 23, 2019 at 23:40
  • 1
    good point @D.O. - updated answer...
    – Woodstock
    Commented Mar 23, 2020 at 12:14

You must log in to answer this question.