Skip to content

ANKASecure Performance Benchmarks

Overview

This section contains comprehensive performance benchmarks for the ANKASecure Post-Quantum Cryptography Platform, measuring cryptographic operation efficiency across classical and post-quantum algorithms.

All benchmarks follow a consistent micro-benchmark methodology using JUnit 5 parameterized tests with:

  • Deterministic execution (sequential, fixed RNG seed for reproducibility)
  • Warm-up and measurement phases (configurable via system properties)
  • Multiple payload sizes (1 KiB → 5 MiB)
  • Comprehensive metrics (wall-clock time, CPU time, heap delta)
  • Median aggregation (robust against outliers)
  • CSV export (for external analysis)

Purpose

These benchmarks serve multiple critical purposes:

🎯 Performance Validation

  • Validate that cryptographic operations meet enterprise performance requirements
  • Identify performance characteristics across algorithm families
  • Establish baseline metrics for regression testing

📊 Algorithm Comparison

  • Compare classical vs. post-quantum algorithm performance
  • Evaluate trade-offs between security level and computational cost
  • Guide algorithm selection for specific use cases

🔬 Architectural Decision Support

  • Provide quantitative data for capacity planning
  • Support hardware sizing and scaling decisions
  • Inform caching and optimization strategies

📈 External Auditing

  • Provide transparent, reproducible evidence of platform capabilities
  • Support security certifications and compliance requirements
  • Enable third-party validation of performance claims

Available Benchmarks

Single-Algorithm Benchmarks

These benchmarks measure performance of individual cryptographic algorithms:

Benchmark Algorithms Operations Measurements Documentation
Encryption/Decryption 50 algorithms JWE Compact encryption/decryption 400 (50 × 8 payload sizes) encryption-performance.md
Re-encryption 50 algorithms JWE Compact re-encryption (key rotation) 400 (50 × 8 payload sizes) reencryption-performance.md
Signature/Verification 39 algorithms JWS Compact signing/verification 312 (39 × 8 payload sizes) signature-performance.md
Re-signing 39 algorithms JWS Compact re-signing (key rotation) 287 (39 × 7-8 payload sizes) resign-performance.md
Streaming Encryption 50 algorithms JWE streaming encrypt/decrypt Pending (~50-80h runtime) encryption-stream-performance.md
Streaming Re-encryption 50 algorithms JWE streaming re-encryption Pending (~50-80h runtime) reencryption-stream-performance.md
Streaming Signature 39 algorithms JWS streaming sign/verify 195 (39 × 5 payload sizes) signature-stream-performance.md
Streaming Re-signing 39 algorithms JWS streaming re-signing 156 (39 × 4 payload sizes) resign-stream-performance.md

Algorithms covered:

  • Symmetric: AES-GCM, AES-CCM, ChaCha20-Poly1305, Camellia-GCM, SEED-GCM, SM4-{GCM,CCM}, ARIA-{GCM,CCM}
  • Classical Asymmetric: RSA (2048-8192), ECDSA (P-256/384/521), EdDSA (Ed25519/448), X25519/X448
  • Post-Quantum KEMs: ML-KEM-{512,768,1024}, FRODO-{976,1344}, HQC-{128,192,256}, BIKE, SABER, NTRU, NTRUPRIME, Classic McEliece
  • Post-Quantum Signatures: ML-DSA-{44,65,87}, FALCON-{512,1024}, SLH-DSA (SPHINCS+), XMSS, LMS
  • MACs: HMAC-SHA{2,3}, KMAC, CMAC-AES, HMAC-SM3, HMAC-Streebog

Composite-Algorithm Benchmarks

These benchmarks measure performance of hybrid composite keys combining classical and post-quantum algorithms:

Benchmark Combinations Mode Measurements Documentation
Composite Encryption 20 combinations COMPOSITE_KEM_COMBINE 160 (20 × 8 payload sizes) composite-encryption-performance.md
Composite Re-encryption 20 combinations COMPOSITE_KEM_COMBINE 160 (20 × 8 payload sizes) composite-reencryption-performance.md
Composite Signature 11 combinations COMPOSITE_SIGNATURE 88 (11 × 8 payload sizes) composite-signature-performance.md
Composite Re-signing 11 combinations COMPOSITE_SIGNATURE 88 (11 × 8 payload sizes) composite-resign-performance.md
Composite Streaming Encryption 20 combinations COMPOSITE_KEM_COMBINE 80 (20 × 4 payload sizes) composite-encryption-stream-performance.md
Composite Streaming Re-encryption 20 combinations COMPOSITE_KEM_COMBINE 40 (20 × 2 payload sizes) composite-reencryption-stream-performance.md
Composite Streaming Signature 11 combinations COMPOSITE_SIGNATURE 44 (11 × 4 payload sizes) composite-signature-stream-performance.md
Composite Streaming Re-signing 11 combinations COMPOSITE_SIGNATURE 44 (11 × 4 payload sizes) composite-resign-stream-performance.md

Composite modes:

  • COMPOSITE_KEM_COMBINE: Combines classical KEM (X25519, X448, P-256/384/521) with PQC KEM (ML-KEM, HQC) through the NIST SP 800-227 key combiner, instantiated by the key's KDF token (HKDF-SHA256 by default). The composite KEM runs recorded here (2026-01-18) predate that combiner, and their HQC-192 / HQC-256 rows ran on HQC-128 material; each page says so
  • COMPOSITE_SIGNATURE: Composite signature scheme — one signature from a classical algorithm (Ed25519, Ed448, P-256/384) and a PQC algorithm (ML-DSA-44/65/87), valid only when both verify

Security constraints:

  • Security level difference ≤ 2 steps
  • Only RECOMMENDED status algorithms
  • NIST FIPS compliance (ML-KEM, ML-DSA)

End-to-End API Latency (External Round-Trip)

A separate, complementary benchmark family measures the full client-observed round-trip latency of the crypto REST endpoints — calling them from outside the platform (through the NGINX edge) instead of calling the crypto engine in-process.

Benchmark Operations Layer Measurements Documentation
End-to-End API Latency encrypt / decrypt / sign / verify / reencrypt / resign TLS + edge + filters + audit + HSM + network + crypto 6 ops × N algorithms × 3 payload sizes e2e-latency/index.md*

These two families are complementary: the micro-benchmarks above isolate the cryptographic cost only; the End-to-End suite captures everything a client waits for. Subtracting one from the other (joined on algorithm + payloadSizeBytes) yields the non-crypto orchestration overhead — see the Latency Attribution* table. It lives in ankasecure-integration-tests, runs against a live deployment, and is classified INTERNAL (its numbers are environment-specific, not a portable platform claim).


Benchmark Methodology

Execution Environment

All benchmarks execute in a controlled, sequential environment:

  • Single-threaded execution (@Execution(SAME_THREAD))
  • Isolated keystores per test (temporary BKS keystores)
  • Mock HSM key protector (pass-through for determinism)
  • Fixed RNG seed (0xC0FFEE_BABEFACE)

Read every figure on these pages as relative, not absolute

The host these runs were executed on is not recorded. No page in this section states the CPU, core count, clock, memory, operating system or JVM build behind its numbers, and that information was not captured at the time — so it cannot be added retrospectively without inventing it. What is known and reproducible is stated above and below: the algorithm set, the payload sizes, the iteration counts, the fixed RNG seed, the single-threaded execution model, the mock HSM, and the run date carried in each CSV filename and page changelog (2025-11 for three superseded runs, 2026-01-18 for every current one).

The practical consequence: compare algorithms against each other within one table, and do not read any millisecond value as a platform capacity figure. Ratios between rows of the same run are meaningful; the absolute magnitudes are a property of an unrecorded machine. Sizing and capacity planning must use a measurement taken on the target hardware — see End-to-End API Latency*, which records its environment because its numbers are environment-specific by construction.

Re-running any suite on a known host (the commands are in Test Execution) reproduces the comparison on hardware you control, which is what the reproducibility claim below actually offers.

Iteration Strategy

Each (algorithm, payload_size) combination undergoes:

  1. Key Generation: Fresh key generated with standard test parameters (100K max usage, 365-day expiry)
  2. Warm-up Phase: 5 iterations (default, configurable via sc.perf.warmup)
  3. Measurement Phase: 10 iterations (default, configurable via sc.perf.measurements)
  4. Cleanup: Key removal, GC hints between iterations

Metrics Collection

For each operation (encrypt/decrypt, sign/verify):

Metric Collection Method Precision
Wall-clock time System.nanoTime() Milliseconds
CPU time ThreadMXBean.getCurrentThreadCpuTime() Milliseconds
Heap delta MemoryMXBean.getHeapMemoryUsage() before/after Kibibytes

Aggregation: Median value across measurement iterations (robust against outliers)

Payload Sizes

All benchmarks test 8 standardized payload sizes:

Size Bytes Use Case
1 KiB 1,024 Small tokens, credentials
5 KiB 5,120 API payloads, JSON documents
10 KiB 10,240 Configuration files
50 KiB 51,200 Medium documents
100 KiB 102,400 Large JSON/XML payloads
500 KiB 512,000 Images, PDFs
1 MiB 1,048,576 Files, archives
5 MiB 5,242,880 Large files, batch data

Output Formats

All benchmarks produce:

  1. Console Output: ASCII table with formatted results
  2. CSV Export: Machine-readable data in /tmp/sc_bench_*/benchmark_*.csv

Test Execution

Running Benchmarks

Single test with default settings (5 warm-up, 10 measurement iterations):

cd ankasecure-core-api
mvn test -Dtest=SCPerformanceEnhancedEncryptionTest

Custom iteration counts:

mvn test -Dtest=SCPerformanceEnhancedSignatureTest \
  -Dsc.perf.warmup=10 \
  -Dsc.perf.measurements=20

All performance benchmarks:

mvn test -Dtest="SCPerformanceEnhanced*Test"

Requirements

  • Java 25 (LTS)
  • Maven 3.9+
  • CPU time metrics enabled (test skips if unavailable)
  • Sufficient heap (recommended: -Xmx4g for 5 MiB payloads)

Expected Runtime

Approximate execution times with default settings:

Compact Benchmarks (1 KiB - 5 MiB payloads):

Benchmark Algorithms/Combinations Runtime (5+10 iterations)
Encryption 50 ~60-90 minutes
Re-encryption 50 ~60-90 minutes
Signature 39 ~45-60 minutes
Re-signing 39 ~40-50 minutes
Composite Encryption 20 ~25-40 minutes
Composite Re-encryption 20 ~25-40 minutes
Composite Signature 11 ~15-25 minutes
Composite Re-signing 11 ~15-25 minutes

Streaming Benchmarks (1 MiB - 100 MiB payloads; the signature suites start at 1 MiB, the rest at 5 MiB):

Benchmark Algorithms/Combinations Runtime (5+10 iterations)
Streaming Signature 39 ~50-70 minutes
Streaming Re-signing 39 ~50-70 minutes
Composite Streaming Signature 11 ~20-30 minutes
Composite Streaming Re-signing 11 ~20-30 minutes

Total: ~7-10 hours for the twelve benchmarks listed in the two tables above. The two composite streaming suites and the two pending non-composite streaming suites are not included in that figure.


Performance Summary

Based on the latest benchmark runs, the ANKASecure platform demonstrates:

✅ Enterprise-Grade Performance

  • Sub-millisecond operations for most algorithms at small payload sizes
  • Linear scaling with payload size for streaming operations
  • Predictable memory footprint (heap deltas proportional to key size)

✅ Post-Quantum Readiness

  • ML-KEM (Kyber) encryption competitive with classical ECDH
  • ML-DSA (Dilithium) signatures ~2-3× slower than EdDSA but acceptable for most use cases
  • Composite keys overhead minimal (~10-20% vs single-algorithm operations)

✅ Algorithm Diversity

  • 50+ encryption algorithms spanning symmetric, classical asymmetric, and PQC KEMs
  • 40+ signature algorithms including MACs, classical signatures, and PQC schemes
  • 30+ composite combinations with security level validation

📊 Key Findings

  • Fastest encryption: ChaCha20-Poly1305, AES-GCM (hardware-accelerated)
  • Fastest PQC KEM: ML-KEM-512 (~5-10ms for 1 KiB payloads)
  • Fastest signatures: Ed25519, HMAC-SHA256 (<1ms for small payloads)
  • Fastest PQC signature: ML-DSA-44 (~10-15ms for 1 KiB payloads)
  • Memory efficiency: Most operations <10 MiB heap delta even for 5 MiB payloads

  • End-to-End API Latency* - External round-trip latency suite + the crypto-vs-overhead attribution
  • Scalability Architecture* - High-level performance architecture

Changelog

Date Change Author
2026-01-18 Created benchmark index with composite algorithm benchmarks ANKASecure Performance Team
2026-01-18 Added composite encryption and signature performance tests ANKASecure Performance Team
* restricted content — see higher-tier documentation