Recently I watched a short video that explained a Man in the Middle (MITM) attack using a simple unforgettable metaphor with a locked suitcase and I could not keep it to myself. If you want a quick intuitive picture of how insecure communications get intercepted and what actually defends you, this story is perfect.
The story: two friends, a suitcase, and a suspicious courier
Two friends, A and B, want to send a private letter. They do not trust the courier C because C might peek. So A puts the letter in a suitcase and locks it with A s lock and gives it to C to take to B. A worries that C could open the case and read the letter.
A s idea is to put a lock on the suitcase. Great, now the courier can carry it but cannot open it. But a new problem appears. How will B open the suitcase if only A has the key? Sending the key along would let C open it, so that is not safe.
A and B try the old school two lock trick:
- A locks the suitcase with A s lock and sends it to C.
- B receives the locked suitcase with A s lock still on it. B cannot open it, so B adds B s lock to the case and sends it back.
- A gets the suitcase with two locks, removes A s lock, and sends it back.
- B receives the suitcase locked only by B s lock and opens it with B s key.
On the surface it looks secure. No one ever has both keys at once so C should never be able to open the case.
The trick: how C becomes the man in the middle with the correct swap sequence
Here is the exact sneaky sequence C uses so the message is read and still delivered and no one suspects anything:
- A locks the suitcase with A s lock and gives it to C to take to B.
- While the suitcase is on its way to B, C intercepts it and does not try to remove A s lock. Instead C adds C s own lock alongside A s lock so the suitcase now carries A s lock and C s lock. C then returns the suitcase to A as if it is simply en route. A sees the suitcase with another lock on it and thinks the other lock is from B so A proceeds with the normal protocol.
- A receives the suitcase carrying A s lock and C s lock, removes A s lock, and sends the suitcase on thinking only B s lock remains. Because C s lock is still on the case C can now open it.
- C removes C s lock, opens the suitcase, reads or tampers with the letter, then puts C s lock back on the suitcase so it still appears locked.
- C delivers the suitcase to B. B receives the suitcase appearing to be locked by the other party, cannot open it, and adds B s lock as usual. Now the suitcase carries C s lock and B s lock.
- C intercepts again, removes C s lock, and allows the exchange to continue. Eventually the suitcase ends up with B s lock only and B opens it and reads the letter.
The crucial point is that C never needs to have A s or B s key at the same time. By adding and removing C s own lock at the right moments and letting A and B follow the expected two lock dance, C can read the message and then re-lock the case so both parties think nothing unusual happened. That is the core of a man in the middle attack.
What each item in the story maps to on the internet
- The suitcase is the message or data being sent such as an email web page or file.
- Locks and keys are cryptographic protections such as encryption keys and signatures.
- Courier C is the network a Wi-Fi hotspot, a compromised router, or any attacker on the path.
- Adding or replacing a lock in the story maps to intercepting traffic impersonating a party or presenting a fake certificate.
So when you use an unencrypted connection like plain HTTP or connect to a malicious hotspot an attacker can intercept alter or read what you send and receive exactly like the suitcase trick in digital form.
Why naive locks fail and what actually stops MITM
The two lock trick fails because the locks are replaceable or indistinguishable to the sender. Real security fixes this with authentication and unforgeable keys.
- Asymmetric public key cryptography lets B publish a public key that anyone can use to encrypt but only B holds the private key to decrypt. Even if C intercepts traffic they cannot decrypt messages without B s private key.
- Digital signatures let A sign the message so B can confirm it came from A and was not altered.
- Certificates and Certificate Authorities CAs let browsers verify that the server you are talking to is actually who it claims to be. A fake certificate or mismatch is the lock swap red flag.
Those are the mechanisms behind HTTPS and TLS which is what makes modern web browsing secure.
Practical defenses you can use today
- Always use HTTPS. Look for the padlock in your browser and do not ignore certificate warnings.
- Avoid untrusted public Wi-Fi. If you must use it use a reputable VPN.
- Keep software up to date. Patches fix security holes that attackers exploit.
- Use end to end encrypted apps such as Signal for high sensitivity communications.
- Enable MFA or Multi Factor Authentication wherever possible. It protects you even if credentials are intercepted.
- Verify certificates and fingerprints if you are doing very sensitive work or use apps that do key verification for you.
Final takeaway
The locked suitcase story is simple and powerful because it shows how an attacker can quietly sit between two parties and break apparent security by adding replacing and removing locks in clever ways. The real world answer is cryptography that provides keys and proofs that an attacker cannot forge or swap. That is what keeps most of the internet safe today.

Leave a Reply