DOI: 10.5061/dryad.ht76hdrrs
title: Performance evaluation artefacts for in-memory encryption using the advanced encryption standard

description: Encryption and decryption of data with very low latency and high energy
 efficiency is desirable in almost every application that deals with
 sensitive data. The Advanced Encryption Standard (AES) is a widely adopted
 algorithm in symmetric key cryptography with numerous efficient
 implementations. Nonetheless, in scenarios involving extensive data
 processing, the primary limitations on performance and efficiency arise
 from data movement between memory and the processor, rather than data
 processing itself. In this paper, we present a novel in-memory computing
 (IMC) approach for AES encryption and key-expansion, and experimentally
 validate it on an IMC prototype chip based on phase-change memory (PCM)
 technology. We leverage operators stored in PCM crossbar arrays to achieve
 the flexibility to tune performance at runtime based on the amount of free
 storage available in the memory system. Additionally, we introduce a
 method for parallel in-memory polynomial modular multiplication and
 evaluate the potential of intrinsic stochastic properties of PCM devices
 for random key generation. We show how to further improve efficiency with
 minimal additional auxiliary circuitry. To evaluate the performance within
 a custom-built large-scale in-memory AES system, we design and implement a
 cycle-accurate simulator that integrates parameters from Spice simulations
 for detailed latency and energy consumption analysis of the AES algorithm.
 Our evaluations indicate that our IMC-based AES approach outperforms
 state-of-the- art methods, achieving speed improvements of up to 19.7× at
 equivalent energy efficiency.
description: The dataset includes benchmarking code in order to reproduce the
 performance evaluations in the paper. Please refer to the README.md for
 further details.
description: # In-memory encryption using the advanced encryption standard artifacts
 This repository includes the code to reproduce the performance plots from
 the paper available at
 [https://doi.org/10.1098/rsta.2023.0396](https://doi.org/10.1098/rsta.2023.0396). ## Reproducing the results ### Using Docker We recommend using docker: ``` docker build . ``` will load all dependencies, compile the model, run the performance benchmarks and store the resulting plots in the **plots/** directory of the conainer. ### **Manual** First install the system dependencies: ``` apt-get update && apt-get install -y curl gnupg apt-utils && \ apt-get install -y apt-transport-https curl gnupg git perl python3 pip make g++ pkg-config curl zip unzip tar ``` Then run: ``` ./setup.sh ``` to set up the environment, install python modules and compile the simulator. Finally, to obtain the performance plots, run: ``` python3 eval_performance.py ``` ## **Directory structure** * **arch_model/** contains the source files to build the simulator, written in C++. clang v15 was used for compilation. * **eval_performance.py** is a notebook that generates the plots. The simulator is recompiled with different configurations when gathering the data for plotting. * **performance_model.py** includes some classes to facilitate analysis. * **requirements.txt** contains the python packages and versions used for plotting.