EUROCRYPT 2025
Committing Authenticated Encryption: Generic Transforms with Hash Functions
README
Artifact for EUROCRYPT'25 Paper "Committing Authenticated Encryption: Generic Transforms with Hash Functions"
This is the artifact for EUROCRYPT'25 Paper titled "Committing Authenticated Encryption: Generic Transforms with Hash Functions" (ePrint) by Shan Chen and Vukašin Karadžić. The artifact contains implementation of some generic transforms (some are original to our work, some are from previous work by other authors) in OpenSSL and wolfSSL libraries. In addition, it contains Dockerfiles used to build Docker images that have all dependencies and C executable installed. Finally, we also provide Python script that runs benchmark over our implementations to measure and compare the encryption speeds, and another Python script that builds two standalone TeX files (containing plot drawn in TiKZ) which can be compiled to PDFs containing figures that nicely visualize the speed comparison.
Building and running the artifact requires that the Docker tool, python3
, as well as cpupower
Linux command, are set up on the host machine. Installing those three (in case they are not already part of your Linux distribution) is plain and simple following instructions from the internet, we omit them for clarity of this artifact.
Structure
comm-transforms-openssl/
subfolder contains implementation (and build) files for implementing and testing the speed of implemented transforms in OpenSSL library.comm-transforms-wolfssl/
subfolder contains implementation (and build) files for implementing and testing the speed of implemented transforms in wolfSSL library.generate-fig-texs.py
is a Python program that creates TeX filesbasic-transform-figure.tex
andadvanced-transforms-figure.tex
that can then be built into PDF's containing comparison figures.*-template.tex
files contain TeX template files that are used bygenerate-fig-texs.py
.
Setting Up and Running the Tests
- The results in our paper are from tests ran on a notebook (Ubuntu 20.04) using Intel Core i5-8265U CPU (Skylake microarchitecture), with the base frequency of 1.6GHz and the hyper-threading, frequency scaling and turbo mode functionalities disabled; meaning, the benchmarks on our implementations ran on a CPU with fixed frequency of 1.6GHz.
To simulate that environment, one can set the frequency on a Ubuntu machine usingcpupower frequency-set --min 1.6GHz
andcpupower frequency-set --max 1.6GHz
, which sets the min and max limits of all CPU's frequencies, meaning the CPU, i.e. its cores, should run at the speed of around 1.6GHz (note: it is optimal to build Docker images on the default CPU setting of host machine, and then limit the CPU frequency only for running the Docker images).
Furthermore that means that the Docker images containing the implementation(s) should run around the same speed.
To get more "precise" results (without the small overhead of running Docker container), one can follow the steps from Dockerfiles and install dependencies on host machine, as well as compiling the C executable and running Python scripts on the host machine.
Benchmarking OpenSSL Implementations
- Enter the
comm-transforms-openssl
subfolder (i.e.cd comm-transforms-openssl
). - Run
docker build -t openssl-test .
- Run
docker run -e LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH openssl-test > openssl-results.txt
Benchmarking wolfSSL Implementations
- Enter the
comm-transforms-wolfssl
subfolder (i.e.cd comm-transforms-wolfssl
). - Run
docker build -t wolfssl-test .
- Run
docker run -e LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH wolfssl-test > wolfssl-results.txt
Extracting the Results
- copy
openssl-results.txt
fromcomm-transforms-openssl
subfolder andwolfss-results.txt
fromcomm-transforms-wolfssl
subfolder to the main folder (wheregenerate-fig-texs.py
script is located). - run
python3 generate-fig-texs.py
; this script generatesbasic-transform-figure.tex
andadvanced-transform-figure.tex
files using theopenssl-results.txt
andwolfssl-results.txt
- build
basic-transforms-figure.tex
(resp.advanced-transforms-figure.tex
) using your favorite TeX compiler to getbasic-transforms-figure.pdf
(resp.advanced-transforms-figure.tex
) containing the graphical representation of the results found in Figure 12 (resp. Figure 13).
Disclaimer
This code is provided for research and evaluation purposes only. As such, this code is provided "as is", without warranty of any kind. The code should not be used in production directly.