1
$\begingroup$

Let's assume I am able to confirm a certain message's signature with a public key that seems to be from Alice. So I should be sure that the sender of that message is really Alice. But what if I have a public key where I think it is from Alice but actually is not and it still can confirms the signature of the message I got. So I am thinking it is from Alice since I used a key that is published as Alice's Public Key just from somebody else and that can confirm a message's signature I got where I think it is from Alice.

How can I be sure that both the message and the public key are really from the person they are named to be from?

There might be some weird thinking mistake I did here so I'd be happy to get enlightened.

Tried to visualize it.

Public Key Usage

Thanks in advance.

$\endgroup$
  • $\begingroup$ You have to know whose public key it is. This is the point PKI (public key infrastructures) is trying to solve. $\endgroup$ – SEJPM Apr 16 at 18:23
  • $\begingroup$ So I have to know the owner in person and probably it is best to exchange the public key like physically with a USB-stick or how is it supposed to work without corruption? $\endgroup$ – quizmaster987 Apr 16 at 18:24
  • 2
    $\begingroup$ A public key is not used to decipher. It can verify a signature, which attests that a signed message was signed by the party holding the corresponding private key. A third party can attest that this key really belongs to Alice. That's what happens when you or your browser trust that this page comes from stackexchange.com $\endgroup$ – fgrieu Apr 16 at 18:41
  • $\begingroup$ So if the public key is not meant to be used for deciphering it is meant to be used for encrypting a message that only the party holding the respective private key can decipher this message, right? $\endgroup$ – quizmaster987 Apr 16 at 19:42
  • 1
    $\begingroup$ @quizmaster987: yes that's one possible use of a public key. But encryption is not the only use of public key, or even the most common. The most ubiquitous use of a public key is verifying a digital signature made with the corresponding private key. $\endgroup$ – fgrieu Apr 17 at 5:18
2
$\begingroup$

I am not commenting for what purpose your are going to use public key and answer your main question:

How is it possible to trust a public key ...?

This one of the most important questions in cryptography: key distribution. Here are some possible solutions:

  • You can for instance meet Alice and exchange keys personally (but it is applicable in rare real cases).
  • Or you can use some channel that you trust to exchange keys.
  • Or you use PKI. Namely some certification authority issues a certificate confirming that the public key belongs to a particular person. The advantage is, that you can exchange certificates also via insecure channel. But to use PKI you need of course trust particular certification authority.
| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Another common way to get trust about Alice's public key that was obtained thru an un-trusted channel (such a plain email) is to check a digest/fingerprint/hash of that public key over a communication channel that we trust for integrity and origin, like over the phone where we believe that we can recognize Alice's voice, or better from a business card we got from Alice in person. PGP/OpenPGP/GPG has provisions for that, and there in a non-zero percentage of business cards with an OpenPGP key fingerprint; example $\endgroup$ – fgrieu Apr 19 at 18:31
  • $\begingroup$ There is also PGP's web of trust model (security.stackexchange.com/questions/61360/…), which aims to enable you to verify that the public key purported to belong to Alice does in fact belong to Alice - without you having to verify this by communicating directly with Alice through some out-of-band method, and in a decentralized way that does not involve CA's. $\endgroup$ – mti2935 Apr 19 at 21:02
  • $\begingroup$ @fgrieu: Yes, good point. $\endgroup$ – mentallurg Apr 19 at 22:13
  • $\begingroup$ Symmetric key cryptography supposes a secure channel. In fact, you can see it as an extension (on time) of that trusted channel. PKI is for an untrusted channel. $\endgroup$ – McFly Apr 21 at 15:55
  • $\begingroup$ @McFly: The question is about PKI. I don't understand why are you talking about symmetric key cryptography. $\endgroup$ – mentallurg Apr 21 at 18:32
0
$\begingroup$

I think that a more sophisticated threat is the one in the so-called identity misbind attack.

To summarize it, let's consider that Alice didn't register her public key in a CA --- Certification Authority and that she has used these keys to run protocols. Now, let's suppose that a Mr. X can ask a CA to register a digital certification of the Alices' public-key, whose private-key he doesn't know (maybe in a specific context the CA doesn't ask for a 'proof of ownership' of the private key, as more secure CA do).

This can be a source of a lot of problems; see this paper. So to answering your question: you must trust a PKI.

| improve this answer | |
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.