How to Stop Man in the Middle Attacks Part 2

Continuing my explanation of how encrypted communications work, here’s how public/private key cryptography works: First Alice creates a special file called a “private key” using a public/private key algorithm (like this one) and then uses that file to generate a “public key”.

She gives the public key away to anyone she can and keeps the private key private (sort of like a password except that it’s too big to memorize and is therefore stored in a file). She can use the private key to encrypt a message in such a way that only the public key can decrypt it.

This is pretty useless for encryption since anyone who has the PUBLIC key can decrypt it; however it does solve our problem of detecting someone modifying our message.

Mallory can’t replace our message because if she does she will have to encrypt it with Alice’s private key (which she does not have), and Bob will know it wasn’t encrypted with Alice’s private key because it does not decrypt correctly. She also can’t modify Alice’s messages because that would logically mean making an entirely new message. This is called a “digital signature”.

Now Alice and Bob can exchange keys without Mallory being able to eavesdrop on them so long as Alice encrypts the number that she sends with her private key. Bob does not need to have a private key as he can actually encrypt the number he sends using Alice’s public key in such a way that only Alice’s private key can be used to decrypt it.

They can now communicate with each other safe from both Mallory and Eve; however this method requires “prior secrets”. In other words this method requires that Bob already have Alice’s public key. Alice can’t simply transmit her public key to Bob over the Internet because then Mallory could just replace it with her own. She also can’t sign her public key with her private key (creating a “self-signed certificate”) because Bob doesn’t have Alice’s public key to verify it with.

This is where “trusted third parties” come from.

70 thoughts on “How to Stop Man in the Middle Attacks Part 2

  1. Pingback: fakir selim
  2. Having read this I thought it was very enlightening. I appreciate
    you taking the time and effort to put this article together.
    I once again find myself spending a significant amount of time both reading and posting comments.

    But so what, it was still worth it!

  3. Your style is unique compared to other folks I’ve read stuff
    from. Thanks for posting when you’ve got the opportunity, Guess I’ll just book mark this blog.

  4. Definitely believe that which you said. Your favorite reason seemed to be on the web the easiest thing to be aware of.
    I say to you, I certainly get annoyed while people think about
    worries that they just don’t know about. You managed
    to hit the nail upon the top and defined out the whole thing without
    having side effect , people can take a signal.
    Will likely be back to get more. Thanks

  5. With havin so much written content do you ever
    run into any issues of plagorism or copyright violation? My website has a
    lot of unique content I’ve either authored myself or outsourced but it looks like a
    lot of it is popping it up all over the internet without
    my agreement. Do you know any ways to help stop content from being stolen? I’d truly appreciate it.

  6. Excellent post. I was checking constantly this blog and I’m impressed!
    Very helpful information specifically the last part :)
    I care for such information a lot. I was seeking this certain information for a very
    long time. Thank you and best of luck.

  7. I was recommended this website by my cousin. I’m not sure whether this post is written by him as
    no one else know such detailed about my difficulty.

    You’re amazing! Thanks!

  8. Link exchange is nothing else however it is simply placing the other person’s web site link on your page at appropriate place and other person will also do similar in support of you.

  9. Pingback: herve leger uk
  10. Hey just wanted to give you a quick heads up. The words in your article
    seem to be running off the screen in Firefox. I’m not sure
    if this is a format issue or something to do with web browser compatibility but I figured I’d post to let you know.
    The layout look great though! Hope you get the issue resolved soon. Many thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

5 + 4 =