Neural cryptography: Difference between revisions

Content deleted Content added
There are k no. of hidden neurons.So,output of hidden layer (sigma) should be numbered from 1 to k.
 
(48 intermediate revisions by 30 users not shown)
Line 1:
{{Short description|Branch of cryptography}}
'''Neural cryptography''' is a branch of [[cryptography]] dedicated to analyzing the application of [[stochastic]] algorithms, especially [[artificial neural network]] algorithms, for use in [[encryption]] and [[cryptanalysis]].
 
== Definition ==
 
Neural[[Artificial Networksneural network]]s are well known for their ability to selectively explore the solution space of a given problem. This feature finds a natural niche of application in the field of [[cryptanalysis]]. At the same time, Neuralneural Networksnetworks offer a new approach to attack ciphering algorithms based on the principle that any function could be reproduced by a neural network, which is a powerful proven computational tool that can be used to find the inverse-function of any cryptographic algorithm.
 
The ideas of mutual learning, self learning, and stochastic behavior of neural networks and similar algorithms can be used for different aspects of cryptography, like [[public-key cryptography]], solving the [[Key (cryptography)|key]] distribution problem using neural network mutual synchronization, [[Cryptographic hash function|hashing]] or generation of [[Cryptographically secure pseudo-random number generator|pseudo-random numbers]].
 
Another idea is the ability of a neural network to separate space in non-linear pieces using "bias". It gives different probabilities of activating or not the neural network or not. This is very useful in the case of Cryptanalysis.
 
Two names are used to design the same ___domain of researches research: Neuro-Cryptography and Neural Cryptography.
 
The first work that it is known on this topic can be traced back to 1995 in an IT Master Thesis.
Line 15 ⟶ 16:
== Applications ==
 
In 1995, Sebastien Dourlens applied neural networks to cryptanalyze [[Data Encryption Standard|DES]] by allowing the networks to learn how to invert the S-tables of the DES. The bias in DES studied through Differential Cryptanalysis by [[Adi Shamir]] is highlighted. The experiment shows about 50% of the key bits can be found, allowing the complete key to be found in a short time. Hardware application with multi micro-controllers have been proposed due to the easy implementation of multilayer neural networks in hardware.<br{{Citation needed|date=May />2025}}
There are currently no practical applications due to the recent development of the field, but it could be used specifically where the keys are continually generated and the system (both pairs and the insecure media) is in a continuously evolving mode.<br />
 
In 1995, Sebastien Dourlens applied neural networks cryptanalyze [[Data Encryption Standard|DES]] by allowing the networks to learn how to invert the S-tables of the DES. The bias in DES studied through Differential Cryptanalysis by [[Adi Shamir]] is highlighted. The experiment shows about 50% of the key bits can be found, allowing the complete key to be found in a short time. Hardware application with multi micro-controllers have been proposed due to the easy implementation of multilayer neural networks in hardware.<br />
One example of a public-key protocol is given by Khalil Shihab {{Citation needed|date=May 2025}}. He describes the decryption scheme and the public key creation that are based on a [[backpropagation]] neural network. The encryption scheme and the private key creation process are based on Boolean algebra. This technique has the advantage of small time and memory complexities. A disadvantage is the property of backpropagation algorithms: because of huge training sets, the learning phase of a neural network is very long. Therefore, the use of this protocol is only theoretical so far.
 
== Neural key exchange protocol ==
 
The most used protocol for key exchange between two parties {{var|A}} and {{var|B}} in the practice is Diffie-Hellman[[Diffie–Hellman key exchange]] protocol. Neural key exchange, which is based on the synchronization of two tree parity machines, should be a secure replacement for this method.
Synchronizing these two machines is similar to synchronizing two chaotic oscillators in [[chaos communications]].
[[File:Tree Parity Machine.jpg|thumb|350x350px|Tree parity machine]]
Line 27 ⟶ 28:
=== Tree parity machine ===
 
The tree parity machine is a special type of multi-layer feed-forward[[feedforward neural network]].
 
It consists of one output neuron, {{var|K}} hidden neurons and {{var|K*}}×{{var|N}} input neurons. Inputs to the network take 3three values:
:<math>x_{ij} \in \left\{ -1,0,+1 \right\}</math>
The weights between input and hidden neurons take the values:
Line 35 ⟶ 36:
Output value of each hidden neuron is calculated as a sum of all multiplications of input neurons and these weights:
:<math>\sigma_i=\sgn(\sum_{j=1}^{N}w_{ij}x_{ij})</math>
Signum is a simple function, which returns -1−1,0 or 1: <br>
:<math>\sgn (x) = \begin{cases}
-1 & \text{if } x < 0, \\
Line 41 ⟶ 42:
1 & \text{if } x > 0. \end{cases}</math>
 
If the scalar product is 0, the output of the hidden neuron is mapped to -1−1 in order to ensure a binary output value. The output of neural network is then computed as the multiplication of all values produced by hidden elements: <br>
:<math>\tau=\prod_{i=1}^{K}\sigma_i</math>
Output of the tree parity machine is binary.
Line 47 ⟶ 48:
=== Protocol ===
 
Each party ({{var|A}} and {{var|B}}) uses its own tree parity machine. Synchronization of the tree parity machines is achieved in these steps
# Initialize random weight values
# Execute these steps until the full synchronization is achieved
## Generate random input vector {{var|X}}
## Compute the values of the hidden neurons
## Compute the value of the output neuron
## Compare the values of both tree parity machines
### Outputs are the same: one of the suitable learning rules is applied to the weights
### Outputs are different: go to 2.1
### Outputs are same: one of the suitable learning rules is applied to the weights
 
After the full synchronization is achieved (the weights w<sub>ij</sub> of both tree parity machines are same), {{var|A}} and {{var|B}} can use their weights as keys.<br>
This method is known as a bidirectional learning.<br>
One of the following learning rules<ref name="SinghAndNandal">{{cite journal |last1=Singh |first1=Ajit |last2=Nandal |first2=Aarti |date=May 2013 |title=Neural Cryptography for Secret Key Exchange and Encryption with AES |url=http://ijarcsse.com/Before_August_2017/docs/papers/Volume_3/5_May2013/V3I5-0187.pdf |journal=International Journal of Advanced Research in Computer Science and Software Engineering |volume=3 |issue=5 |pages=376–381 |issn=2277-128X}}</ref> can be used for the synchronization:
One of the following learning rules can be used for the synchronization:
* Hebbian learning rule:
:<math>w_i^+=g(w_i+\sigma_ix_i\Theta(\sigma_i\tau)\Theta(\tau^A\tau^B))</math>
* Anti-Hebbian learning rule:
:<math>w_i^+=g(w_i-\sigma_ix_i\Theta(\sigma_i\tau)\Theta(\tau^A\tau^B))</math>
* Random walk:
:<math>w_i^+=g(w_i+x_i\Theta(\sigma_i\tau)\Theta(\tau^A\tau^B))</math>
 
Where:
:<math>\Theta(a,b)=0</math> if <math>a \ne b</math> otherwise <math>\Theta(a,b)=1</math>
And:
:<math>g(x)</math> is a [[Function (mathematics)|function]] that keeps the <math>w_i</math> in the range <math>\{-L, -L+1,...,0,...,L-1,L\}</math>
 
=== Attacks and security of this protocol ===
 
In every attack it is considered, that the attacker {{var|E}} can eavesdrop messages between the parties {{var|A}} and {{var|B}}, but does not have an opportunity to change them.
 
==== Brute force ====
To provide a brute force attack, an attacker has to test all possible keys (all possible values of weights wij). By {{var|K}} hidden neurons, {{var|K*}}×{{var|N}} input neurons and boundary of weights {{var|L}}, this gives (2L+1)<sup>KN</sup> possibilities. For example, the configuration {{var|K}} = 3, {{var|L}} = 3 and {{var|N}} = 100 gives us 3*10<sup>253</sup> key possibilities, making the attack impossible with today’stoday's computer power.
 
==== Learning with own tree parity machine ====
One of the basic attacks can be provided by an attacker, who owns the same tree parity machine as the parties {{var|A}} and {{var|B}}. He wants to synchronize his tree parity machine with these two parties. In each step there are three situations possible:
# Output(A) ≠ Output(B): None of the parties updates its weights.
# Output(A) = Output(B) = Output(E): All the three parties update weights in their tree parity machines.
# Output(A) = Output(B) ≠ Output(E): Parties {{var|A}} and {{var|B}} update their tree parity machines, but the attacker can not do that. Because of this situation his learning is slower than the synchronization of parties {{var|A}} and {{var|B}}.
It has been proven, that the synchronization of two parties is faster than learning of an attacker. It can be improved by increasing of the synaptic depth L of the neural network. That gives this protocol enough security and an attacker can find out the key only with small probability.
 
==== Other attacks ====
For conventional cryptographic systems, we can improve the security of the protocol by increasing of the key length. In the case of neural cryptography, we improve it by increasing of the synaptic depth {{var|L}} of the neural networks. Changing this parameter increases the cost of a successful attack exponentially, while the effort for the users grows polynomially. Therefore, breaking the security of neural key exchange belongs to the complexity class NP.
 
Alexander Klimov, Anton Mityaguine, and Adi Shamir say that the original neural synchronization scheme can be broken by at least three different attacks—geometric, probabilistic analysis, and using genetic algorithms. Even though this particular implementation is insecure, the ideas behind chaotic synchronization could potentially lead to a secure implementation.<ref name="Klimov">{{cite conference |last1=Klimov |first1=Alexander |last2=Mityagin |first2=Anton |last3=Shamir |first3=Adi |date=2002 |title=Analysis of Neural Cryptography |url=https://iacr.org/archive/asiacrypt2002/25010286/25010286.pdf |book-title=Advances in Cryptology |conference=ASIACRYPT 2002 |series=[[Lecture Notes in Computer Science|LNCS]] |volume=2501 |pages=288–298 |issn=0302-9743 |doi=10.1007/3-540-36178-2_18 |accessdate=2017-11-15|doi-access=free }}</ref>
Even though this particular implementation is insecure, the ideas behind chaotic synchronization could potentially lead to a secure implementation.
<ref name="Klimov">
[http://cryptome.org/neuralsub.ps "Analysis of Neural Cryptography"]
by Alexander Klimov, Anton Mityaguine, and Adi Shamir
</ref>
 
=== Permutation parity machine ===
 
The permutation parity machine is a binary variant of the tree parity machine.<ref name="Reyes">{{cite webjournal |urllast1=http://iopscienceReyes |first1=O.iop M. |last2=Kopitzke |first2=I. |last3=Zimmermann |first3=K.org/1751-8121/42/19/195002H. |date=April 2009 |title=Permutation Parity Machines for Neural Synchronization |authorjournal=OscarJournal Mauricioof Reyes,Physics IngoA: Kopitzke,Mathematical and KarlTheoretical |volume=42 |issue=19 |pages=195002 |issn=1751-Heinz8113 |doi=10.1088/1751-8113/42/19/195002|bibcode=2009JPhA...42s5002R |s2cid=122126162 Zimmermann}}</ref>
 
It consists of one input layer, one hidden layer and one output layer. The number of neurons in the output layer depends on the number of hidden units K. Each hidden neuron has N binary input neurons:
Line 115 ⟶ 116:
Other configurations of the output layer for K>2 are also possible.<ref name="Reyes" />
 
This machine has proven to be robust enough against some attacks<ref name="Reyes2">{{cite webjournal |urllast1=http://pre.aps.org/abstract/PRE/v81/i6/e066117Reyes |first1=Oscar Mauricio |last2=Zimmermann |first2=Karl-Heinz |date=June 2010 |title=Permutation Parityparity Machinesmachines for Neuralneural Cryptographycryptography |authorjournal=OscarPhysical MauricioReview ReyesE and|volume=81 Karl|issue=6 |pages=066117 |issn=1539-Heinz3755 |doi=10.1103/PhysRevE.81.066117|pmid=20866488 |bibcode=2010PhRvE..81f6117R Zimmermann}}</ref> so it could workbe used as a cryptographic mean, but ait recenthas implementationbeen ofshown ato probabilisticbe attackvulnerable has shown thatto a key-exchangeprobabilistic protocol based on PPM can be violatedattack.<ref name="Seoane">{{cite webjournal |urllast1=http://preSeoane |first1=Luís F.aps.org/abstract/PRE/v85/i2/e025101 |last2=Ruttor |first2=Andreas |date=February 2012 |title=Successful attack on permutation-parity-machine-based neural cryptography |authorjournal=LuísPhysical FReview E |volume=85 |issue=2 |pages=025101 |issn=1539-3755 |doi=10.1103/PhysRevE.85.025101|pmid=22463268 Seoane|arxiv=1111.5792 and|bibcode=2012PhRvE..85b5101S Andreas|s2cid=17187463 Ruttor}}</ref>
 
=== Security against quantum computers ===
A [[quantum computer]] is a device that uses quantum mechanisms for computation. In this device the data are stored as qubits (quantum binary digits). That gives a quantum computer in comparison with a conventional computer the opportunity to solve complicated problems in a short time, e.g. discrete logarithm problem or factorization. Algorithms that are not based on any of these number theory problems are being searched because of this property.
 
Neural key exchange protocol is not based on any number theory. It is based on the difference between unidirectional and bidirectional synchronization of neural networks. Therefore, something like the neural key exchange protocol could give rise to potentially faster key exchange schemes.<ref name="Klimov" />
It is based on the difference between unidirectional and bidirectional synchronization of neural networks.
Therefore, something like the neural key exchange protocol could give rise to potentially faster key exchange schemes.<ref name="Klimov" />
 
== See also ==
Line 128 ⟶ 127:
* [[Neural network|Neural Network]]
* [[Stochastic neural network]]
* [[Shor's algorithm]]
 
== References ==
<references />
* [httphttps://swww.dourlensresearchgate.free.frnet/AppliedNeuroCryptography.pdfpublication/340226157_Neuro-Cryptographie_Appliquee_et_Neuro-Cryptanalyse_du_DES Neuro-Cryptography] 1995 - The first definition of the Neuro-Cryptography (AI Neural-Cryptography) applied to DES cryptanalysis by Sebastien Dourlens, France.
* [https://web.archive.org/web/20070613172058/http://theorie.physik.uni-wuerzburg.de/~ruttor/neurocrypt.html Neural Cryptography] - Description of one kind of neural cryptography at the [[University of Würzburg]], Germany.
* {{cite conference |last1=Kinzel |first1=W. |last2=Kanter |first2=I. |date=2002 |title=Neural cryptography |book-title=Proceedings of the 9th International Conference on Neural Information Processing |conference=ICONIP '02 |pages=1351–1354 |doi=10.1109/ICONIP.2002.1202841|arxiv=cond-mat/0208453 }} - One of the leading papers that introduce the concept of using synchronized neural networks to achieve a public key authentication system.
* [http://ieeexplore.ieee.org/Xplore/defdeny.jsp?url=/iel5/8534/27062/01202841.pdf?tp=&tp=x&arnumber=1202841&isnumber=27062&code=4 Using synchronized neural networks to achieve public key authentication system] - One of the leading papers that introduce the concept.
* [http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber{{cite journal |last1=963786Li |first1=Li-Hua |last2=Lin |first2=Luon-Chang |last3=Hwang |first3=Min-Shiang |date=November 2001 |title=A remote password authentication scheme for multiserverarchitecturemultiserver architecture using neural networks] |journal=IEEE Transactions on Neural Networks |volume=12 |issue=6 |pages=1498–1504 |issn=1045-9227 |doi=10.1109/72.963786|pmid=18249979 }} - Possible practical application of Neural Cryptography.
* [http{{cite conference |last1=Klimov |first1=Alexander |last2=Mityagin |first2=Anton |last3=Shamir |first3=Adi |date=2002 |title=Analysis of Neural Cryptography |url=https://wwwiacr.springerlink.comorg/contentarchive/kbpxkbnkgtk4ymhhasiacrypt2002/25010286/25010286.pdf Analysis|book-title=Advances ofin NeuralCryptology Cryptography|conference=ASIACRYPT 2002 |series=[[Lecture Notes in Computer Science|LNCS]] |volume=2501 |pages=288–298 |issn=0302-9743 |doi=10.1007/3-540-36178-2_18 |accessdate=2017-11-15|doi-access=free }} - Analysis of neural cryptography in general and focusing on the weakness and possible attacks of using synchronized neural networks.
* [http://www.opus-bayern.de/uni-wuerzburg/volltexte/2007/2361/ Neural Synchronization and Cryptography] - Andreas Ruttor. PhD thesis, Bayerische Julius-Maximilians-Universität Würzburg, 2006.
* {{cite journal |last1=Ruttor |first1=Andreas |last2=Kinzel |first2=Wolfgang |last3=Naeh |first3=Rivka |last4=Kanter |first4=Ido |date=March 2006 |title=Genetic attack on neural cryptography |journal=Physical Review E |volume=73 |issue=3 |pages=036121 |issn=1539-3755 |doi=10.1103/PhysRevE.73.036121|pmid=16605612 |arxiv=cond-mat/0512022 |bibcode=2006PhRvE..73c6121R |s2cid=27786815 }}
* {{cite journal | author=Andreas Ruttor, Wolfgang Kinzel, Rivka Naeh, and Ido Kanter | year=2006 |
* {{cite journal | author=Khalil Shihab | year=2006 | title=A backpropagation neural network for computer network security | journal=Journal of Computer Science 2 | pages=710&ndash;715 | url=http://www.scipub.org/fulltext/jcs/jcs29710-715.pdf | url-status=dead | archiveurl=https://web.archive.org/web/20070712012959/http://www.scipub.org/fulltext/jcs/jcs29710-715.pdf | archivedate=2007-07-12 }}
title=Genetic attack on neural cryptography | journal=Physical Review E | url=http://link.aps.org/abstract/PRE/v73/e036121| doi = 10.1103/PhysRevE.73.036121 | volume=73}}
* {{cite journal | author=Khalil Shihab | year=2006 |
title=A backpropagation neural network for computer network security | journal=Journal of Computer Science 2 | pages=710&ndash;715 | url=http://www.scipub.org/fulltext/jcs/jcs29710-715.pdf}}
 
{{Cryptography navbox}}