Automated Performance Testing Scripts - crt26/pqc-evaluation-tools GitHub Wiki

Automated Computational Performance Testing Scripts

The Liboqs PQC performance testing utilises a single bash script to conduct the automated benchmarking. This script performs CPU speed testing and memory usage profiling for supported KEM and digital signature algorithms. It is designed to be run interactively, prompting the user for test parameters such as the machine ID and number of test iterations.

full-liboqs-test.sh

This script performs fully automated CPU and memory performance benchmarking of the algorithms included in the Liboqs library. It runs speed tests using Liboqs' built-in benchmarking binaries and uses Valgrind with the massif tool to capture detailed memory usage metrics for each cryptographic operation. The results are stored in dedicated directories, organised by machine ID, and can be parsed later using the project's parsing tools.

The script handles:

  • Setting up environment and directory paths

  • Prompting the user for test parameters (machine ID and number of runs)

  • Performing repeated speed and memory tests for each algorithm

  • Organising raw result files for easy parsing

Speed Test Functionality:

The speed test functionality benchmarks the execution time of KEM and digital signature algorithms using the Liboqs speed-kem and speed-sig tools. Results are saved to the test-data/up-results/liboqs/machine-x/raw-speed-results directory.

Memory Testing Functionality:

Memory usage is profiled using the Liboqs test-kem-mem and test-sig-mem tools in combination with Valgrind’s Massif profiler. This setup captures detailed memory statistics for each cryptographic operation. Profiling data is initially stored in a temporary directory, then moved to test-data/up-results/liboqs/machine-x/mem-results.

All results are saved in the test-data/up-results/liboqs/machine-x directory, where x corresponds to the assigned machine ID.