More about this exercise
How do you mix the colors?
In order to create the same secret key, Alice and Bob must each use the same amount of each component color (Alice's private color, Bob's private color, and the public color) in their mix. Here's how they accomplish this:
- In stage one, Alice and Bob each mix one part of their private colors with two parts of the public color. On the computer, we accomplish this by adding ⅓ of the private color to ⅔ of the public color.
- In stage two, they combine three parts of their partner's mixed color with one part of their private color. On the computer, we add ¾ of the mixed color to ¼ of their private color.
Using this formula, Alice and Bob will create the same private key color, even if they've never seen each other's private colors.
Is this formula cryptographically secure?
Not really. While it's difficult for a human to find the two components of a mixed color, a computer can do so very easily as long as it knows the formula that was used to mix them. We can't keep that formula a secret, because both Alice and Bob have to use the same formula to mix their colors. In a real secret key exchange, we would combine our private keys (colors) using a method that is difficult to reverse for both humans and computers.
This material was created as a part of the education and outreach initiative associated with the Cyber Resilient Energy Delivery Consortium (CREDC) project and is based upon work supported by the Department of Energy and the Department of Homeland Security under Award Number DE-OE0000780.