ANKASecure Composite Streaming Resign Micro-Benchmark
Overview
This document describes the methodology, scope, and results of the SecureCore Composite Streaming Resign Micro-Benchmark, a performance test suite designed to evaluate the cryptographic efficiency of COMPOSITE_SIGNATURE composite key resigning operations in streaming mode within the AnkaSecure system.
This benchmark systematically measures composite signature resigning performance for hybrid composite keys that combine classical and post-quantum signature algorithms across multiple large payload sizes using streaming I/O. The resign operation validates an existing detached composite JWS (flattened JSON, RFC 7797 b64:false) and generates a new composite signature with a different composite key using streaming, providing empirical evidence of the platform's ability to deliver quantum-resistant signature rotation 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 SCPerformanceEnhancedStreamingCompositeResignTest in ankasecure-core-api (mvn test -Dsc.suite.exclude=none -Dgroups=performance -Dtest=SCPerformanceEnhancedStreamingCompositeResignTest), 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 resign operations for quantum-resistant key rotation on large files.
-
Compare classical and post-quantum algorithm combinations in streaming resign workflows.
-
Quantify the performance overhead of composite signature verification and regeneration in streaming mode.
-
Provide externally auditable evidence of the platform's enterprise-grade composite streaming resign capabilities.
Scope
-
Operations:
- Composite signature validation of the existing detached JWS using streaming I/O (both components must verify)
- Composite signature generation with the new composite key, producing a new detached JWS with one composite signature using streaming I/O
-
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
-
Initial Composite Key Generation: A source 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:
-
Target Composite Key Generation: A new target composite key is generated (different key material, same algorithm combination)
-
Initial Signing: Create an initial detached composite JWS with the source composite key using streaming I/O
-
Warm-up Loop: The system runs several streaming resign operations to stabilize JIT compilation and memory allocation
-
Measurement Loop: The following metrics are collected per iteration:
- Wall-clock time for streaming resigning (milliseconds)
- Thread-level CPU time for streaming resigning (milliseconds)
- Heap memory delta during streaming resigning (KiB)
-
Validation:
- The new signature must verify successfully with the target composite key using streaming I/O
- The benchmark fails the iteration if verification returns
falseor signature isnull
🔐 Composite Streaming Resigning Process
Streaming resign operation (composite verification + composite signing):
- Parse the existing flattened detached JWS; check
b64:false,critand the compositealg - Stream the payload through the pre-hash of the source signing input
- Recompute the source message representative M' and verify both components against the source key's material that
ank_kvselects - Refuse the resign unless both components verify; nothing is written to the new JWS otherwise
- Pre-hash the target signing input over the same payload, form the target M' and sign it with ML-DSA (context = Label) and with the classical algorithm
- Return the new flattened detached JWS with one composite signature
🧠 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 for streaming resigning:
| 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 |
| RESIGN | Median wall-clock time for streaming resigning | Milliseconds |
| CPU-R | Median thread CPU time for streaming resigning | Milliseconds |
| MEM-R | Median heap delta for streaming resigning | 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_resign_20260118_195200.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 | RESIGN | CPU-R | MEM-R
----------+-----------+-------------+---------+----------+--------
Ed25519 | ML-DSA-44 | 5.242.880 | 96 | 93 | 45.101
Ed25519 | ML-DSA-44 | 10.485.760 | 197 | 187 | 65.582
Ed25519 | ML-DSA-44 | 52.428.800 | 893 | 875 | 188.468
Ed25519 | ML-DSA-44 | 104.857.600 | 1768 | 1734 | 352.305
Ed25519 | ML-DSA-65 | 5.242.880 | 104 | 101 | 45.085
Ed25519 | ML-DSA-65 | 10.485.760 | 188 | 187 | 65.592
Ed25519 | ML-DSA-65 | 52.428.800 | 939 | 929 | 333.887
Ed25519 | ML-DSA-65 | 104.857.600 | 1805 | 1796 | 612.415
Ed448 | ML-DSA-65 | 5.242.880 | 95 | 93 | 55.351
Ed448 | ML-DSA-65 | 10.485.760 | 175 | 171 | 104.503
Ed448 | ML-DSA-65 | 52.428.800 | 882 | 859 | 333.888
Ed448 | ML-DSA-65 | 104.857.600 | 1606 | 1570 | 612.417
Ed448 | ML-DSA-87 | 5.242.880 | 114 | 109 | 55.359
Ed448 | ML-DSA-87 | 10.485.760 | 178 | 171 | 104.511
Ed448 | ML-DSA-87 | 52.428.800 | 879 | 875 | 333.893
Ed448 | ML-DSA-87 | 104.857.600 | 1605 | 1593 | 612.426
P-256 | ML-DSA-44 | 5.242.880 | 95 | 93 | 0
P-256 | ML-DSA-44 | 10.485.760 | 173 | 171 | 0
P-256 | ML-DSA-44 | 52.428.800 | 745 | 742 | 0
P-256 | ML-DSA-44 | 104.857.600 | 1435 | 1421 | 0
P-256 | ML-DSA-65 | 5.242.880 | 81 | 78 | 0
P-256 | ML-DSA-65 | 10.485.760 | 161 | 156 | 0
P-256 | ML-DSA-65 | 52.428.800 | 725 | 726 | 0
P-256 | ML-DSA-65 | 104.857.600 | 1551 | 1546 | 0
P-384 | ML-DSA-44 | 5.242.880 | 74 | 78 | 0
P-384 | ML-DSA-44 | 10.485.760 | 134 | 140 | 0
P-384 | ML-DSA-44 | 52.428.800 | 626 | 625 | 0
P-384 | ML-DSA-44 | 104.857.600 | 1193 | 1187 | 0
P-384 | ML-DSA-65 | 5.242.880 | 67 | 62 | 0
P-384 | ML-DSA-65 | 10.485.760 | 151 | 140 | 0
P-384 | ML-DSA-65 | 52.428.800 | 692 | 695 | 0
P-384 | ML-DSA-65 | 104.857.600 | 1295 | 1296 | 0
P-384 | ML-DSA-87 | 5.242.880 | 77 | 78 | 0
P-384 | ML-DSA-87 | 10.485.760 | 149 | 148 | 0
P-384 | ML-DSA-87 | 52.428.800 | 661 | 656 | 0
P-384 | ML-DSA-87 | 104.857.600 | 1290 | 1288 | 0
P-521 | ML-DSA-65 | 5.242.880 | 85 | 78 | 0
P-521 | ML-DSA-65 | 10.485.760 | 150 | 156 | 0
P-521 | ML-DSA-65 | 52.428.800 | 685 | 679 | 0
P-521 | ML-DSA-65 | 104.857.600 | 1379 | 1375 | 0
P-521 | ML-DSA-87 | 5.242.880 | 82 | 78 | 0
P-521 | ML-DSA-87 | 10.485.760 | 147 | 140 | 0
P-521 | ML-DSA-87 | 52.428.800 | 690 | 687 | 0
P-521 | ML-DSA-87 | 104.857.600 | 1338 | 1343 | 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 resigning time: 504 ms (across all measurements)
Performance Observations
Based on benchmark results with default settings (5 warm-up, 10 measurement iterations):
✅ Memory-Efficient Composite Key Rotation
Composite streaming resign operations demonstrate exceptional memory efficiency for large files:
- Ed-based combinations: Heap delta scales linearly with payload size (~45-612 KiB)
- EC-based combinations (P-256, P-384, P-521): Zero heap delta across all payload sizes (optimal streaming)
🔍 Algorithm Characteristics
Fastest streaming resign combinations:
- P-384 + ML-DSA-65: ~67-1295ms (5-100 MiB payloads)
- P-521 + ML-DSA-87: ~82-1338ms (5-100 MiB payloads)
- P-256 + ML-DSA-65: ~81-1551ms (5-100 MiB payloads)
Performance by algorithm family:
- Ed-based (Ed25519, Ed448): Moderate performance with predictable heap usage
- EC-based (P-256, P-384, P-521): Excellent performance with zero heap overhead
📊 Scalability
- Linear scaling with payload size (2026-01-18 measurement: dominated by streaming both algorithms over the payload for verification and for signing)
- Memory efficiency: Ed-based combinations show modest heap growth; EC-based show zero heap growth
- Optimal for large files: Composite streaming resign maintains acceptable performance for 100+ MiB payloads
🚀 Production Readiness
Composite streaming resign operations are production-ready for quantum-resistant key rotation on large files:
- Key lifecycle management: Acceptable latency for rotating composite keys on large documents
- Certificate renewal: Suitable for composite-signature certificate re-issuance on large files
- Quantum migration: Practical performance for transitioning between composite key pairs with large payloads
- Defense-in-depth: Provides quantum resistance with minimal streaming overhead
Comparison to Compact Mode Composite Resign
| Operation | Compact Mode (Ed25519 + ML-DSA-44, 1 MiB) | Streaming Mode (Ed25519 + ML-DSA-44, 5 MiB) | Performance |
|---|---|---|---|
| Resign | ~42ms | ~96ms | ~5× larger payload, ~2.3× time (sub-linear!) |
| Memory | 8.192 KiB | 45.101 KiB | ~5.5× more (still efficient) |
Key insight: Streaming mode provides better scalability for large payloads with acceptable memory overhead.
Comparison to Single-Algorithm Streaming Resign
| Operation | Single (Ed25519) | Composite (Ed25519 + ML-DSA-44) | Overhead |
|---|---|---|---|
| 5 MiB resign | ~170ms | ~96ms | ~0.56× (faster!) |
| 10 MiB resign | ~362ms | ~197ms | ~0.54× (faster!) |
| 50 MiB resign | ~1331ms | ~893ms | ~0.67× (faster!) |
| 100 MiB resign | ~2283ms | ~1768ms | ~0.77× (faster!) |
Key insight (2026-01-18 measurement, two separate signatures): composite streaming resign was faster than single-algorithm resign because the two component pipelines ran in parallel. The composite construction pre-hashes the stream once, so this comparison 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=SCPerformanceEnhancedCompositeStreamResignTest \
-Dsc.perf.warmup=10 \
-Dsc.perf.measurements=20
Expected runtime: ~8-12 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,RESIGN_MS,CPU_RESIGN_MS,RESIGN_MEM_KIB
Ed25519,ML-DSA-44,5242880,96,93,45101
Ed25519,ML-DSA-44,10485760,197,187,65582
...
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 Resign Performance - COMPOSITE_SIGNATURE compact mode resign
- Resign Stream Performance - Single-algorithm streaming resign
- Composite Signature Stream Performance - COMPOSITE_SIGNATURE streaming signature
- Benchmark Index - Overview of all performance benchmarks
Implementation Details
Test class: SCPerformanceEnhancedCompositeStreamResignTest.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.resignCompositeDataStreamJws()- Composite JWS streaming resign operation
Thread safety: Single-threaded execution (@Execution(SAME_THREAD))
Lifecycle: Per-class instance (@TestInstance(Lifecycle.PER_CLASS))
Security Considerations
✅ Defense-in-Depth
Composite streaming resign maintains dual-layer security throughout key rotation on large files:
- Classical signature validation protects against current threats
- PQC signature validation protects against future quantum threats
- All-or-nothing verification: both components of the source signature must verify before resigning
✅ Algorithm Diversity
Combining different algorithm families (ECC + lattice-based) reduces risk during key rotation:
- Ed25519/Ed448/P-curves: Discrete logarithm problem (DLP) hardness
- ML-DSA: Module-LWE (Learning With Errors) hardness
✅ Memory Safety
Streaming operations ensure constant or sub-linear memory usage regardless of file size, preventing memory exhaustion attacks during key rotation.
Conclusion
This benchmark provides strong, reproducible evidence that SecureCore's composite streaming resign operations:
-
Efficiently support quantum-resistant key rotation on large files 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 or sub-linear performance scaling.
-
Offer exceptional memory efficiency critical for key rotation in cloud, enterprise, and archival environments.
-
Demonstrate that composite key rotation is production-ready for large-scale streaming scenarios with performance that can exceed single-algorithm operations.
These results demonstrate SecureCore's readiness for quantum-safe key rotation on large files, regulatory compliance, and future-proof cryptographic agility in enterprise key management scenarios.
Changelog
| Date | Change | Author |
|---|---|---|
| 2026-01-18 | Created composite streaming resign performance benchmark | ANKASecure Performance Team |
| 2026-01-18 | Validated 11 COMPOSITE_SIGNATURE combinations across 44 streaming measurements | ANKASecure Performance Team |