# How to Stop Man in the Middle Attacks Part 1

In an earlier post I linked to a video from Khan Academy that talked about how encrypted communication works. Unfortunately that video series left out a very important thing to be aware of about encryption, and that’s man in the middle attacks.
If you haven’t watched that video series I would recommend watching it again. Here‘s the link to the video again just in case you need it.

The story:
Now that Alice and Bob have figured out the Diffie-Hellman key exchange they are now safe from Eve’s eavesdropping; however Eve doesn’t give up easily and so she calls in her big sister Mallory. You see Alice and Bob are communicating over the Internet. When messages travel through the Internet they don’t just jump from point A to point B. Instead they jump from one computer to another until they reach their destination. Mallory in this analogy is one of the computers that their messages have to pass through.

Mallory can do some things that Eve can’t do. Eve could only read their messages; however all messages have to go through Mallory and thus she has the following abilities:
*Refuse to carry a given message (AKA “dropping packets”),
*Modify a message before delivering it,
*Create a message where she pretends to be Alice or Bob,
*and read the messages being sent through.

Since Mallory has these abilities she can do a “man in the middle attack”. Here’s how it works:
First Alice tries to do a Diffie-Hellman key exchange with Bob.

Alice begins her part of the key exchange thinking that she’s establishing an encrypted connection with Bob when in reality she’s forming an encrypted connection with Mallory and Bob does the same.
Now Mallory has an encrypted connection with Alice and Bob, and can eavesdrop on them by decrypting messages sent by Alice, reading them, encrypting them, and sending them to Bob.

To stop this from happening we need to find some way to either stop Mallory from altering/replacing the messages or detect when she does this.

Unfortunately it’s impossible to stop her from altering/replacing the message so instead we’ll have to detect her tampering with public/private key cryptography. I will go over public/private key encryption in the next post.

## 25 thoughts on “How to Stop Man in the Middle Attacks Part 1”

1. Grover Lyster says:

YOU NEED QUALITY VISITORS FOR YOUR: noahs-blog.net

WE PROVIDE ORGANIC TRAFFIC BY KEYWORD FROM SEARCH ENGINES OR SOCIAL MEDIA

YOU GET HIGH-QUALITY VISITORS
– visitors from search engines
– visitors from social media
– visitors from any country you want

CLAIM YOUR 24 HOURS FREE TEST => https://bit.ly/2HQZggh

2. Rebekah Uther says:

NOT SATISFIED WITH YOUR HOSTING ?

Check Out Our Coupons for This Month & Get Your Domain, Hosting and SSLs For Less!
Namecheap Offers Amazing Deals That Save You Money Across Our Product Range!
Best Value Web Products. 20 Years Serving You. Free WhoisGuard. #1 for Value Vs. Others.
Check Out Our Coupons for This Month => https://zeep.ly/prePy

3. Samara Koehler says:

YOU NEED FAST PROXY SERVERS ?

Check it out this Anonymous and Private Proxy Servers.
HTTP & SOCKS5 Proxy supported.
IP Authentication or Password Authentication available.
HERE: https://bit.ly/3ifZkmL

4. Garnet Higgs says:

YOU NEED FAST PROXY SERVERS ?

Check it out this Anonymous and Private Proxy Servers.
HTTP & SOCKS5 Proxy supported.
IP Authentication or Password Authentication available.
HERE: https://bit.ly/3ifZkmL

5. Lavern Malizia says:

YOU NEED POTENTIAL CUSTOMERS THAT BUY FROM YOU ?

I’m talking about a better promotion method than all that exists on the market right now, even better than email marketing.
Just like you received this message from me, this is exactly how you can promote your business or product.

6. Columbus O'Loghlen says:

YOU NEED POTENTIAL CUSTOMERS THAT BUY FROM YOU ?

I’m talking about a better promotion method than all that exists on the market right now, even better than email marketing.
Just like you received this message from me, this is exactly how you can promote your business or product.

Do you want more details or do you want to receive a TEST ?
CHECK HERE=> https://bit.ly/Good_Promotion

7. Caroline Lefkowitz says:

YOU NEED FREE PROXIES ?

We provide great lists of free public proxy servers with different protocols to unblock contents,
bypass restrictions or surf anonymously.
Enjoy the unique features that only our page have on all the internet.
All proxies work at the moment the list is updated.