10217

# Neural Cryptography

This Demonstration shows how a neural-network key exchange protocol for encrypted communication works using the Hebbian learning rule. The idea is: the person A wants to communicate with the person B, but they cannot exchange a key through a secure channel, so they set two topologically identical neural networks and evaluate them with the same inputs until the weights of their respective networks match.
The "epoch" slider moves the system in time through the trained epochs while the "randomize" button creates a new configuration of the network. The system is said to be "paired" when the weights of both networks match. These networks are trained through 1000 epochs only and they may get stuck in a local minima state, so they may never come to a paired state.

### DETAILS

A and B set two neural networks with the same size and different random weights values with the property , where is the number of possible values the weight can take.
The algorithm is:
1. The input of the network is randomized with values .
2. Compute the value of the hidden neurons according to .
3. Compute the value of the output neuron .
4. Compare the outputs of both networks. If the outputs do not match, return to step 1. If they do match, update the weights of the network according to one of the following rules:
The Hebbian Learning Rule (used here):
The Anti-Hebbian Learning Rule:
Random walk:
5. Repeat the process until the weights of both neural networks are equal. The paired key is the value of the weights of the networks.
References
[1] Wikipedia. "Neural Cryptography." (May 19, 2011) en.wikipedia.org/wiki/Neural_cryptography.
[2] N. Prabakaran and P. Vivekanandan, "A New Security on Neural Cryptography with Queries," International Journal of Advanced Networking and Applications, 2(1), 2010 pp. 437-444.
[3] CyberTrone. "Neural Cyptography." The Code Project. (Aug 29, 2009) www.codeproject.com/KB/security/Neural_Cryptography1.aspx.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.