In recent years, artificial neural networks (ANNs), simply referred to as neural networks (NNs) have been of great interest to the research community. They consist of layered networks of nodes meant to mimic a human brain, where the nodes represent biological neurons and the connections between them represent the synapses. Neural computing, as technology and a field of research has a wide ecosystem. It is in close interaction with many scientific and technological fields. NNs support a range of technological fields including medical technology 
as well as image processing 
, cloud computing 
, aerospace technology 
, meteorology 
, and especially in security-related technologies 
. Moreover, several technologies and sciences such as chaos theory 
, frequency-domain transforms 
, genetic algorithms 
and Digital Signal Processing (DSP) 
are supporting neural networks as enablers.
2. War: Neural Computing against Cryptography
2.1. Detecting Malicious Encryption
Detecting and locating malicious encrypted data can help detecting ransomware and other kinds of malware. Some researchers have focused on the applications of NNs in this area 
. Some research works focusing on malicious encryption detection in software code and network traffic are briefly reviewed in the following.
Cryptography can be used to hide malicious data until it is needed. When encrypted data is detected and it cannot be decrypted, there is normally no way to tell if it is malicious or not. It has been proposed to use machine learning models to identify encrypted files and network traffic as malicious.
2.1.1. Software Code
Cryptography is a tool that can protect the confidentiality of data, while often used to the benefit of users it can be used by attackers to hide malware on a system until it is needed or obfuscate network traffic. It can be difficult to identify malware that is able to encrypt data as it might require reverse engineering the suspicious program and applying a thorough understanding of many encryption methods 
. It has been found that NNs could simplify the process of detecting encryption in obfuscated programs. This section will discuss some researchers applying NNs to detecting encrypted malicious code.
Wright and Manic 
built a NN system trained with error back propagation that analyzes the ratio of certain opcodes that are commonly used by cryptographic algorithms. Trained on functions in OpenBSD it was found this system could identify most typical encryption functions regardless of compiler optimization or specific implementation, but failed to detect methods that operate sufficiently different from typical encryption methods such as elliptical curve cryptography and public key encryption.
Jia et al. 
propose solving this issue with a NN model called K-max-CNN-Attention that looks for common instruction patterns rather than relative instruction density. The improvements this model brings is in the move to a convolutional NN (CNN), which interpret blocks of data maintaining the original structure and a better preprocessing scheme which simplifies the input enough to be meaningful to the NN but leaving more information to be interpreted, while these changes improve on performance and accuracy of existing techniques Jia et al. 
speculate that better accuracy could be achieved by changing the preprocessing and classification models to consider non-sequential execution of code.
Cryptanalysis is the processes of finding vulnerabilities in ciphers by studying their operation. This is usually completed with knowledge of some combination of the cipher text, plain text, and key. Though it is often associated with attacks on cryptogrphic systems, cryptanalysis can be used to audit current systems to improve them. In some cases, cryptanalysis can be considered as an aggressive activity against cryptosystems, because it can be conducted in an initial stage of an attack. There have been some attempts at creating cryptanalysis attacks to directly decrypting cipher text using NNs. Apolinhrio Jr. et al. found an early cryptanalysis application for NNs reordering blocks of audio data scrambled with time segment permutation scrambler 
. Their Hopfield network, trained with simulated annealing with a “genetic algorithm” approach on a small set of words, was able to meet the performance of exhaustively searching for a solution 
Ruzhentsev et al. attempted to apply neural nets to decrypt 8 bit cipher texts from a substitution permutation cipher using the same key for the training set and the test set 
, while they did not find complete success decrypting cipher texts this way, they found it possible to decrypt 232 out of the 256 possible cipher texts with the average number of wrong bits in each erroneous decryption being 1.3.
Other papers focused on applying NNs to determine some amounts of the key used to encrypt a cipher text, possibly reducing the amount of time needed to guess the correct key. Abassal and Wahdan propose an attack specific to Feistel block ciphers using NNs to determine the key but was limited to only the cipher the neural net is designed for 
Danziger and Henriques studied how effective NNs could be at cryptanalyzing S-DES ciphers 
. In particular they attempted to determine key bits based on a given plain text and it’s corresponding cipher text. Their test found that certain bits of the key were more easily determined due to problems with the substitution box being used by the cipher.
Xiao et al., utilized NNs to quantify the strength of ciphers by predicting cipher text based on the plain text 
. Using this approach only ciphers as strong as DES-3 were successfully mimicked, though the researchers suggested that using a neural net architecture that more closely reflected that of the cipher being analyzed would be more capable.
NNs have also been used to analyze cipher operation in order to encrypt data. Khan et al. tested the application of neural nets to directly replicate the functionality of a cipher by training some models on cipher, plain text pairs with and without knowledge of the key 
. Hsiao et al. proposed a different system, training a NN to analyze the output of multiple time-delay chaotic system in order to approximate its output and synchronize a second multiple time-delay chaotic system as a means for establishing an encrypted communication over a public channel 
2.3. Vulnerability Analysis
Vulnerability analysis is the act of evaluating threats to security or cryptographic systems and networks. This process will identify and assess these systems and networks for flaws that could lead to exploitation by malicious actors.
Like the case of cryptanalysis, vulnerability analysis can help an adversary design the attack scenario against a cryptosystem. There are a few research works where NNs have been used to analyze the vulnerabilities of cryptosystems. The use of feed-forward NNs FNNs has been applied to the vulnerability analysis of Physical Unclonable Functions (PUFs) 
. More specifically FNNs are being used to model out attack scenarios against the Challenge Response Pairs (CRPs) of the PUFs 
. It was found that given very few CRPs as a baseline, an FNN using the Dragonfly Algorithm(DA) was able to accurately predict more challenge–response pairs with a 85.2% accuracy attacking the Configurable Ring Oscillator PUF and 71.3% against the XOR-inverter Ring Oscillator PUF 
. DA works by moving neurons as dragonflies, moving them closer to the goal (food sources) and away from bad predictions (enemies) by using the neurons as dragonflies on a dimensional grid with speed and velocity 
Some researchers have been able to develop attacks on cryptogrphic systems leveraging the features of NNs. In some research works, NNs have been directly used to attack cryptosystems. It has been shown that symmetric ciphers can be broken by using Real-time Recurrent NNs (RRNN) with Chosen Plaintext Attack (CPA) 
As another example, UFnet, a NN using ReLU activation functions and Xavier initialization techniques, can predict the responses of double-arbiter physically unclonable functions (PUFs) 
3. Peace: Coexistence and Alliance
It has been proposed to use NNs trained on encrypted data. Since there is a noticeable performance drop when using encrypt data, either in processing time accuracy or both. The methods to address this are twofold, developing infrastructure that can better support using encrypted data or tailoring the encryption scheme and the Neural net to improve accuracy and reduce training and processing time.
3.1.1. NNs Adapted to Encrypted Data
Researchers are working on the design of NNs capable of being applied on encrypted data. To this end, NNs need to be able to be trained over encrypted datasets, and process encrypted input data. Training NNs on normal data can be computationally expensive. However training on encrypted data can be even more expensive. To reduce the extra cost of using encrypted data researchers have proposed several efficiency increasing methods.
NNs Trained over Encrypted Datasets
To train NNs on encrypted data, very large and diverse datasets are needed. Instead of coming up with individual training datasets for each new model it is common to create a database of standard training data.
Xu et al. proposed a framework to securely share encrypted data sets from multiple sources, comparing the model training time and accuracy to that of MINST data sets 
. Xu et al. proposed another different framework which applies functional encryption scheme to cloud AI service architectures where user supplied data is processed by the service provider 
Another consideration is the extra complexity of creating a model to understand information that is not meant to be readable as would be the case creating a model which can process encrypted data. In order to train a NN on data that has to be permuted to maintain privacy, Molek and Hurtik proposed using a fully connected auto encoder as a preprocessor for a convolutional NN to make the encoded data more readable 
. Similarly Nandakumar et al. developed a method of training a NN on fully homomorphicaly encrypted data 
. By making some optimizations in training a small drop in accuracy is traded to reduce the time needed to train on encrypted data from 6.5 h to 40 min.
Aside from training NNs on encrypted data, NNs have also shown to be useful to improve the functionality of cryptographic systems and vice versa.
3.2.1. The Role of NNs in Cryptography
NNs have been applied to improving several aspects of cryptographic systems from encrypting several data types to key management and generally securing different aspects of cryptographic systems.
Neural cryptography refers to the application of mutual learning, self learning, and stochastic behavior of neural networks as well as similar algorithms in the design, implementation, or evaluation of any cryptographic algorithm, device, system, or scenario. Particularly, neural networks have been used as enablers in the design of several cryptographic mechanisms, which are implemented as individual modules in cryptosystems. This should be considered an important aspect of neural cryptography.
Neural Cryptography has been applied to key management in many different ways, some have researched its use in concealing keys in Deep NNs 
, while others have researched the use of NN’s using tree parity machines as a way to distribute keys of a symmetric encryption system 
. A more novel approach uses Artificial Spiking NNs (ASNNs) to create keys for a symmetric block cipher algorithm with the ability to use any block size 
. This method provides no need for key exchange 
. The environment systems itself uses a semblance of public key cryptography where the public key is the seed used to generate the private key on both sides 
. Additional approaches to neural cryptography symmetric key exchanges involve using a 3D cube algorithm in order to induce secrets on the receiver side or search guided gravitational neural keys 
Random Number Generation:
Neural cryptography has guided the verification of Pseudo Random Number Generators (PRNGs) by picking up on statistical biases unknown to humans 
. This is achieved using neural cryptography to detect the difference between actual output and desired ideal random numbers 
The use of neural cryptography for encryption 
and decryption 
has received a focus from the research community in recent decades 
. Different security models have been proposed based on neural cryptography 
and different kinds of NNs 
have been used for design and implementation of cryptosystems 
. This effort has led to the development of different types of neural cryptosystems 
. In the following, researchers use the research literature to establish an ecosystem for neural cryptography. This ecosystem consists of applications, enablers, and challenges.