This repository explores the performance of AES-256 in counter (CTR) mode on x86-64 Linux, with particular attention to Intel Atom E3845 (Silvermont). It contains a multi-backend C benchmark, an Atom-focused implementation, assembly experiments, and scripts for collecting and plotting measurements.
aes.cbenchmarks seven paths: portable C (soft), direct AES-NI (aesni), two optimized AES-NI variants (aesni-native,aesni-atom), OpenSSL EVP (evp,evp-soft), and the Linux AF_ALG crypto interface (afalg). They use the same command-line interface for comparisons across input sizes and iteration counts.aesfinal.cis a separate Atom-oriented AES-NI/CTR benchmark built byMakefile_aesfinal. It experiments with precomputed round keys, unrolled rounds, and two-block processing.assembly/contains inline and standalone assembly experiments and a separate build file. See the assembly notes for their current limitations.benchmark_analysis.pyandquick_test.pyrun the main benchmark at multiple sizes and produce JSON results and PNG/PDF plots. The trackedquick_test_results.jsonandquick_test_plots/are example measurements and charts.
Requirements: x86-64 Linux, a C99-capable GCC, Make, and OpenSSL development headers and libraries. AES-NI modes require a CPU with AES-NI; AF_ALG requires Linux kernel crypto support. The separate Atom-oriented build uses static linking and requires the corresponding static toolchain libraries.
make
./aes --mode soft --size 1048576 --iters 10
./aes --mode evp --size 1048576 --iters 10
make benchmark
make -f Makefile_aesfinal
./aesfinal --size 1048576 --iters 10Run ./aes --help or ./aesfinal --help for their options. make test runs
all seven main modes, including the hardware- and kernel-dependent ones.
Python 3 with NumPy, pandas, Matplotlib, and seaborn is needed for plots. The
repository's make deps target installs these into its venv/ environment.
After building aes, run:
make deps
make quick-analysis
# or, for a larger set of measurements:
make analysismake quick-analysis writes quick_test_results.json and quick_test_plots/;
make analysis writes benchmark_results.json and benchmark_plots/.
Generated measurements depend on the CPU, compiler, kernel, OpenSSL build, and
run conditions; do not treat the checked-in charts or throughput figures as
portable performance guarantees. These programs are benchmark experiments,
not a validated cryptographic library or a substitute for correctness and
security testing before production use.
For more detail, see the main benchmark notes and the Atom-focused implementation notes.