A CUDA and OpenMP implementation of Fei.et.al Practical parallel AES algorithms on cloud for massive users and their performance evaluation
.
Advanced Encryption Standard (AES) is a symmetric-key algorithm and is one of the strongest standards for electronic encryption in the world. It is widely used in software, hardware as well as in cloud applications. However, AES takes quite some time to encrypt messages especially when the number of users as well as the length of the text is quite large, which is the case in cloud enviroments.
This is primarily because AES is implemented in a serial fashion. In the paper titled Fei.et.al Practical parallel AES algorithms on cloud for massive users andtheir performance evaluation
, the authors have brought out a parallel implementation for AES on the GPU as well as the CPU, which can be easily virtualised on cloud enviroments.
AES is parallelisable as it is a symmetric block ciper and the encryption of each block is independent of the other blocks and as a result this can be done in a parallel fashion. The paper uses the concepts of coalescing and slicing.
- Coalescing : Putting together all the users' data together from the buffer to a contingous memory location.
- Slicing : Dividing the coalesced data into equal parts so workload amongst threads is distributed evenly.
The paper defines 6 algorithms, namely:
GCS
: GPU Coalescing and SlicingGCNS
: GPU Coalescing and no SlicingGNC
: GPU no Coalescing and no SlicingCCS
: CPU Coalescing and SlicingCCNS
: CPU Coalescing and no SlicingCNC
: CPU no Coalescing and no Slicing
All these algorithms have been implemented in this project and the results have been recorded, visualised and verified.
g++
or any other standardized C++ compiler- A NVIDIA GPU for CUDA based algorithms
nvcc
, from the CUDA development kitOpenMP
, for CPU parallelisation
- Clone this repository
git clone https://github.com/gurupunskill/parallel-aes.git
. - Change directory to
parallel-aes/src
.- Change directory to
generator
. - Run
g++ generate.cpp
and./a.out
. This creates a dataset which will be used by the algorithms. - Change directory to any one of the 7 implemented AES algorithm. For instance,
gcs
would hold the GCS algorithm. - Run
g++ <algo-name>.cpp
and./a.out
. You will view the corresponding times on the console. - Change directory to
prop_dataset
to view the ciper texts in your text editor.
- Change directory to
docs
: All the documentation for the project is present in this folder.img
: Images of graphs showing results of each algorithm are present here.AES-explanatory-paper.pdf
: The paper that was used to learn AES from.Fei_et_al-2016-Concurrency_and_Computation%3A_Practice_and_Experience.pdf
: The research paper being implemented.NIST FIPS AES.pdf
: The paper that was used to learn AES from.
src
: Source code for the project is present in this folderccns
: Source code for the implementation of CCNS algorithm.ccs
: Source code for the implementation of CCS algorithm.cnc
: Source code for the implementation of CNC algorithm.gcns
: Source code for the implementation of GCNS algorithm.gcs
: Source code for the implementation of GCS algorithm.generator
: Source code for producing a normalised random dataset which is used for encryption tests and analysis.gnc
: Source code for the implementation of GNC algorithm.include
: Contains the source code for the header files defined by us.aeslib.hpp
: Source code for the header file containing AES code.genlib.hpp
: Source code for the header file containing general common functions.paralellcore.cuh
: Source code for the header file containing functions and kernels for CUDA implementation of AES.parallelcpu.hpp
: Source code for the header file containing unctions for OpenMP implementation of AES.
norm_dataset
: The normalised dataset along with cipher texts (this file will be present once code is run on local repository)sequential
: Source code for the implementation of serial AES algorithm.final_data.csv
: CSV file where results are dumped into. Used for plotting graphs.
.gitignore
: Files to be ignored during commits by git.License
: MIT licenseREADME.md
: Document giving a brief overview of the project.
C++
: C++ was the primary programming language used for implementing the algorithms.python
: The Python programming language was used to visulaise the results by plotting graphs.CUDA
: CUDA platform was used to implement the three GPU algorithms as it provides architecture for parallel computing on the GPU.OpenMP
: OpenMP platform was used to implement the three CPU algorithms as it provides architecture for parallel computing on the CPU.VSCode
: VSCode was the primary text editor used.github
: Github was used for collaboration and as a version control system.
The code was executed and tested with a uniformly random dataset of 100 files to 1000 files. Each file had random data from 30KB to 150KB generated using a pseudo random generator.
The results are concurrent with that of those published in the paper.
- Gurupungav Narayanan 16CO128
- Nihal Haneef 16CO114