Creating a secret in public
The analogy of paintings
Before we get to the numbers, here’s an illustration. It’s surprisingly accurate and will help you grasp the essentials.
The problem
Alice and Bob want to share a secret colour. They can only communicate in public: everything they send each other is visible to Eve.
The protocol illustrated
They publicly agree on a starting colour — let’s say yellow. Eve knows this; it doesn’t matter.
(yellow: the official colour)
Alice Bob
+ (red, secret) + (blue, secret)
= (orange) = (green)
--------- (orange) --------->
<-------- (green) ------------
+ (red) + (blue)
= (brown) = (brown)
Alice adds her secret colour to the yellow and sends the mixture. Bob does the same. Each then adds their own secret colour to the mixture they’ve received.
Both end up with the same brown: yellow + red + blue, in a different order but with the same ingredients.
Why Eve fails
Eve has seen the yellow, the orange and the green. To get brown, she would need red or blue — that is, to separate the orange into yellow and red.
That’s the whole trick: mixing two paints is easy, but separating them is not. The operation is easy in one direction and very difficult in the other.
What the analogy teaches you
Remember three things. The shared secret has never passed through the channel: it has been reconstructed at both ends. Each side keeps its colour to itself, from start to finish. And security relies entirely on an operation that is easy to perform but difficult to undo.
All that remains is to find, amongst the numbers, an operation that behaves like mixing paints.

