# The Dichotomy of Neural Networks and Cryptography: War and Peace
## 4 Peace: Coexistence and Alliance
### Coexistence
#### 4.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. [PERSON] 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 [51]. [PERSON] 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 [52]. 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, [PERSON] and [PERSON] proposed using a fully connected auto encoder as a preprocessor for a convolutional NN to make the encoded data more readable [53]. Similarly [PERSON] et al. developed a method of training a NN on fully homomorphicly encrypted data [54]. 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. NNs Capable of Processing Encrypted Input Data  
This section will list many of the ways that NNs are being implemented to use encrypted data. In the following, we study some types of neural computing processes possible to applied on encrypted data. 1. **Classification:** Different kinds of input data can be classified in their encrypted form by special types of NNs. Some of these types are discussed below. Similar to identifying encrypted malicious data, NNs have been trained to classify other kinds of encrypted data to protect the confidentiality of the contents while still providing useful classification. 2. **Encrypted Network Traffic:** This type of input data can be classified by NNs for anomaly detection [55] or application identification [56; 57] purposes. Somepapers focused on improving the classification of TLS/SSL traffic since it is commonly used to protect web traffic. [PERSON] et al. designed a NN combining, stereo transform, and convolutional NNs to classify TLS/SSL traffic with up to 95% accuracy [58]. [PERSON] et al. proposed using a Bayesian NN system that observes non-encrypted handshake packets, the specific cipher being used and the compression method to classify TLS connections [59]. [PERSON] and [PERSON] improved upon the Alexnet deep NN by developing multi-scale convolution, a deconvolution operation, and batch standardization in order to reduce training time [60]. Other papers focused their efforts further on classifying encrypted VPN traffic. [PERSON] et al. applied a text convolutional NN system to classifying VPN traffic [61]. In order to avoid imbalances in class identification caused during training a loss function and class weighing method were implemented. [PERSON] et al. proposed a novel deep NN that takes series of three packets as input so that features of packets that are continuous between packets can be considered by the system [62]. [PERSON] and [PERSON] method interprets encrypted packets as greyscale images [63]. The images are classifies the by a convolutional NN. In implementation a convolutional NN was trained on VPN traffic and was able to classify similar traffic with 97.3% accuracy. [PERSON] et al.