A lightweight, reproducible benchmark that simulates the cryptographic workload of a simplified ePassport issuance flow, comparing a classical baseline with selected post-quantum cryptography (PQC) signature schemes.
This project was built to explore performance trade-offs in an issuance-like workflow and provide a repeatable way to compare cryptographic costs across different approaches.
The benchmark simulates representative cryptographic steps of an ePassport issuance flow, including:
- Input loading (MRZ, portrait, fingerprints, signature)
- DG blob construction (DG1, DG2, DG3, DG7)
- Hashing of DGs
- Issuance PKI setup (CSCA + Document Signer)
- SOD-like payload signing (Passive Authentication equivalent)
- Active Authentication (AA)
- Chip Authentication (CA)
- Optional simplified PACE
This is not a full ePassport implementation.
- No real EF.COM / EF.SOD generation
- No ASN.1 encoding
- No strict ICAO compliance implementation
- No production PKI
The goal is to model typical cryptographic workload, not to reproduce the exact passport issuance stack.
- Classical path: Python
cryptography - PQC path:
liboqsvialiboqs-python - Fallback mode: simulation if OQS is unavailable
This is not a strict apples-to-apples benchmark.
The compared paths do not rely on identical implementation stacks. In practice, this means the results should be read as prototype-level workload comparisons, not as pure algorithm rankings.
In particular:
- The classical path uses Python-accessible cryptographic libraries.
- The PQC path uses the Open Quantum Safe ecosystem (
liboqs/liboqs-python). - Different languages, bindings, native backends, optimization levels, and implementation maturity can materially influence timing.
Depending on the environment and OQS version, the benchmark targets:
- ML-DSA (Dilithium family / standardized naming)
- SLH-DSA (newer standardized naming related to SPHINCS+ lineage)
Note: algorithm naming may vary across OQS versions.
python passport_issuance_pqc_benchmark_en.py --mrz-file mrz.txt --portrait face.jpg --finger1 f1.wsq --finger2 f2.wsq --signature sig.jpg --suite classic --runs 5 --out report_classic.jsonpython passport_issuance_pqc_benchmark_en.py --mrz-file mrz.txt --portrait face.jpg --finger1 f1.wsq --finger2 f2.wsq --signature sig.jpg --suite pqc-dilithium --runs 5 --out report_dilithium.jsonpython passport_issuance_pqc_benchmark_en.py --mrz-file mrz.txt --portrait face.jpg --finger1 f1.wsq --finger2 f2.wsq --signature sig.jpg --suite pqc-sphincs --runs 5 --out report_sphincs.jsonThe script produces JSON output with:
- Per-step timing
- Total timing
- Aggregate statistics across runs
- Basic environment metadata
Below is a simplified comparison based on sample benchmark runs (All results were generated on a standard laptop Intel x86_64 CPU using default parameters).
- Sign (PA): ~0.00012 s
- Verify (PA): ~0.00008 s
- Total pipeline: ~0.0016 s
✅ Extremely fast
- Sign (PA): ~0.00019 s
- Verify (PA): ~0.00007 s
- Total pipeline: ~0.0038 s
✅ ~2–3× slower than classical
✅ Post-quantum secure
✅ Strong performance/security trade-off
- Sign (PA): ~0.019 s
- Verify (PA): ~0.0012 s
- Total pipeline: ~0.089 s
✅ Strong security assumptions
❌ High computational cost (especially signing)
| Scheme | Sign (PA) | Verify (PA) | Total time |
|---|---|---|---|
| Classic | 0.00012s | 0.00008s | 0.0016s |
| ML-DSA-44 | 0.00019s | 0.00007s | 0.0038s |
| SLH-DSA | 0.019s | 0.0012s | 0.089s |
- Classic → fastest, but not future-proof
- ML-DSA (Dilithium) → best practical trade-off ✅
- SLH-DSA (SPHINCS+) → strongest assumptions, highest cost ❗
⚠️ Note: results depend heavily on hardware, libraries, and environment.
This is a prototype-level workload benchmark, not a strict apples-to-apples comparison.
See sample outputs:
- sample_outputs/report_classic.json
- sample_outputs/report_classic_ecdsa.json
- sample_outputs/report_mldsa44.json
- sample_outputs/report_slh_dsa.json
This project is intended for:
- research
- experimentation
- exploratory benchmarking
It is not intended for production deployment or security-critical use.
MIT License