Skip to main content
Here’s a classic brain teaser that reveals a foundational idea behind secure communication on open networks. Imagine you must send a valuable item to a friend on the other side of the world. You put the item in a trunk, but all trunks are inspected in transit unless locked. You and your friend each own a padlock and its matching key. You have lock 1 and its key; your friend has lock 2 and its key. How do you deliver the item safely without ever handing over your key? Pause and think about it for a moment. The solution is simple and elegant:
  1. Put the item in the trunk, lock it with your lock, and send the trunk to your friend.
  2. Your friend cannot open it (your key stays with you), so they add their own lock and send the trunk back. Now the trunk has both locks.
  3. You remove your lock and send the trunk back again. Only your friend’s lock remains.
  4. Your friend unlocks it with their key and retrieves the item.
At no point did either of you place a key in the trunk. Both keys stayed private, and the trunk was always locked while in transit. An interceptor only ever sees a locked container.
A dark slide titled "THIS IS REAL." explaining a three-pass encryption protocol, with numbered steps on the left and a small diagram on the right showing a wrapped "MESSAGE" box and a checkmark.
This puzzle maps directly onto a cryptographic concept known as the three-pass protocol (also called a “no-key” protocol). Replace the physical objects with cryptographic operations and secrets:
  • You encrypt the message with your secret (the equivalent of locking the trunk).
  • Your friend encrypts that ciphertext with their secret and sends it back.
  • You remove your encryption by applying the inverse operation (analogous to removing your lock).
  • Your friend then removes their encryption and recovers the original message.
The essential property that makes this work is that the two locking/encryption operations “play nicely” together: adding your lock and then your friend’s lock produces the same combined effect if ordered differently (or is otherwise arranged so each party can remove only their layer). In cryptographic terms, the operations must be compatible — often meaning they commute or are structured so each participant can invert only their contribution.
A dark presentation slide titled "THE TRICK" with the subtitle "Order doesn't matter," showing blue and orange padlock icons arranged as an equation to illustrate interchangeable order. A teal checkmark and the caption "locks must behave nicely together" emphasize the point.
The technical requirement is commutativity: the encryption operations must commute (their order doesn’t change the result) or otherwise be arranged so that each party can remove only their layer of protection without needing the other’s secret.
Some mathematical systems provide this property, enabling three-pass-like protocols. The padlock puzzle captures a key breakthrough: secure communication does not have to start with a shared secret. Before public-key techniques this seemed impossible — afterward, strangers could establish confidentiality across an open network while eavesdroppers observed all traffic.
A stylized slide titled "THE BIG IDEA" stating that secure communication does NOT need to start with a shared secret, accompanied by a crossed-out key icon. To the right, two stick-figure "strangers" communicate over a locked channel while eye icons represent eavesdroppers.
Practical notes and modern context
  • Real-world secure protocols (for example, TLS used by web browsers) do not implement the simple three-pass padlock exactly, but they rely on the same underlying insight: confidentiality can be established without exchanging secret keys in the clear.
  • Some cryptographic schemes can be designed to allow layered encryption/decryption with compatible operations; others use asymmetric primitives (public/private key pairs) and key exchange algorithms (e.g., Diffie–Hellman and elliptic-curve variants) to achieve the same objective more robustly.
Quick mapping: physical puzzle → cryptographic equivalent Further reading and references This padlock puzzle is a memorable way to understand why modern secure communication is possible even between strangers, and why the math behind encryption matters: it enables parties to protect secrets without ever transmitting those secrets directly.

Watch Video