Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sovereign, high-performance data protection

KMS Performance Comparison

Versions: v5.28.0 Generated: 2026-10-09


Benchmark Environment

FieldValue
Date2026-10-07 23:12:31 UTC
HSM backendSoftHSM2
Commandmise run bench:hsm --hsm-model softhsm2
Buildrelease / non-fips
HTTP workers (Actix-web)32
DatabaseSQLite (temporary, single benchmark run)
CPUIntel(R) Core(TM) i9-14900T @ 800 MHz
CPU cores24 physical / 32 logical (HT)
RAM31.1 GB
OSUbuntu 24.04.5 LTS
Kernel6.8.0-146-generic

Load test parameters

ParameterValue
Modeall
Protocolsall
Measurement window20 s per concurrency level
Concurrency levels1,2,4,8,16
Warm-up5 s
Cooldown between levels2 s

CPU detail (lscpu)

Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           46 bits physical, 48 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  32
On-line CPU(s) list:                     0-31
Vendor ID:                               GenuineIntel
Model name:                              Intel(R) Core(TM) i9-14900T
CPU family:                              6
Model:                                   183
Thread(s) per core:                      2
Core(s) per socket:                      24
Socket(s):                               1
Stepping:                                1
CPU(s) scaling MHz:                      30%
CPU max MHz:                             5500,0000
CPU min MHz:                             800,0000
BogoMIPS:                                2227,20
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_detect user_shstk avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d arch_capabilities ibpb_exit_to_user
Virtualization:                          VT-x
L1d cache:                               896 KiB (24 instances)
L1i cache:                               1,3 MiB (24 instances)
L2 cache:                                32 MiB (12 instances)
L3 cache:                                36 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-31
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Mitigation; Clear Register File
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; Enhanced / Automatic IBRS; IBPB conditional; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

Architecture

graph TB
    subgraph cli["Local: ckms CLI"]
        ckms["<b>ckms load</b>"]
    end

    subgraph srv["Local KMS Server + SoftHSM2"]
        kmip["KMIP 2.1<br/>(HTTP)"]
        crypto["Software Crypto"]
        kek["KEK<br/>(HSM-resident)"]
    end

    subgraph hsm["SoftHSM2"]
        pkcs11["PKCS#11 Slot"]
        kek_material["KEK Material"]
    end

    db["Key Storage<br/>(wrapped)"]

    ckms -->|HTTP| kmip
    kmip --> crypto
    crypto -->|unwrap| kek
    kek -->|C_Decrypt| pkcs11
    pkcs11 --> kek_material
    crypto --> db

    style ckms fill:#4A90E2
    style kmip fill:#7ED321
    style crypto fill:#F5A623
    style kek fill:#FF6B6B
    style pkcs11 fill:#BD10E0

Components:

  • ckms: Concurrent load generator
  • KMIP Endpoint: HTTP protocol handler
  • Software Crypto: Handles data encryption/decryption with unwrapped keys
  • KEK: SoftHSM2-resident Key Encryption Key (used to wrap/unwrap data keys)
  • PKCS#11 Slot: SoftHSM2 backend for KEK unwrap operations
  • Key Storage: Database of wrapped keys

Protocols

HSM-backed KEK, software crypto. The root key-encryption-key (KEK) used to wrap every benchmarked key is HSM-resident (SoftHSM2); only its unwrap touches the HSM. Encrypt/Sign themselves still execute in KMS software (OpenSSL), same as the plain software baseline — this report isolates the cost of HSM-backed key wrapping. For benchmarks where the cryptographic operation itself executes ON the HSM, see the dedicated HSM-delegated-crypto report.

The KMS server was exercised over three distinct wire protocols. Each benchmark column is labelled with the protocol name it used.

ProtocolTransportEncodingEndpointDescription
ttlv-jsonHTTP/1.1KMIP 2.1 JSON-TTLVPOST /kmip/2_1Primary interoperability protocol — any KMIP 2.1 compliant client can use it
ttlv-bytesHTTP/1.1KMIP 2.1 binary TTLVPOST /kmipBinary wire format; eliminates JSON parsing overhead — typically 10–30 % faster
joseHTTP/1.1JWE / JWS (JOSE)POST /v1/crypto/REST API for OAuth2/OIDC workloads that prefer JWA algorithm identifiers over KMIP

KMIP TTLV (Tag-Type-Length-Value) is the native encoding of the KMIP 2.1 standard (OASIS KMIP Spec v2.1, §9.1). The JSON variant wraps every field in a {"tag": …, "type": …, "value": …} JSON object and base64-encodes binary values. The binary variant uses a compact 8-byte fixed header (3-byte tag, 1-byte type, 4-byte length) per value, removing JSON tokenisation, base64, and UTF-8 overhead entirely.

JOSE (JSON Object Signing and Encryption, RFC 7516 / RFC 7515) exposes KMS key material through /v1/crypto/ REST endpoints. It is used by cloud integrations (Google CSE, Microsoft DKE, Azure EKM) and any workload that speaks JWA algorithm identifiers (A256GCM, RS256, ES384 …) rather than KMIP semantics.


Benchmark Methodology

HSM-backed KEK. The server is started with a SoftHSM2-registered key_encryption_key (KEK): every benchmarked software key is wrapped by this HSM-resident KEK at rest, and unwrapped via a PKCS#11 round-trip on each use. All other methodology below (payload sizes, load-test/criterion procedure) is identical to the plain software baseline — the only difference is this extra HSM unwrap step per operation.

Plaintext / payload sizes

All encrypt/decrypt benchmarks use a fixed-size random payload. Sizes represent a realistic key-wrapping or small-message encryption workload without introducing significant data-transfer overhead on a loopback connection.

Algorithm / categoryPlaintext sizeNotes
AES-GCM (128 / 192 / 256-bit key)64 bytesFIPS 140-3
AES-GCM-SIV (128 / 256-bit key)64 bytesNon-FIPS
AES-XTS (128 / 256-bit AES = 256 / 512-bit key)64 bytesFIPS 140-3; requires 16-byte IV
ChaCha20-Poly1305 (256-bit key)64 bytesNon-FIPS
ECIES — P-256 / P-384 / P-52164 bytesNon-FIPS; EC public-key encryption
Salsa Sealed Box (X25519)64 bytesNon-FIPS
Covercrypt (attribute-based encryption)64 bytesNon-FIPS
JOSE JWE — dir + AES-GCM (A128GCM / A192GCM / A256GCM)64 bytesSymmetric (direct key agreement)
JOSE JWE — RSA-OAEP + AES-GCM (2048 / 4096-bit)64 bytesAsymmetric (RSA-OAEP CEK wrapping)
RSA-OAEP (2048 / 3072 / 4096-bit)32 bytesLimited by RSA block size
RSA-PKCS#1 v1.5 (2048 / 3072 / 4096-bit)32 bytesNon-FIPS
RSA-AES Key Wrap — KWP (2048 / 3072 / 4096-bit)32 bytesFIPS 140-3
Sign / Verify — all algorithms32 bytesMessage is hashed internally
JOSE JWS / MAC32 bytes

Load test (mise run bench:hsm --hsm-model softhsm2)

The load test sweeps a configurable list of concurrency levels. At each level N concurrent async tasks send pre-serialised requests in tight loops for a fixed measurement window (default: 20 s), preceded by a warm-up phase (default: 5 s) that is excluded from measurements. Pre-serialisation happens once at setup time and the same bytes are reused on every iteration, isolating server-side KMS latency from client-side encoding overhead. Recorded metrics per (protocol, operation, concurrency) triple:

  • Throughput — requests per second (req/s)
  • p50 / p95 / p99 — round-trip latency percentiles (ms)

Criterion micro-benchmarks (ckms bench)

Criterion (Rust, v0.5) measures the round-trip latency of a single request from the ckms client library through the KMS server and back over a loopback TCP connection. The server is started once and kept alive across all benchmarks in the suite. The reported value is the mean ± 95 % confidence interval over a configurable number of samples (preset quick: 3 s warm-up + 5 s measurement per benchmark).

Infrastructure note: Both test types use a local SQLite backend (temporary, discarded after the run). This isolates pure cryptographic and KMIP serialisation overhead from database I/O. Throughput figures will differ on a production deployment backed by PostgreSQL or Redis-Findex.


Load Tests

encrypt/aes-gcm

Concurrencyttlv-json (req/s)ttlv-bytes (req/s)jose (req/s)
13,0603,70618,623
25,4886,63832,797
48,88010,55952,361
812,73415,13861,798
1617,67321,01674,310

Throughput — encrypt/aes-gcm


sign-verify/ecdsa-p256

Concurrencyttlv-json (req/s)ttlv-bytes (req/s)jose (req/s)
12,2202,2851,698
24,0033,7353,035
46,4706,5475,118
89,6229,8309,432
1614,05014,09714,269

Throughput — sign-verify/ecdsa-p256


sign-verify/eddsa-ed25519

Concurrencyttlv-json (req/s)ttlv-bytes (req/s)jose (req/s)
19,9279,37611,594
216,65816,01321,141
427,27426,80434,107
838,44637,45646,756
1653,12251,76565,793

Throughput — sign-verify/eddsa-ed25519


sign-verify/ecdsa-secp256k1

Concurrencyttlv-json (req/s)ttlv-bytes (req/s)
12,5622,521
24,5154,548
47,2437,078
810,50610,431
1614,36514,263

Throughput — sign-verify/ecdsa-secp256k1


key-creation/aes-sym

Concurrencyttlv-json (req/s)
13,034
21,590
42,762
84,197
163,822

Throughput — key-creation/aes-sym


batch/aes-gcm-10

Concurrencyttlv-json (req/s)
1348
2670
41,012
81,568
162,140

Throughput — batch/aes-gcm-10


Criterion Benchmarks

Symmetric Encryption

Benchmarkttlv-jsonttlv-bytesjose
aes-gcm-siv/decrypt/12892.0 µs128.3 µs—
aes-gcm-siv/decrypt/25695.5 µs99.7 µs—
aes-gcm-siv/encrypt/12877.0 µs98.0 µs—
aes-gcm-siv/encrypt/25672.2 µs82.5 µs—
aes-gcm/decrypt/12883.0 µs87.5 µs45.7 µs
aes-gcm/decrypt/19292.8 µs81.2 µs46.7 µs
aes-gcm/decrypt/25683.1 µs88.9 µs45.1 µs
aes-gcm/encrypt/12878.7 µs85.8 µs52.4 µs
aes-gcm/encrypt/19281.7 µs90.7 µs44.7 µs
aes-gcm/encrypt/25678.2 µs98.3 µs47.2 µs
aes-xts/decrypt/12871.5 µs103.6 µs—
aes-xts/decrypt/25686.7 µs70.7 µs—
aes-xts/encrypt/12883.3 µs89.9 µs—
aes-xts/encrypt/25681.3 µs94.6 µs—
chacha20-poly1305/decrypt/25677.7 µs92.2 µs—
chacha20-poly1305/encrypt/25687.8 µs97.1 µs—
salsa-sealed-box/decrypt163.5 µs166.5 µs—
salsa-sealed-box/encrypt858.2 µs274.0 µs—

Asymmetric Encryption

Benchmarkttlv-jsonttlv-bytes
ecies/decrypt/P-256156.6 µs331.7 µs
ecies/decrypt/P-384970.6 µs1.14 ms
ecies/decrypt/P-5212.63 ms2.11 ms
ecies/encrypt/P-256395.2 µs307.8 µs
ecies/encrypt/P-3841.33 ms1.30 ms
ecies/encrypt/P-5212.79 ms2.22 ms
rsa-aes-kwp/decrypt/4096171.16 ms168.47 ms
rsa-aes-kwp/encrypt/4096349.0 µs543.7 µs
rsa-oaep/decrypt/4096172.20 ms167.59 ms
rsa-oaep/encrypt/4096593.1 µs283.7 µs
rsa-pkcs1v15/decrypt/4096166.78 ms165.15 ms
rsa-pkcs1v15/encrypt/4096992.7 µs286.5 µs

Key Encapsulation (KEM)

Benchmarkttlv-jsonttlv-bytes
pqc/decapsulate/ML-KEM-1024269.7 µs259.8 µs
pqc/decapsulate/ML-KEM-512174.1 µs160.9 µs
pqc/decapsulate/ML-KEM-768210.4 µs200.0 µs
pqc/encapsulate/ML-KEM-1024626.6 µs539.8 µs
pqc/encapsulate/ML-KEM-512318.2 µs613.6 µs
pqc/encapsulate/ML-KEM-768419.8 µs382.0 µs

Key Creation

Benchmarkttlv-json
EC/ES256—
EC/ES384—
RSA/2048—
aes-gcm/oct/128—
aes-gcm/oct/256—
ec/ed25519568.8 µs
ec/ed448783.6 µs
ec/p256701.3 µs
ec/p3841.16 ms
ec/p5211.70 ms
ec/secp256k1826.7 µs
pqc/ML-DSA-441.95 ms
pqc/ML-DSA-651.74 ms
pqc/ML-DSA-872.42 ms
pqc/ML-KEM-10241.26 ms
pqc/ML-KEM-5121.41 ms
pqc/ML-KEM-7681.41 ms
pqc/SLH-DSA-SHA2-128f2.05 ms
pqc/SLH-DSA-SHA2-256f2.61 ms
rsa/rsa-4096326.01 ms
symmetric/aes-128576.5 µs
symmetric/aes-192433.0 µs
symmetric/aes-256287.6 µs
symmetric/chacha20-256678.3 µs

Sign / Verify

Benchmarkttlv-jsonttlv-bytesjose
ecdsa-p256/sign472.9 µs532.9 µs432.7 µs
ecdsa-p256/verify343.1 µs343.8 µs246.3 µs
ecdsa-p384/sign988.1 µs1.01 ms980.2 µs
ecdsa-p384/verify814.1 µs696.1 µs665.0 µs
ecdsa-p521/sign2.32 ms2.19 ms—
ecdsa-p521/verify1.45 ms1.24 ms—
ecdsa-secp256k1/sign423.9 µs425.7 µs—
ecdsa-secp256k1/verify498.6 µs488.7 µs—
eddsa-ed25519/sign129.4 µs115.9 µs127.6 µs
eddsa-ed25519/verify494.4 µs369.7 µs392.1 µs
eddsa-ed448/sign296.3 µs301.6 µs—
eddsa-ed448/verify335.1 µs405.1 µs—
ml-dsa/sign/44614.6 µs732.5 µs—
ml-dsa/sign/65835.6 µs764.9 µs—
ml-dsa/sign/871.03 ms922.3 µs—
ml-dsa/verify/44451.8 µs483.2 µs—
ml-dsa/verify/65708.7 µs565.5 µs—
ml-dsa/verify/87740.3 µs652.6 µs—
rsa-pkcs1v15/sign——25.33 ms
rsa-pkcs1v15/verify——855.0 µs
rsa-pss/sign——24.51 ms
rsa-pss/sign/4096166.55 ms181.63 ms—
rsa-pss/verify——633.5 µs
rsa-pss/verify/4096459.7 µs414.8 µs—
slh-dsa/sign/SHA2-128f9.76 ms9.45 ms—
slh-dsa/sign/SHA2-256f35.65 ms34.78 ms—
slh-dsa/sign/SHAKE-128f25.54 ms24.70 ms—
slh-dsa/sign/SHAKE-256f85.35 ms80.85 ms—
slh-dsa/verify/SHA2-128f1.90 ms1.70 ms—
slh-dsa/verify/SHA2-256f4.07 ms3.76 ms—
slh-dsa/verify/SHAKE-128f2.87 ms2.69 ms—
slh-dsa/verify/SHAKE-256f5.87 ms4.98 ms—