ANKASecure Streaming Resign Micro-Benchmark
Overview
This document describes the methodology, scope, and results of the SecureCore Streaming Resign Micro-Benchmark, a performance test suite designed to evaluate the cryptographic efficiency of signature resigning operations in streaming mode within the AnkaaSecurity system.
This benchmark systematically measures resigning performance for symmetric (MAC-based) and asymmetric algorithms—both classical and post-quantum (PQC)—across multiple large payload sizes using streaming I/O. The resign operation validates an existing JWS Detached signature and generates a new signature using a different key, providing empirical evidence of the platform's efficiency in signature rotation workflows for large files.
Objectives
The goals of this benchmark are to:
-
Validate the efficiency and scalability of SecureCore's streaming resign operations for large file key rotation.
-
Compare classical and post-quantum algorithm performance in streaming resign scenarios.
-
Generate quantitative metrics for memory-efficient signature rotation of large files.
-
Provide externally auditable evidence of SecureCore's enterprise-grade streaming resign performance.
Scope
-
Algorithms Tested: All algorithms that support
sign/verify(or MAC generate/validate) operations in streaming mode, including symmetric MACs (HMAC with SHA-2/SHA-3/SM3/Streebog, KMAC, CMAC-AES), classical asymmetric signatures (RSA, EC/P-curves, OKP/EdDSA, SM2, GOST) and PQC signature schemes (ML-DSA, FALCON, SLH-DSA, XMSS, LMS). -
Serialization Format: Signatures/MACs are produced and verified using JWS Detached Signature format with streaming I/O.
-
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:
Algorithm Taxonomy
Symmetric / MAC-based (classical):
- HMAC-SHA256, HMAC-SHA384, HMAC-SHA512
- HMAC-SHA3-256, HMAC-SHA3-384, HMAC-SHA3-512
- HMAC-SM3 (Chinese standard)
- HMAC-Streebog-256, HMAC-Streebog-512 (Russian standard)
- KMAC128, KMAC256
- CMAC-AES-128, CMAC-AES-192, CMAC-AES-256
Asymmetric – Classical:
- RSA-2048, RSA-3072, RSA-4096, RSA-6144, RSA-8192
- EC: P-256, P-384, P-521 (NIST curves)
- OKP: Ed25519, Ed448 (Edwards-curve Digital Signature Algorithm)
- SM2 (Chinese elliptic curve signature)
- GOST-R34.10-2012-256 (Russian elliptic curve signature)
Asymmetric – Post-Quantum (PQC):
- ML-DSA-44, ML-DSA-65, ML-DSA-87
- FALCON-512, FALCON-1024
- SLH-DSA-SHA2-128F, SLH-DSA-SHA2-128S
- SLH-DSA-SHA2-192F, SLH-DSA-SHA2-192S
- SLH-DSA-SHA2-256F, SLH-DSA-SHA2-256S
- XMSS, LMS
Metrics Collected
For each combination of (algorithm, payload size), the following metrics are measured for streaming resigning:
| Metric | Description | Units |
|---|---|---|
| Wall-clock Time | Real elapsed time for the streaming resign operation | Milliseconds |
| Thread-level CPU Time | CPU time consumed by the current thread | Milliseconds |
| Heap Delta | Increase in used heap memory during execution | Kibibytes |
Each metric is calculated as the median across the measurement iterations to reduce the influence of transient spikes or system noise.
Execution Notes
-
The streaming resign operation consists of two phases:
- Streaming Verification: Parse and validate the existing JWS Detached signature using streaming I/O
- Streaming Re-signing: Generate a new JWS Detached signature with a different key using streaming I/O
-
Payloads are processed using streaming I/O (
InputStream→resignDataStreamJws) to maintain constant memory footprint -
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_stream_resign_20260118_192107.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*.
Output Format
Each result row captures the full measurement for a specific (algorithm, payload size) pair:
Where:
KTY: Key type (e.g., EC, RSA, SLH-DSA, etc.)ALG: Specific algorithm variantBYTES: Payload size in bytesRESIGN: Median wall-clock time for streaming resigningCPU-R: CPU time for streaming resignMEM-R: Heap delta for streaming resign
At the end of execution, a summary is printed with totals, skipped tests, and the full path to the CSV file generated.
Complete Results
KTY | ALG | BYTES | RESIGN | CPU-R | MEM-R
--------+----------------------+-------------+---------+----------+--------
oct | CMAC-AES-128 | 5.242.880 | 103 | 93 | 0
oct | CMAC-AES-128 | 10.485.760 | 177 | 163 | 0
oct | CMAC-AES-128 | 52.428.800 | 807 | 796 | 40.960
oct | CMAC-AES-128 | 104.857.600 | 1149 | 1124 | 90.112
oct | CMAC-AES-192 | 5.242.880 | 111 | 101 | 0
oct | CMAC-AES-192 | 10.485.760 | 163 | 148 | 8.192
oct | CMAC-AES-192 | 52.428.800 | 774 | 757 | 40.960
oct | CMAC-AES-192 | 104.857.600 | 1468 | 1429 | 98.304
oct | CMAC-AES-256 | 5.242.880 | 106 | 93 | 0
oct | CMAC-AES-256 | 10.485.760 | 237 | 234 | 8.192
oct | CMAC-AES-256 | 52.428.800 | 934 | 905 | 40.960
oct | CMAC-AES-256 | 104.857.600 | 1540 | 1476 | 49.964
OKP | Ed25519 | 5.242.880 | 170 | 148 | 55.370
OKP | Ed25519 | 10.485.760 | 362 | 351 | 104.522
OKP | Ed25519 | 52.428.800 | 1331 | 1288 | 333.906
OKP | Ed25519 | 104.857.600 | 2283 | 2234 | 612.442
OKP | Ed448 | 5.242.880 | 118 | 109 | 55.368
OKP | Ed448 | 10.485.760 | 193 | 195 | 104.521
OKP | Ed448 | 52.428.800 | 1017 | 1007 | 333.903
OKP | Ed448 | 104.857.600 | 2050 | 1992 | 612.439
GOST-EC | GOST-R34.10-2012-256 | 5.242.880 | 589 | 593 | 8.192
GOST-EC | GOST-R34.10-2012-256 | 10.485.760 | 853 | 851 | 8.192
GOST-EC | GOST-R34.10-2012-256 | 52.428.800 | 3948 | 3937 | 8.192
GOST-EC | GOST-R34.10-2012-256 | 104.857.600 | 9181 | 9093 | 8.192
oct | HMAC-SHA256 | 5.242.880 | 26 | 31 | 0
oct | HMAC-SHA256 | 10.485.760 | 33 | 31 | 8.192
oct | HMAC-SHA256 | 52.428.800 | 89 | 85 | 40.960
oct | HMAC-SHA256 | 104.857.600 | 151 | 140 | 98.304
oct | HMAC-SHA3-256 | 5.242.880 | 53 | 46 | 0
oct | HMAC-SHA3-256 | 10.485.760 | 86 | 78 | 0
oct | HMAC-SHA3-256 | 52.428.800 | 372 | 359 | 49.152
oct | HMAC-SHA3-256 | 104.857.600 | 754 | 726 | 98.304
oct | HMAC-SHA3-384 | 5.242.880 | 116 | 93 | 0
oct | HMAC-SHA3-384 | 10.485.760 | 131 | 125 | 0
oct | HMAC-SHA3-384 | 52.428.800 | 403 | 406 | 49.152
oct | HMAC-SHA3-384 | 104.857.600 | 799 | 765 | 98.304
oct | HMAC-SHA3-512 | 5.242.880 | 75 | 70 | 0
oct | HMAC-SHA3-512 | 10.485.760 | 160 | 156 | 8.192
oct | HMAC-SHA3-512 | 52.428.800 | 607 | 609 | 40.960
oct | HMAC-SHA3-512 | 104.857.600 | 1097 | 1070 | 98.304
oct | HMAC-SHA384 | 5.242.880 | 28 | 15 | 0
oct | HMAC-SHA384 | 10.485.760 | 50 | 46 | 0
oct | HMAC-SHA384 | 52.428.800 | 231 | 226 | 49.152
oct | HMAC-SHA384 | 104.857.600 | 405 | 398 | 98.304
oct | HMAC-SHA512 | 5.242.880 | 28 | 23 | 0
oct | HMAC-SHA512 | 10.485.760 | 45 | 31 | 8.192
oct | HMAC-SHA512 | 52.428.800 | 237 | 234 | 49.152
oct | HMAC-SHA512 | 104.857.600 | 406 | 398 | 98.304
oct | HMAC-SM3 | 5.242.880 | 78 | 78 | 0
oct | HMAC-SM3 | 10.485.760 | 124 | 109 | 8.192
oct | HMAC-SM3 | 52.428.800 | 638 | 601 | 40.960
oct | HMAC-SM3 | 104.857.600 | 1200 | 1148 | 98.304
oct | HMAC-Streebog-256 | 5.242.880 | 347 | 335 | 0
oct | HMAC-Streebog-256 | 10.485.760 | 730 | 702 | 8.192
oct | HMAC-Streebog-256 | 52.428.800 | 2921 | 2835 | 40.960
oct | HMAC-Streebog-256 | 104.857.600 | 4937 | 4812 | 920
oct | HMAC-Streebog-512 | 5.242.880 | 283 | 257 | 0
oct | HMAC-Streebog-512 | 10.485.760 | 597 | 562 | 8.192
oct | HMAC-Streebog-512 | 52.428.800 | 2667 | 2608 | 40.960
oct | HMAC-Streebog-512 | 104.857.600 | 5099 | 4929 | 503
oct | KMAC128 | 5.242.880 | 44 | 31 | 0
oct | KMAC128 | 10.485.760 | 75 | 70 | 8.192
oct | KMAC128 | 52.428.800 | 350 | 328 | 40.960
oct | KMAC128 | 104.857.600 | 663 | 655 | 90.112
oct | KMAC256 | 5.242.880 | 50 | 46 | 0
oct | KMAC256 | 10.485.760 | 79 | 78 | 0
oct | KMAC256 | 52.428.800 | 374 | 328 | 40.960
oct | KMAC256 | 104.857.600 | 800 | 773 | 98.304
LMS | LMS | 5.242.880 | 278 | 265 | 37.145
LMS | LMS | 10.485.760 | 330 | 328 | 69.909
LMS | LMS | 52.428.800 | 767 | 765 | 225.562
LMS | LMS | 104.857.600 | 1388 | 1359 | 413.975
EC | P-256 | 5.242.880 | 66 | 62 | 0
EC | P-256 | 10.485.760 | 131 | 125 | 0
EC | P-256 | 52.428.800 | 562 | 562 | 0
EC | P-256 | 104.857.600 | 1091 | 1085 | 0
EC | P-384 | 5.242.880 | 48 | 46 | 0
EC | P-384 | 10.485.760 | 90 | 93 | 0
EC | P-384 | 52.428.800 | 388 | 375 | 0
EC | P-384 | 104.857.600 | 778 | 765 | 0
EC | P-521 | 5.242.880 | 46 | 46 | 0
EC | P-521 | 10.485.760 | 81 | 78 | 0
EC | P-521 | 52.428.800 | 400 | 390 | 0
EC | P-521 | 104.857.600 | 767 | 750 | 0
RSA | RSA-2048 | 5.242.880 | 66 | 62 | 0
RSA | RSA-2048 | 10.485.760 | 111 | 109 | 0
RSA | RSA-2048 | 52.428.800 | 492 | 484 | 0
RSA | RSA-2048 | 104.857.600 | 1044 | 1023 | 0
RSA | RSA-3072 | 5.242.880 | 70 | 62 | 0
RSA | RSA-3072 | 10.485.760 | 124 | 125 | 0
RSA | RSA-3072 | 52.428.800 | 532 | 523 | 0
RSA | RSA-3072 | 104.857.600 | 2085 | 2085 | 0
RSA | RSA-4096 | 5.242.880 | 136 | 140 | 0
RSA | RSA-4096 | 10.485.760 | 262 | 250 | 0
RSA | RSA-4096 | 52.428.800 | 1028 | 1015 | 0
RSA | RSA-4096 | 104.857.600 | 2114 | 2077 | 0
RSA | RSA-6144 | 5.242.880 | 177 | 179 | 0
RSA | RSA-6144 | 10.485.760 | 266 | 257 | 0
RSA | RSA-6144 | 52.428.800 | 1072 | 1054 | 0
RSA | RSA-6144 | 104.857.600 | 1823 | 1773 | 0
RSA | RSA-8192 | 5.242.880 | 287 | 281 | 0
RSA | RSA-8192 | 10.485.760 | 374 | 374 | 0
RSA | RSA-8192 | 52.428.800 | 1154 | 1155 | 0
RSA | RSA-8192 | 104.857.600 | 1973 | 1976 | 0
SLH-DSA | SLH-DSA-SHA2-128F | 5.242.880 | 167 | 156 | 79.987
SLH-DSA | SLH-DSA-SHA2-128F | 10.485.760 | 245 | 234 | 145.523
SLH-DSA | SLH-DSA-SHA2-128F | 52.428.800 | 971 | 968 | 456.827
SLH-DSA | SLH-DSA-SHA2-128F | 104.857.600 | 1671 | 1640 | 833.657
SLH-DSA | SLH-DSA-SHA2-128S | 5.242.880 | 1173 | 1148 | 213.000
SLH-DSA | SLH-DSA-SHA2-128S | 10.485.760 | 1293 | 1273 | 143.385
SLH-DSA | SLH-DSA-SHA2-128S | 52.428.800 | 2018 | 2007 | 286.752
SLH-DSA | SLH-DSA-SHA2-128S | 104.857.600 | 2969 | 2929 | 356.393
SLH-DSA | SLH-DSA-SHA2-192F | 5.242.880 | 165 | 163 | 80.009
SLH-DSA | SLH-DSA-SHA2-192F | 10.485.760 | 238 | 218 | 153.739
SLH-DSA | SLH-DSA-SHA2-192F | 52.428.800 | 743 | 726 | 465.038
SLH-DSA | SLH-DSA-SHA2-192F | 104.857.600 | 1394 | 1382 | 841.875
SLH-DSA | SLH-DSA-SHA2-192S | 5.242.880 | 1777 | 1757 | 114.729
SLH-DSA | SLH-DSA-SHA2-192S | 10.485.760 | 1735 | 1703 | 147.508
SLH-DSA | SLH-DSA-SHA2-192S | 52.428.800 | 2036 | 2000 | 192.569
SLH-DSA | SLH-DSA-SHA2-192S | 104.857.600 | 2919 | 2867 | 512.042
SLH-DSA | SLH-DSA-SHA2-256F | 5.242.880 | 231 | 218 | 104.732
SLH-DSA | SLH-DSA-SHA2-256F | 10.485.760 | 316 | 312 | 170.270
SLH-DSA | SLH-DSA-SHA2-256F | 52.428.800 | 804 | 796 | 481.571
SLH-DSA | SLH-DSA-SHA2-256F | 104.857.600 | 1424 | 1406 | 858.406
SLH-DSA | SLH-DSA-SHA2-256S | 5.242.880 | 1444 | 1413 | 73.781
SLH-DSA | SLH-DSA-SHA2-256S | 10.485.760 | 1618 | 1601 | 127.023
SLH-DSA | SLH-DSA-SHA2-256S | 52.428.800 | 2066 | 2046 | 94.270
SLH-DSA | SLH-DSA-SHA2-256S | 104.857.600 | 2709 | 2679 | 389.160
SM2 | SM2 | 5.242.880 | 130 | 125 | 8.192
SM2 | SM2 | 10.485.760 | 202 | 203 | 8.192
SM2 | SM2 | 52.428.800 | 1028 | 1030 | 8.192
SM2 | SM2 | 104.857.600 | 1705 | 1695 | 8.192
XMSS | XMSS | 5.242.880 | 74 | 70 | 71.772
XMSS | XMSS | 10.485.760 | 124 | 125 | 137.307
XMSS | XMSS | 52.428.800 | 505 | 484 | 448.609
XMSS | XMSS | 104.857.600 | 903 | 882 | 825.442
FALCON | FALCON-1024 | 5.242.880 | 53 | 46 | 71.766
FALCON | FALCON-1024 | 10.485.760 | 90 | 93 | 137.304
FALCON | FALCON-1024 | 52.428.800 | 413 | 398 | 448.605
FALCON | FALCON-1024 | 104.857.600 | 778 | 773 | 825.443
FALCON | FALCON-512 | 5.242.880 | 48 | 46 | 71.761
FALCON | FALCON-512 | 10.485.760 | 93 | 93 | 137.299
FALCON | FALCON-512 | 52.428.800 | 438 | 421 | 448.600
FALCON | FALCON-512 | 104.857.600 | 760 | 750 | 825.434
ML-DSA | ML-DSA-44 | 5.242.880 | 45 | 46 | 0
ML-DSA | ML-DSA-44 | 10.485.760 | 66 | 62 | 0
ML-DSA | ML-DSA-44 | 52.428.800 | 281 | 281 | 0
ML-DSA | ML-DSA-44 | 104.857.600 | 546 | 546 | 0
ML-DSA | ML-DSA-65 | 5.242.880 | 40 | 31 | 0
ML-DSA | ML-DSA-65 | 10.485.760 | 68 | 62 | 0
ML-DSA | ML-DSA-65 | 52.428.800 | 282 | 281 | 0
ML-DSA | ML-DSA-65 | 104.857.600 | 597 | 593 | 0
ML-DSA | ML-DSA-87 | 5.242.880 | 43 | 46 | 0
ML-DSA | ML-DSA-87 | 10.485.760 | 71 | 78 | 0
ML-DSA | ML-DSA-87 | 52.428.800 | 298 | 296 | 0
ML-DSA | ML-DSA-87 | 104.857.600 | 891 | 882 | 0
--------+----------------------+-------------+---------+----------+--------
Total algorithms: 39
Total measurements: 156 Total bytes: 6,747,586,560 (~6.7 GB)
Total resign: 123,201 ms
Performance Observations
Based on benchmark results with default settings (5 warm-up, 10 measurement iterations):
✅ Memory-Efficient Streaming Resign
Streaming resign operations demonstrate excellent memory efficiency for large files:
- Symmetric MACs: Minimal heap delta (typically <100 KiB even for 100 MiB payloads)
- Classical EC/RSA: Zero or minimal heap delta across all payload sizes
- PQC algorithms: Moderate heap delta proportional to algorithm complexity (ML-DSA: 0 KiB, FALCON/XMSS: ~825 KiB for 100 MiB)
🔍 Algorithm Characteristics
Fastest streaming resign:
- ML-DSA-44: ~40-546ms (5-100 MiB payloads)
- ML-DSA-65: ~40-597ms (5-100 MiB payloads)
- ML-DSA-87: ~43-891ms (5-100 MiB payloads)
- HMAC-SHA256: ~26-151ms (5-100 MiB payloads)
Slowest streaming resign:
- HMAC-Streebog-256: ~347-4937ms (5-100 MiB payloads)
- SLH-DSA-SHA2-256S: ~1444-2709ms (5-100 MiB payloads)
- SLH-DSA-SHA2-192S: ~1735-2919ms (5-100 MiB payloads)
📊 Scalability
- Linear scaling with payload size (dominated by streaming I/O and incremental hashing)
- Memory efficiency: Heap deltas remain constant or scale sub-linearly with payload size
- Optimal for large files: Streaming resign maintains acceptable performance for 100+ MiB payloads
🚀 Production Readiness
Streaming resign operations are production-ready for large file key rotation:
- Key rotation: Acceptable latency for rotating signatures on large documents
- Certificate renewal: Suitable for re-signing large file certificates
- Archive management: Efficient signature rotation for archived data
- Compliance: Supports signature renewal for long-term document preservation
Comparison to Compact Mode Resign
| Operation | Compact Mode (Ed25519, 1 MiB) | Streaming Mode (Ed25519, 5 MiB) | Performance |
|---|---|---|---|
| Resign | ~57ms | ~170ms | ~3× larger payload, ~3× time (linear) |
| Memory | 40.960 KiB | 55.370 KiB | ~35% more (manageable) |
Key insight: Streaming mode maintains memory efficiency while scaling to much larger payloads.
Test Execution
Running the Benchmark
Default settings (5 warm-up, 10 measurement iterations):
Custom iteration counts:
mvn test -Dtest=SCPerformanceEnhancedStreamResignTest \
-Dsc.perf.warmup=10 \
-Dsc.perf.measurements=20
Expected runtime: ~20-30 minutes with default settings
Output Location
CSV file exported to:
Console output shows ASCII table with all measurements sorted by (KTY, ALG, BYTES).
CSV Data Format
The exported CSV file contains the following columns:
KTY,ALG,BYTES,RESIGN_MS,CPU_RESIGN_MS,RESIGN_MEM_KIB
oct,CMAC-AES-128,5242880,103,93,0
oct,CMAC-AES-128,10485760,177,163,0
...
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
- Resign Performance - Single-algorithm resign compact mode benchmark
- Signature Stream Performance - Single-algorithm streaming signature benchmark
- Benchmark Index - Overview of all performance benchmarks
Conclusion
This benchmark provides strong, reproducible evidence that SecureCore's streaming resign operations:
-
Efficiently support large file key rotation with minimal memory footprint across a wide variety of modern cryptographic algorithms, including post-quantum signatures.
-
Perform reliably and predictably across payload sizes from 5 MiB to 100 MiB, with linear performance scaling.
-
Offer memory-efficient streaming critical for key rotation in cloud, enterprise, and archival environments.
-
Demonstrate that PQC algorithms (especially ML-DSA) are production-ready for streaming resign workloads with performance comparable to classical alternatives.
These results demonstrate SecureCore's readiness for enterprise deployment of streaming signature rotation operations, regulatory compliance, and future-proof cryptographic agility for large-scale key management scenarios.
Changelog
| Date | Change | Author |
|---|---|---|
| 2026-01-18 | Created streaming resign performance benchmark documentation | ANKASecure Performance Team |
| 2026-01-18 | Validated 156 measurements across 39 algorithms | ANKASecure Performance Team |