Security and Communication Networks

Volume 2019, Article ID 8214681, 10 pages

https://doi.org/10.1155/2019/8214681

## On the Development of an Optimal Structure of Tree Parity Machine for the Establishment of a Cryptographic Key

Department of Computer Sciences, Universidad de las Fuerzas Armadas ESPE, Sangolquí, P.O. Box 171-5-231-B, Ecuador

Correspondence should be addressed to Walter Fuertes; ce.ude.epse@setreufmw

Received 30 December 2018; Revised 20 February 2019; Accepted 26 February 2019; Published 18 March 2019

Academic Editor: Kuo-Hui Yeh

Copyright © 2019 Édgar Salguero Dorokhin et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

When establishing a cryptographic key between two users, the asymmetric cryptography scheme is generally used to send it through an insecure channel. However, given that the algorithms that use this scheme, such as RSA, have already been compromised, it is imperative to research for new methods of establishing a cryptographic key that provide security when they are sent. To solve this problem, a new branch known as neural cryptography was born, using a modified artificial neural network called Tree Parity Machine or TPM. Its purpose is to establish a private key through an insecure channel. This article proposes the analysis of an optimal structure of a TPM network that allows generating and establishing a private cryptographic key of 512-bit length between two authorized parties. To achieve this, the combinations that make possible to generate a key of that length were determined. In more than 15 million simulations that were executed, we measured synchronization times, the number of steps required, and the number of times in which an attacking TPM network manages to imitate the behaviour of the two networks. The simulations resulted in the optimal combination, minimizing the synchronization time and prioritizing security against the attacking network. Finally, the model was validated by applying a heuristic rule.

#### 1. Introduction

Cryptography is the mathematical science and the discipline of writing messages in encoded text. Its purpose is to protect secrets from adversaries, interceptors, intruders, opponents, and attackers [1]. It also pays special attention on mechanisms that guarantee information integrity and deals with techniques for exchanging users authentication keys and protocols [2]. The most known method is the combination of the symmetric and asymmetric encryption and decryption algorithms. The asymmetric algorithm is used for the exchange of cryptographic keys and the symmetric algorithm is used for information encryption and decryption.

The RSA public key cryptosystem and the systems based on elliptic curves are the most common forms for public-key cryptography in the encryption and digital signature standards [3]. However, the security of the RSA algorithm depends on the length of the prime numbers used for factoring [4]. Thus, one of the main concerns of RSA is the demand for large keys in today’s cryptographic algorithms, since the product of two long prime numbers must be factored. This generates a bigger value than the original. Increasing the length of prime numbers increases security; however, the computational cost of factoring these numbers is also increased. For this reason, it is important to look for new methods of exchanging cryptographic keys in a secure way and with a relatively low computational cost. Hence, neural cryptography is born; this method uses a neural network called Tree Parity Machine (TPM). In this way, through two TPM networks with exactly the same structure, two users can establish a cryptographic key by exchanging the inputs and outputs of these networks, keeping the synaptic weights secret.

The aim of our study is to search for an optimal structure that minimizes the time and number of steps that two TPM networks require to establish a cryptographic key of -bit length. In addition, we also emphasize on an attacking network whose behaviour is difficult to imitate. For this, we created an algorithm using Python; this algorithm allows performing the simulations to test and find the optimal structure. A total of 15’041,100 simulations were conducted with all the possible structures of the network. Additionally, we used R and GNU Octave for statistical analysis. Finally, a heuristic rule was applied to validate the computed values (proposed by [5, 6]). As a result, it was possible to determine the optimal structure of the TPM network with an average amount of steps and a percentage of of success of a passive attack network and with a successful 0% of a geometric attack.

The main contribution of this study is that two users will be able to generate a cryptographic key based on certain probability according to the number of steps established at the beginning of the synchronization and with a very low probability of a successful passive attack.

The remainder of this document is structured as follows. Section 2 mentions the related works that supports the present study. Section 3 describes the procedure that helps determine the best combination. Section 4 shows the results obtained from the experiment. Finally, Section 5 details conclusions and proposes future work.

#### 2. Related Works

Concerning the studies related to this research, Kanter et al. [7] and Rosen-Zvi et al. [8] demonstrated that when two artificial neural networks are trained on their outputs according to a learning rule, they are able to develop equivalent states of their internal synaptic weights. Kinzel and Kanter [9] and Ruttor et al. [10] revealed that the possibility of a successful attack decreases as the synaptic depth of the network increases and the computational cost of the attacker increases, since its effort grows exponentially while the effort required by the users grows polynomially. Similarly, Sarkar and Mandal [11] and Sarkar [12] mention that the performance is improved by increasing the synaptic depth of the TPM networks, henceforth counteracting the brute force attacks with the current computation. In comparison with the present study, we used the structure of the TPM network proposed by the latter. However, we determined that the security of the TPM network can also be increased by increasing the number of neurons in the hidden layer and also the number of entries of each neuron. In addition, the range for the synaptic depth value has been modified to adapt the need to generate a key of bits.

With respect to the proposed algorithms for the design of the TPM network, Lei et al. [13] developed a two-layer, prepowered TPM network model. A fast synchronization can be achieved by increasing the minimum value of the internal representations Hamming distance and by reducing the probability of a step that does not modify networks weights. Allam et al. [14] proposed an algorithm that increases the security of neural cryptography by authenticating communications using previously shared secrets; in this way, it increases the security of neural cryptography. As a result, it shows that the algorithm reaches a very high security level without increasing synchronization time. Ruttor [15] mentions that the value of K is 3, since lower values have negative consequences from a safety point of view and higher values have negative consequences in terms of synchronization time. Klimov et al. [16] calculate the probability that two networks take to either synchronize their weights or not. Although the probability rises with a low value of K, the success of the attacking network also increases, and consequently the value of K must be greater. In comparison with our study, the initial structure of the TPM networks is random and different and has a single output. In addition, because the goal is to generate a 512-bit key, it was not arithmetically adequate to use odd numbers for K, N, and L values.

In relation to measurements on TPM networks performance, Dolecki and Kozera [17] present a method of frequency analysis that allows evaluating the synchronization level of two TPM networks before they finish up, with the calculated value not related to the difference of their synaptic weights. As a result, the selection of the appropriate range for the count frequency and the threshold allow them to specify whether it is a short or a long synchronization. Santhanalakshmi et al. [18] and Dolecki and Kozera [19] analyse and compare the performance of synchronization by employing, respectively, a genetic algorithm and a Gaussian distribution instead of uniform random values for the weights of the TPM networks. As a result, they found that replacing the random weights with optimal weights helps reduce the synchronization time. In addition, increasing the number of hidden and input neurons accelerates convergence and also reduces the probability of success of the “Majority Flipping Attack” attack. Dolecki et al. [20] perform an adjustment of the timing distribution of two TPM networks to a Poisson distribution. Pu et al. [21] perform an algorithm that combines “true random sequences” (generated by artificial and validated circuits with randomness tests) with TPM networks, demonstrating more complex dynamic behaviours that offer better performance as an encryption tool and resistance to attacks. In comparison with our study, the synaptic weights values of the TPM networks are generated according to a discrete uniform distribution. Additionally, the Poisson distribution adjustment was made with the results in the number of steps in each of the simulations.

With reference to rules that contribute in the design of TPM networks, Mu and Liao [5] and Mu et al. [6] define the following heuristic rule: “Keeping the equations of motion constant, a high value in the state classifier with respect to the minimum values of the smallest Hamming distances between the state vectors of the networks, has a high probability of fulfilling the condition that the average change in the percentage difference between synaptic weights is greater than zero, improving the security of neuronal cryptography”. For our study, we used the proposed heuristic rule to determine the level of security of the final structure of the TPM network.

In regard to modification of initial structures of a TPM network, Gomez et al. [22] state that, with an initial misalignment in the weights between and , the synchronization time is reduced from to less than . This also reduces the number of steps from to less than . Within this context, Niemiec [23] presents a new idea for a key reconciliation method in quantum cryptography using TPM networks, correcting errors that occur during transmission in the quantum channel. The number of steps necessary to establish the key is significantly reduced with a low value in the error rate of the quantum bit and a high value in the initial percentage of synchronization of the two networks. In comparison with our study, we did not use initial structures that presented an initial alignment with an established percentage. This initial alignment should be delivered and shared by the two users, which implies that an attacker has more initial information about the structure of the TPM networks.

#### 3. Materials and Methods

##### 3.1. Background

A TPM is a neural network that is formed by a hidden layer and a single output. The general structure consists of the triad of values , , and , where is the number of neurons in the hidden layer, is the number of entries of each neuron in the hidden layer, and sets the limit of the range of possible integer values related to the synaptic weights.

To generate and establish a key of bits, some variations of the TPM structure whose synaptic weights allow this key length were tested. To determine it, the value of was taken as a base, which, in its binary notation, establishes the final length of the key. To establish pair values in the key length, the limits of the range of values of to whose maximum value in decimal notation is were modified, and the length of its binary value is a multiple of . Thanks to this, there are possible values of that allow generating keys of bits; see Table 1.