Benchmarks¶
tools/benchmark.py measures the SDK in process with local keys, so the
figures isolate the SDK and its cryptography from any network. Each figure
is the median of seven runs after a warm-up (three for the stream). Run it
on your own hardware before planning capacity:
python tools/benchmark.py --json results.json
Reference run¶
Date: 2026-11-30.
Machine: a four-thread Intel laptop CPU (7th generation) on Windows.
Software: Python 3.13.2, pyca/cryptography 50.0.2, OpenSSL 4.0.3.
Scenario |
Size |
Per operation |
Throughput |
|---|---|---|---|
seal (X25519 HPKE recipient) |
1 KiB |
0.631 ms |
- |
open (X25519 HPKE recipient) |
1 KiB |
0.462 ms |
- |
seal (X25519 HPKE recipient) |
64 KiB |
0.480 ms |
130 MiB/s |
open (X25519 HPKE recipient) |
64 KiB |
0.498 ms |
126 MiB/s |
seal (X25519 HPKE recipient) |
1 MiB |
2.922 ms |
342 MiB/s |
open (X25519 HPKE recipient) |
1 MiB |
3.039 ms |
329 MiB/s |
seal (X25519 HPKE recipient) |
16 MiB |
45.590 ms |
351 MiB/s |
open (X25519 HPKE recipient) |
16 MiB |
47.011 ms |
340 MiB/s |
seal (ML-KEM-768 + X25519 recipient) |
1 KiB |
0.983 ms |
- |
open (ML-KEM-768 + X25519 recipient) |
1 KiB |
1.039 ms |
- |
seal_stream (1 MiB records) |
256 MiB |
1,282.710 ms |
200 MiB/s |
open_range (4 KiB from the middle) |
4 KiB |
1.589 ms |
- |
seal+open, 10 ms key service (direct key service) |
- |
27.405 ms |
- |
seal+open, 10 ms key service (hierarchical branch key) |
- |
1.628 ms |
- |
COSE-HPKE encrypt0 (HPKE-0) |
1 KiB |
0.440 ms |
- |
COSE-HPKE decrypt0 (HPKE-0) |
1 KiB |
0.557 ms |
- |
Reading the figures¶
Small envelopes. These are bound by the recipient’s public-key operation, about half a millisecond for X25519 HPKE. The post-quantum hybrid recipient adds roughly half a millisecond more.
Large envelopes. These run at AES-256-GCM speed, about 340 MiB/s on this CPU, and memory use stays bounded for streams.
Range reads. A range read authenticates only the records it returns. Reading 4 KiB from the middle of a 64 MiB envelope takes about as long as opening a 1 KiB envelope.
Hierarchical keys (RFC-0026). In production the key-service round trip dominates. With a simulated 10 ms service, every direct envelope pays two round trips. Hierarchical keys pay one per branch key per cache lifetime, about 17 times faster here, and the key service sees a correspondingly smaller bill and quota use.