CPSC 110-08: Computing on Mobile Phones
Alice and Bob want to conduct a secure, encrypted bank transaction over the Internet, but it's very likely that Eve will be eavesdropping by sniffing the packets sent between Alice and Bob. How can Alice and Bob create a shared key that will allow them to encrypt their messages without Eve discovering it.
The Diffie Hellman Key Exchange method allows two parties that have no prior knowledge of each other to jointly establish a shared key over an insecure communication channel.
The security of Diffie-Hellman is based on what's known as a one-way function, a function that is simple to compute in one direction but very difficult to compute in the other direction.
A nice analogy of a one-way function would be the process of mixing paints. Mixing two paint colors together is easy. Unmixing them is just about impossible.
Here is a nice video that uses the color mixing analogy to illustrate the concept of a one-way function and then explains the mathematics behind Diffie Hellman: Click to Watch!
The Demo follows the method described in the video. Here's how it works:
Android Package: DiffieHellmanColor.apk
|App Inventor Source Code: DiffieHellmanColor.zip|
Thanks to the team a Art of the Problem for the terrific Diffie-Hellman video and thanks to Jeff Gray at the University of Alabama for pointing us to it.