Skip to content

A one-off measurement of AES-256-GCM throughput: BearSSL at the pinne… #1

A one-off measurement of AES-256-GCM throughput: BearSSL at the pinne…

A one-off measurement of AES-256-GCM throughput: BearSSL at the pinne… #1

Workflow file for this run

# A one-off measurement, on a temporary branch deleted afterwards: AES-256-GCM
# throughput, sealing and opening 1 MiB per round, through BearSSL (the mirror
# webcpporg/bearssl at the commit webcpp pins; AES-NI and PCLMUL chosen at run
# time when the CPU has them) and through the runner's OpenSSL.
name: AES-GCM throughput
on:
push:
branches: [bench/aes-gcm-x86]
permissions:
contents: read
jobs:
bench:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: The CPU
run: |
uname -m
if [ -r /proc/cpuinfo ]; then
grep -m1 'model name' /proc/cpuinfo || true
grep -m1 -o -w -e aes -e pclmulqdq -e vaes /proc/cpuinfo | sort -u | tr '\n' ' '; echo
else
sysctl -n machdep.cpu.brand_string
fi
- name: BearSSL at the pinned commit
run: |
git clone --quiet https://github.com/webcpporg/bearssl.git bearssl
git -C bearssl checkout --quiet 7bea48e5e850ab4cafbe68d3765cdaba13a86d6f
make -C bearssl -j4 lib > /dev/null
ls -l bearssl/build/libbearssl.a
- name: OpenSSL
run: |
if [ "$RUNNER_OS" = Linux ]; then
sudo apt-get install -y -qq libssl-dev > /dev/null
echo "OPENSSL_FLAGS=-lcrypto" >> "$GITHUB_ENV"
else
prefix=$(brew --prefix openssl@3)
echo "OPENSSL_FLAGS=-I$prefix/include -L$prefix/lib -lcrypto" >> "$GITHUB_ENV"
fi
- name: Build
run: |
cc -O2 -Ibearssl/inc bench/seal_bearssl.c bearssl/build/libbearssl.a -o seal_bearssl
cc -O2 bench/seal_openssl.c $OPENSSL_FLAGS -o seal_openssl
- name: Measure, three runs each
run: |
for i in 1 2 3; do ./seal_bearssl 400; done
for i in 1 2 3; do ./seal_openssl 2000; done