2

I understand the procedure behind RSA Signatures, so that Eve cannot make forge signatures on any message but my question is what is stopping eve from substituting everything with her own.

For example,

  1. Bob sends public key and signature on public key to Alice
  2. Alice gets public key and verifies
  3. What is stopping Eve from replacing the public key with her own and then creating a signature on that?

Is the public key stored somewhere that Eve can't modify?

My guess is that Eve would also supply two certificates with that but it's impossible for Eve to generate a signature in which can be verified using the public key in the chrome's trust store.

3

The public key has to verified by some alternative mechanism to ensure it is correct.

For gpg that is the web of trust - https://www.gnupg.org/gph/en/manual/x547.html

For https that is the Certificate Authorities built into your OS/browser.

4

The problem you describe is how Alice knows that the public key used for signing actually belongs to Bob. As you correctly realized it does not work if Alice receives the public key only together with the signed message and has no way to verify that the key belongs to Bob, because in this case Eve could simply replace both key and signature with their own.

A way to deal with the problem is to make sure that Alice gets Bobs public key up front in a trusted way, for example during some personal meeting. This is usually only possible in a few cases so instead of having this direct trust one can use a derived trust, i.e. Carl gets the key from Bob, Alice gets the key from Carl and Alice trusts Carl that this is really Bobs key. You can implement such trust relationships with signatures to get a more scalable trust network with more parties. This is the basis for the Web of Trust used by PGP but also for a the more centralized Public Key Infrastructure used for S/MIME and also for HTTPS.

Using such trust networks it is also possible to send the public key together with the message as long as the public key itself is signed by a trusted party. For example could Bob ask Carl to sign Bobs key using Carls key and then send a message to Alice signed with this signed key. If Alice trusts Carl, i.e. has Carls public key, then Alice can not only verify that the message was actually signed by Bobs key but also that this key actually belongs to Bob because she can verify Carls signature on it.

0

A signature is (simply said) nothing more than the hash of the message, encrypted with the private key of the sender. When Alice replaces the public key, the hash is changed and Bob's signature will not validate.

Your Answer

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