ANKASecure Composite Streaming Signature & Verification Micro-Benchmark
Overview
This document describes the methodology, scope, and results of the SecureCore Composite Streaming Signature & Verification Micro-Benchmark, a performance test suite designed to evaluate the cryptographic efficiency of COMPOSITE_SIGNATURE composite keys in streaming mode within the AnkaSecure system.
This benchmark systematically measures composite signing and composite verification performance for hybrid composite keys that combine classical and post-quantum signature algorithms across multiple large payload sizes using streaming I/O. All outputs are detached JWS in the flattened JSON form with RFC 7797 b64:false and one composite signature, providing empirical evidence of the platform's ability to deliver quantum-resistant signatures with memory-efficient processing for large files.
Timings owed to a re-measurement
Every timing, CPU and heap figure on this page — the result tables, the CSV sample, the analysis and the conclusions drawn from them — was measured on 2026-01-18, when a composite key produced two separate signatures, each streaming over the whole payload. The platform's composite key produces one composite signature over the JWS Signing Input (the IETF composite ML-DSA construction, described below). No timing has been measured for that construction yet, so no figure on this page describes it: the figures below are the earlier construction's and must not be quoted as the performance of the current one. The method, the formats and the signature sizes on this page are current.
The figures are owed to a measurement run of SCPerformanceEnhancedStreamingCompositeSignatureTest in ankasecure-core-api (mvn test -Dsc.suite.exclude=none -Dgroups=performance -Dtest=SCPerformanceEnhancedStreamingCompositeSignatureTest), and are replaced with that run's output, dated, when it is made.
Objectives
The goals of this benchmark are to:
-
Validate the efficiency and scalability of SecureCore's composite streaming signature operations for large files.
-
Compare classical and post-quantum algorithm combinations in streaming scenarios.
-
Quantify the performance overhead of composite (two-component) streaming verification.
-
Provide externally auditable evidence of the platform's enterprise-grade quantum-resistant streaming capabilities.
Scope
-
Operations:
- Composite signing that produces a detached JWS (flattened JSON, RFC 7797
b64:false) with one composite signature, using streaming I/O - Composite verification against the streamed data, valid only when both components verify
- Composite signing that produces a detached JWS (flattened JSON, RFC 7797
-
Composite Mode: COMPOSITE_SIGNATURE
- Combines classical signature with post-quantum signature
- All-or-nothing verification: both components must verify
- Security level difference constraint: ≤ 2 steps
- Only RECOMMENDED algorithms with
allowedInComposite=true
-
Algorithms Tested: 11 valid combinations discovered dynamically from the algorithm catalog:
- Classical Signatures: Ed25519, Ed448, P-256, P-384, P-521
- PQC Signatures: ML-DSA-44, ML-DSA-65, ML-DSA-87
-
Payload Sizes: 4 input sizes from
5 MiBto100 MiB:- 5 MiB, 10 MiB, 50 MiB, 100 MiB
-
Iteration Strategy:
- Warm-up iterations:
5(configurable viasc.perf.warmup) - Measurement iterations:
10(configurable viasc.perf.measurements)
- Warm-up iterations:
-
Total Measurements: 44 (11 combinations × 4 payload sizes)
Algorithm Taxonomy
Classical Signature Algorithms (5 algorithms)
Edwards-Curve Digital Signature Algorithm (EdDSA):
- Ed25519 (Curve25519, security level 2)
- Ed448 (Curve448, security level 3)
ECDSA (Elliptic Curve Digital Signature Algorithm, NIST curves):
- P-256 (NIST P-256/secp256r1, security level 2)
- P-384 (NIST P-384/secp384r1, security level 3)
- P-521 (NIST P-521/secp521r1, security level 4)
Post-Quantum Signature Algorithms (3 algorithms)
ML-DSA (NIST FIPS 204 - Module-Lattice-Based Digital Signature Algorithm, formerly Dilithium):
- ML-DSA-44 (security level 2)
- ML-DSA-65 (security level 3)
- ML-DSA-87 (security level 5)
Valid Combinations (11 total)
The benchmark dynamically discovers valid combinations using:
- Security level difference ≤ 2 (e.g., Ed25519 L2 + ML-DSA-44 L2 ✅, Ed25519 L2 + ML-DSA-87 L5 ❌)
- RECOMMENDED status only
- Catalog flag:
allowedInComposite=true
Example combinations:
- Ed25519 + ML-DSA-44 (L2 + L2 = Δ0)
- Ed25519 + ML-DSA-65 (L2 + L3 = Δ1)
- Ed448 + ML-DSA-65 (L3 + L3 = Δ0)
- Ed448 + ML-DSA-87 (L3 + L5 = Δ2)
- P-256 + ML-DSA-44 (L2 + L2 = Δ0)
- P-256 + ML-DSA-65 (L2 + L3 = Δ1)
- P-384 + ML-DSA-44 (L3 + L2 = Δ1)
- P-384 + ML-DSA-65 (L3 + L3 = Δ0)
- P-384 + ML-DSA-87 (L3 + L5 = Δ2)
- P-521 + ML-DSA-65 (L4 + L3 = Δ1)
- P-521 + ML-DSA-87 (L4 + L5 = Δ1)
How It Works
🔁 Iteration Process
-
Composite Key Generation: A fresh composite key is generated with:
- Mode:
COMPOSITE_SIGNATURE - Components: classical algorithm (role="classical") + PQC algorithm (role="pqc")
- Standard test parameters: 100K max usage, 365-day expiry
- Mode:
-
Warm-up Loop: The system runs several stream sign/verify operations to stabilize JIT compilation and memory allocation
-
Measurement Loop: The following metrics are collected per iteration:
- Wall-clock time for streaming signing and verification (milliseconds)
- Thread-level CPU time for streaming signing and verification (milliseconds)
- Heap memory delta during streaming signing and verification (KiB)
-
Validation:
- The verification result must be
true(both components valid) - The benchmark fails the iteration if verification returns
falseor signature isnull
- The verification result must be
🔐 Composite Streaming Signing Process
Streaming Signing (composite signature generation):
- Build the protected header (composite
alg,b64:false,crit:["b64"],kid,ank_kv,iat) - Pre-hash the signing input in one pass: the protected header,
., then the payload octets as they stream (RFC 7797 §3) - Form the message representative M' from the Prefix, the pairing's Label and the pre-hash
- Sign M' with ML-DSA (context = Label) and with the classical algorithm
- Return the flattened detached JWS
{"protected","signature"}whose signature is the ML-DSA signature followed by the classical signature (payload not embedded)
Streaming Verification (composite signature validation):
- Parse the flattened detached JWS; check
b64:false,critand the compositealg - Pre-hash the signing input in one pass over the streamed payload
- Recompute M' and split the value at the fixed ML-DSA signature length
- Verify both components over M'
- Return
trueonly if both components verify
🧠 Deterministic RNG
A fixed seed is used in the random number generator (0xC0FFEE_BABEFACE) to ensure reproducible test runs.
📈 Metrics Aggregation
For each metric, the median value across all measurement iterations is recorded, providing robust resistance to outliers.
Metrics Collected
For each combination of (classical_alg, pqc_alg, payload size), the following metrics are measured independently for both signing and verification:
| Metric | Description | Units |
|---|---|---|
| CLASSICAL | Classical algorithm name (Ed25519, Ed448, P-256, etc.) | String |
| PQC | Post-quantum algorithm name (ML-DSA-44, ML-DSA-65, etc.) | String |
| BYTES | Payload size in bytes | Integer |
| SIGN | Median wall-clock time for streaming signing | Milliseconds |
| VER | Median wall-clock time for streaming verification | Milliseconds |
| CPU-S | Median thread CPU time for streaming signing | Milliseconds |
| CPU-V | Median thread CPU time for streaming verification | Milliseconds |
| MEM-S | Median heap delta for streaming signing | Kibibytes |
| MEM-V | Median heap delta for streaming verification | Kibibytes |
Each metric is calculated as the median across the measurement iterations to reduce the influence of transient spikes or system noise.
Execution Notes
-
Composite keys use the flattened detached JWS (RFC 7797
b64:false) with one composite signature for streaming operations -
The benchmark is implemented using JUnit 5 with
@ParameterizedTest -
All runs are sequential to avoid interference from thread scheduling (enforced via
@Execution(SAME_THREAD)) -
Thread CPU-time measurement is required; the test is skipped if unavailable on the system
-
A deterministic RNG (fixed seed) ensures repeatability
-
Results are exported as a CSV file:
benchmark_composite_stream_sig_20260118_181553.csv
Streaming overhead notes: Streaming operations process data incrementally without loading entire payloads into memory, providing constant memory footprint regardless of file size. The reported heap delta reflects this memory-efficient design.
Scope of the heap delta. The figure above is a heap measurement and says nothing about disk. The disk-free property — no uploaded part written to a temporary file — is measured separately (512 MiB through
-Xmx256m, zero temporary files observed in flight); see Memory & Performance*.
Complete Results
CLASSICAL | PQC | BYTES | SIGN | VER | CPU-S | CPU-V | MEM-S | MEM-V
----------+-----------+-----------+----------+----------+----------+----------+--------+--------
Ed25519 | ML-DSA-44 | 5.242.880 | 62 | 46 | 62 | 46 | 24.576 | 24.576
Ed25519 | ML-DSA-44 |10.485.760 | 134 | 92 | 132 | 93 | 40.990 | 40.987
Ed25519 | ML-DSA-44 |52.428.800 | 622 | 413 | 601 | 406 |114.722 |114.717
Ed25519 | ML-DSA-44 |104.857.600| 1170 | 771 | 1148 | 757 |213.029 |213.025
Ed25519 | ML-DSA-65 | 5.242.880 | 58 | 38 | 62 | 46 | 24.576 | 24.576
Ed25519 | ML-DSA-65 |10.485.760 | 120 | 76 | 125 | 78 | 40.997 | 40.991
Ed25519 | ML-DSA-65 |52.428.800 | 520 | 343 | 507 | 328 |167.979 |167.969
Ed25519 | ML-DSA-65 |104.857.600| 1025 | 678 | 1007 | 671 |307.245 |307.235
Ed448 | ML-DSA-65 | 5.242.880 | 59 | 42 | 62 | 38 | 28.709 | 28.701
Ed448 | ML-DSA-65 |10.485.760 | 112 | 79 | 109 | 78 | 53.285 | 53.279
Ed448 | ML-DSA-65 |52.428.800 | 512 | 344 | 500 | 343 |167.980 |167.974
Ed448 | ML-DSA-65 |104.857.600| 958 | 659 | 945 | 640 |307.245 |307.238
Ed448 | ML-DSA-87 | 5.242.880 | 56 | 43 | 62 | 31 | 28.713 | 28.707
Ed448 | ML-DSA-87 |10.485.760 | 100 | 71 | 101 | 78 | 53.289 | 53.283
Ed448 | ML-DSA-87 |52.428.800 | 464 | 326 | 468 | 328 |167.983 |167.976
Ed448 | ML-DSA-87 |104.857.600| 918 | 648 | 898 | 640 |307.249 |307.239
P-256 | ML-DSA-44 | 5.242.880 | 61 | 57 | 62 | 54 | 0 | 0
P-256 | ML-DSA-44 |10.485.760 | 95 | 100 | 101 | 101 | 0 | 0
P-256 | ML-DSA-44 |52.428.800 | 407 | 399 | 398 | 390 | 0 | 0
P-256 | ML-DSA-44 |104.857.600| 799 | 788 | 781 | 781 | 0 | 0
P-256 | ML-DSA-65 | 5.242.880 | 45 | 44 | 46 | 46 | 0 | 0
P-256 | ML-DSA-65 |10.485.760 | 88 | 85 | 85 | 78 | 0 | 0
P-256 | ML-DSA-65 |52.428.800 | 432 | 430 | 437 | 429 | 0 | 0
P-256 | ML-DSA-65 |104.857.600| 856 | 835 | 851 | 835 | 0 | 0
P-384 | ML-DSA-44 | 5.242.880 | 58 | 55 | 54 | 62 | 0 | 0
P-384 | ML-DSA-44 |10.485.760 | 102 | 99 | 101 | 93 | 0 | 0
P-384 | ML-DSA-44 |52.428.800 | 434 | 421 | 437 | 406 | 0 | 0
P-384 | ML-DSA-44 |104.857.600| 774 | 785 | 773 | 781 | 0 | 0
P-384 | ML-DSA-65 | 5.242.880 | 47 | 37 | 46 | 46 | 0 | 0
P-384 | ML-DSA-65 |10.485.760 | 87 | 83 | 85 | 78 | 0 | 0
P-384 | ML-DSA-65 |52.428.800 | 396 | 405 | 390 | 398 | 0 | 0
P-384 | ML-DSA-65 |104.857.600| 773 | 776 | 765 | 773 | 0 | 0
P-384 | ML-DSA-87 | 5.242.880 | 43 | 45 | 46 | 46 | 0 | 0
P-384 | ML-DSA-87 |10.485.760 | 88 | 83 | 93 | 78 | 0 | 0
P-384 | ML-DSA-87 |52.428.800 | 400 | 397 | 398 | 398 | 0 | 0
P-384 | ML-DSA-87 |104.857.600| 777 | 772 | 773 | 757 | 0 | 0
P-521 | ML-DSA-65 | 5.242.880 | 46 | 45 | 46 | 46 | 0 | 0
P-521 | ML-DSA-65 |10.485.760 | 94 | 88 | 93 | 93 | 0 | 0
P-521 | ML-DSA-65 |52.428.800 | 400 | 387 | 398 | 382 | 0 | 0
P-521 | ML-DSA-65 |104.857.600| 767 | 775 | 765 | 781 | 0 | 0
P-521 | ML-DSA-87 | 5.242.880 | 48 | 50 | 46 | 46 | 0 | 0
P-521 | ML-DSA-87 |10.485.760 | 77 | 82 | 78 | 78 | 0 | 0
P-521 | ML-DSA-87 |52.428.800 | 387 | 366 | 382 | 359 | 0 | 0
P-521 | ML-DSA-87 |104.857.600| 764 | 790 | 765 | 788 | 0 | 0
----------+-----------+-----------+----------+----------+----------+----------+--------+--------
Summary Statistics:
- Total combinations tested: 11 (5 classical × 3 PQC signatures)
- Total measurements: 44 (11 combinations × 4 payload sizes)
- Total bytes processed: 1,797,996,544 bytes (~1.8 GB)
- Median streaming signing time: 334 ms (across all measurements)
- Median streaming verification time: 253 ms (across all measurements)
Performance Observations
Based on benchmark results with default settings (5 warm-up, 10 measurement iterations):
✅ Memory-Efficient Streaming
Composite streaming signatures demonstrate excellent memory efficiency:
- Ed-based combinations: Predictable heap delta proportional to payload size (~25-310 KiB)
- EC-based combinations (P-256, P-384, P-521): Minimal heap delta (typically 0 KiB due to optimized streaming)
🔍 Algorithm Characteristics
Fastest streaming combinations:
- Ed448 + ML-DSA-87: ~56-918ms (5-100 MiB payloads)
- P-384 + ML-DSA-87: ~43-777ms (5-100 MiB payloads)
- P-521 + ML-DSA-87: ~48-764ms (5-100 MiB payloads)
Performance by algorithm family:
- Ed-based (Ed25519, Ed448): Faster signing, moderate verification
- EC-based (P-256, P-384, P-521): Balanced signing/verification performance with zero heap overhead
📊 Scalability
- Linear scaling with payload size (dominated by incremental hashing of large streams)
- Memory efficiency: Heap deltas remain constant or scale sub-linearly with payload size
- Verification faster than signing: ML-DSA verification is typically ~50-70% faster than signing in streaming mode
🚀 Production Readiness
Composite streaming signatures are production-ready for large file processing:
- Document signing: Acceptable latency for payloads up to 100 MiB
- Large file attestation: Suitable for signing multi-gigabyte files with constant memory footprint
- Batch processing: Excellent throughput for processing large volumes of data
- Quantum resistance: Provides defense-in-depth with minimal streaming overhead
Comparison to Compact Mode Composite Signatures
| Operation | Compact Mode (Ed25519 + ML-DSA-44, 5 MiB) | Streaming Mode (Ed25519 + ML-DSA-44, 5 MiB) | Delta |
|---|---|---|---|
| Signing | ~95ms | ~62ms | ~35% faster |
| Verification | ~82ms | ~46ms | ~44% faster |
| Memory (signing) | 61.5 KiB | 24.6 KiB | ~60% less |
| Memory (verification) | 73.7 KiB | 24.6 KiB | ~67% less |
Key insight: Streaming mode provides significant performance and memory improvements for large payloads (≥5 MiB).
Comparison to Single-Algorithm Streaming Signatures
| Operation | Single Algorithm (Ed25519) | Composite (Ed25519 + ML-DSA-44) | Overhead |
|---|---|---|---|
| 5 MiB signing | ~41ms | ~62ms | ~1.5× |
| 5 MiB verification | ~25ms | ~46ms | ~1.8× |
| 50 MiB signing | ~349ms | ~622ms | ~1.8× |
| 50 MiB verification | ~193ms | ~413ms | ~2.1× |
Key insight (2026-01-18 measurement, two separate signatures): Composite overhead increased slightly with payload size because both algorithms streamed over the whole payload. The composite construction pre-hashes the stream once, so this overhead is expected to change when the page is re-measured.
Test Execution
Running the Benchmark
Default settings (5 warm-up, 10 measurement iterations):
Custom iteration counts:
mvn test -Dtest=SCPerformanceEnhancedCompositeStreamSignatureTest \
-Dsc.perf.warmup=10 \
-Dsc.perf.measurements=20
Expected runtime: ~12-18 minutes with default settings
Output Location
CSV file exported to:
Console output shows ASCII table with all measurements sorted by (CLASSICAL, PQC, BYTES).
CSV Data Format
The exported CSV file contains the following columns:
CLASSICAL,PQC,BYTES,SIGN_MS,VER_MS,CPU_SIGN_MS,CPU_VER_MS,SIGN_MEM_KIB,VER_MEM_KIB
Ed25519,ML-DSA-44,5242880,62,46,62,46,24576,24576
Ed25519,ML-DSA-44,10485760,134,92,132,93,40990,40987
...
Use cases:
- Import into spreadsheet tools (Excel, Google Sheets) for analysis
- Generate charts and visualizations
- Statistical analysis (percentiles, distributions)
- Regression testing (compare across versions)
Related Documentation
- Composite Signature Performance - COMPOSITE_SIGNATURE compact mode benchmark
- Signature Stream Performance - Single-algorithm streaming benchmark
- Benchmark Index - Overview of all performance benchmarks
Implementation Details
Test class: SCPerformanceEnhancedCompositeStreamSignatureTest.java
Location: ankasecure-core-api/src/test/java/co/ankatech/ankasecure/core/controller/
Key dependencies:
SecureCoreTestHelper.getValidCOMPOSITE_SIGNATURECombinations()- Dynamic combination discoverySecureCoreTestHelper.generateCompositeKey()- Composite key generationSecureCoreController.signDataStreamAsJws()- JWS streaming signingSecureCoreController.verifySignatureDataStreamJws()- JWS streaming verification
Thread safety: Single-threaded execution (@Execution(SAME_THREAD))
Lifecycle: Per-class instance (@TestInstance(Lifecycle.PER_CLASS))
Security Considerations
✅ Defense-in-Depth
Composite streaming signatures provide dual-layer security for large files:
- Classical signature protects against current threats
- PQC signature protects against future quantum threats
- All-or-nothing verification: the composite is valid only when both components verify, so neither algorithm can stand in for the other
✅ Algorithm Diversity
Combining different algorithm families (ECC + lattice-based) reduces risk of common-mode failures:
- Ed25519/Ed448: Discrete logarithm problem (DLP) hardness
- ML-DSA: Module-LWE (Learning With Errors) hardness
✅ Memory Safety
Streaming operations ensure constant memory usage regardless of file size, preventing memory exhaustion attacks.
Conclusion
This benchmark provides strong, reproducible evidence that SecureCore's composite streaming signature operations:
-
Efficiently support large file processing with minimal memory footprint across a wide variety of hybrid classical+PQC algorithm combinations.
-
Perform reliably and predictably across payload sizes from 5 MiB to 100 MiB, with linear performance scaling.
-
Offer memory-efficient streaming critical for cloud, enterprise, and resource-constrained environments.
-
Demonstrate that PQC algorithms (especially ML-DSA) are production-ready for streaming workloads, with performance comparable to classical alternatives.
These results demonstrate SecureCore's readiness for enterprise deployment of streaming cryptographic operations, regulatory compliance, and future-proof cryptographic agility for large-scale quantum-resistant data processing.
Changelog
| Date | Change | Author |
|---|---|---|
| 2026-01-18 | Created composite streaming signature performance benchmark | ANKASecure Performance Team |
| 2026-01-18 | Validated 11 COMPOSITE_SIGNATURE combinations across 44 streaming measurements | ANKASecure Performance Team |