Message Delivery β€” Double-Lock Puzzle

Alice must send a secret document to Bob through an untrusted courier. Alice and Bob each own a padlock and keep their own key.

How can they deliver the message securely?
The box must never travel while unlocked.
πŸ”’ Secure protocol
πŸ‘©β€πŸ’»
Alice πŸ”‘ A
←
β†’
πŸ“„
A
B
πŸ‘¨β€πŸ’»
Bob πŸ”‘ B
1
2
3
4
1. Alice locks the document
Alice β†’ Bob
Alice puts the document in the box, attaches padlock A, and sends it to Bob. The courier cannot open the box.
Current box state
DocumentInside box
Alice's lockOn πŸ”’
Bob's lockOff
Can courier open it?No βœ“
Why does this work?
β‘  Alice β†’ Bob
Lock A protects the document.
β‘‘ Bob β†’ Alice
Bob adds lock B, so both locks are attached.
β‘’ Alice β†’ Bob
Alice removes A. Lock B remains during the final trip.

Key idea: the box is never transported while unlocked, and neither person ever needs to give the other person a key.

Try the protocol yourself

Start with Alice holding the document. Choose the actions in the correct order.

Alice has the document. The box is currently unlocked.