This repository introduces new methodology for determining mutual information between secret key and cipher message. The methodology is based on using Artificial Intelligence (AI), specifically neural networks, to determine correlations that can be found in the weak and medium encryption algorithms. Results show the successful performance of proposed methodology by applying it to the Simple Crypt algorithm (developed for purpose of this work), and today's most security algorithms, AES and DES.
N. Vukobrat, S. Adamovic, N. Macek, M. Saracevic, M. Gnjatovic (2020), Cryptanalysis and Security Evaluation Using Artificial Neural Networks, Series: Internet of Everything’s (IoE): Security and Privacy Paradigm (in Book - Integration of WSNs into Internet of Things: A Security Perspective), CRC Press, Taylor & Francis, USA.
Code for generating the dataset, as well as the code for training the neural networks is developed on Ubuntu 19.04 OS. Following hardware specification consists of:
- CPU: Intel Core i7-4770 CPU @ 3.40GHz x 8
- GPU karta: GeForce GTX 1080 Ti/PCIe/SSE2
- RAM: Kingston HyperX Fury Red 16 GB (2 x 8 GB)
The chosen language is Python 3.6. The reason being is a wast number of functionalities, libraries and fast development rate. Most significant, used Python libraries, are:
- TensorFlow v1.11.0
- PyCrypto v2.6.1
- NumPy v1.16.3
- Scikit-learn v0.21
- TensorBoard v1.11.0
from which TensorFlow is the major for training the neural network, while PyCrypto for generating training dataset.
To execute experiments as optimal as possible, CUDA drivers are used alongside GPU drivers. This enables TensorFlow to do all calculations directly on GPU and by that to speed up the training process of the network.
For having an easier way for adjustment and setup, Docker is used with Nvidia support. This enables an isolated environment for development and testing.
Simple Crypt train results on single character dataset. |
Simple Crypt test results on single character dataset. |
AES train results on single character dataset. |
AES test results on single character dataset. |
DES train results on single character dataset. |
DES test results on single character dataset. |
Simple Crypt train results on single word dataset. |
Simple Crypt test results on single word dataset. |
AES train results on single word dataset. |
AES test results on single word dataset. |
DES train results on single word dataset. |
DES test results on single word dataset. |
Simple Crypt train results on single sentence dataset. |
Simple Crypt test results on single sentence dataset. |
AES train results on single sentence dataset. |
AES test results on single sentence dataset. |
DES train results on single sentence dataset. |
DES test results on single sentence dataset. |
Simple Crypt train results on full cipher length. |
Simple Crypt test results on full cipher length. |
Simple Crypt train results on partial cipher length. |
Simple Crypt test results on partial cipher length. |
Simple Crypt train results on random partial cipher length. |
Simple Crypt test results on random partial cipher length. |
AES train results on full cipher length. |
AES test results on full cipher length. |
AES train results on partial cipher length. |
AES test results on partial cipher length. |
AES train results on random partial cipher length. |
AES test results on random partial cipher length. |
DES train results on full cipher length. |
DES test results on full cipher length. |
DES train results on partial cipher length. |
DES test results on partial cipher length. |
DES train results on random partial cipher length. |
DES test results on random partial cipher length. |