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 21:33:38 UTC
HSM backendNone (Software)
Commandmise run bench:pkcs11
Buildbench / non-fips
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
Protocolspkcs11
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:                      38%
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 Machine"]
        ckms["<b>ckms pkcs11 bench</b>"]
        lib["<b>cosmian_pkcs11.so</b><br/>(PKCS#11 Provider)"]
    end

    subgraph srv["KMS Server"]
        kmip["KMIP 2.1<br/>(HTTP/TLS)"]
        crypto["Software Crypto<br/>(OpenSSL 3.6.2)"]
    end

    subgraph hsm["SoftHSM2"]
        slot["PKCS#11 Slot"]
        keys["Test Keys"]
    end

    ckms -->|C_Initialize/C_Sign| lib
    lib -->|HTTP| kmip
    lib -->|PKCS#11| slot
    kmip --> crypto
    slot --> keys

    style ckms fill:#4A90E2
    style lib fill:#FF6B6B
    style kmip fill:#7ED321
    style crypto fill:#F5A623
    style slot fill:#BD10E0

Components:

  • ckms: PKCS#11 load test generator
  • cosmian_pkcs11.so: Bridge between PKCS#11 callers and KMIP server
  • KMIP Endpoint: Server-side request/response marshaling
  • Software Crypto: AES/RSA/ECDSA operations via OpenSSL
  • PKCS#11 Slot: HSM backend for key storage

Protocols

The caller-facing protocol benchmarked here is the cosmian_pkcs11 provider's real PKCS#11 v3.1 Cryptoki C ABI: the benchmark dlopen()s the built shared library (libcosmian_pkcs11.{so,dylib}) and resolves its standard interface through C_GetInterface — the same call path v3-aware PKCS#11 consumers (Oracle TDE, OpenSSH, disk-encryption tools) use. For remote Sign, the provider wraps the KMIP operation in a KMIP 2.1 RequestMessage, serializes binary TTLV, and sends application/octet-stream to POST /kmip; the binary TTLV response is fully deserialized before C_SignMessage returns.

InterfaceTransportDescription
PKCS#11 (Cryptoki v3.1)C_GetInterface + C ABIC_Initialize, C_OpenSession, C_EncryptInit/C_Encrypt, C_DecryptInit/C_Decrypt, C_MessageSignInit/C_SignMessage, C_VerifyInit/C_Verify, C_GenerateKey
Provider → KMS SignKMIP 2.1 binary TTLV over HTTPPOST /kmip, application/octet-stream

Benchmark Methodology

Real Cryptoki C ABI, one session per worker

The benchmark subcommand ckms pkcs11 bench (driven by mise run bench:pkcs11) dlopen()s the built cosmian_pkcs11 shared library, resolves the v3.1 function table through C_GetInterface, and calls it directly — the same code path a real PKCS#11 consumer application uses, as opposed to mise bench:load, which drives the KMIP REST API directly through the ckms client library.

By default each worker thread owns a dedicated C_OpenSession handle. The provider looks the handle up in its session map and serializes only access to that individual session with a per-session lock, so unrelated worker sessions can progress independently. --shared-session is an opt-in comparison mode that reproduces the former single-session contention model; it is not the default methodology.

For the Ed25519 Sign path measured in this report, C_MessageSignInit runs once during setup and each C_SignMessage crosses the synchronous PKCS#11 boundary, builds a KMIP 2.1 RequestMessage, serializes it as binary TTLV, sends it to the /kmip octet-stream endpoint, and parses the binary TTLV response before copying the signature into the caller-owned buffer.

Independent operations

Unlike the software/HSM reports where requests may be bundled, this report measures each Cryptoki operation independently:

  • Encryption/Decryption: C_EncryptInit/C_Encrypt and C_DecryptInit/C_Decrypt against pre-generated ciphertext
  • Sign: C_SignInit/C_Sign (or C_MessageSignInit/C_SignMessage for Ed25519) crossing the synchronous PKCS#11 boundary
  • Verify: C_VerifyInit/C_Verify implemented and benchmarked through the real Cryptoki function table
  • Key Creation: symmetric C_GenerateKey with immediate C_DestroyObject per iteration

Load test (mise run bench:pkcs11)

The load test sweeps a configurable list of concurrency levels, mirroring mise bench:load's own sweep mechanics exactly: at each level N concurrent OS threads call the target Cryptoki function in a tight loop for a fixed measurement window (default: 20 s), preceded by a warm-up phase (default: 5 s) that is excluded from measurements, followed by a cooldown (default: 2 s) before the next level. Recorded metrics per (operation, concurrency) pair:

  • Throughput — Cryptoki calls per second
  • p50 / p95 / p99 — per-call latency percentiles (ms)

Infrastructure note: The benchmark server uses a local SQLite backend (temporary, discarded after the run). Throughput figures will differ on a production deployment backed by PostgreSQL or Redis-Findex.


Load Tests

encrypt/aes-cbc

Concurrencypkcs11 (req/s)
11,164
21,498
41,788
84,163
166,444

Throughput — encrypt/aes-cbc


encrypt/aes-gcm

Concurrencypkcs11 (req/s)
11,132
21,614
41,439
84,450
166,437

Throughput — encrypt/aes-gcm


encrypt/rsa-pkcs

Concurrencypkcs11 (req/s)
14,656
22,381
42,678
817,514
1622,873

Throughput — encrypt/rsa-pkcs


encrypt/rsa-oaep

Concurrencypkcs11 (req/s)
14,521
22,361
42,723
816,981
1622,047

Throughput — encrypt/rsa-oaep


decrypt/aes-cbc

Concurrencypkcs11 (req/s)
12,364
22,925
43,522
88,450
1613,073

Throughput — decrypt/aes-cbc


decrypt/aes-gcm

Concurrencypkcs11 (req/s)
12,313
23,144
43,233
88,633
1612,771

Throughput — decrypt/aes-gcm


decrypt/rsa-pkcs

Concurrencypkcs11 (req/s)
142
275
4128
8189
16225

Throughput — decrypt/rsa-pkcs


decrypt/rsa-oaep

Concurrencypkcs11 (req/s)
141
275
4128
8185
16223

Throughput — decrypt/rsa-oaep


sign/rsa-pkcs-sha256

Concurrencypkcs11 (req/s)
142
272
4125
8184
16218

Throughput — sign/rsa-pkcs-sha256


sign/rsa-pss-sha256

Concurrencypkcs11 (req/s)
141
267
4126
8182
16217

Throughput — sign/rsa-pss-sha256


sign/ecdsa-p256

Concurrencypkcs11 (req/s)
13,816
25,996
43,377
814,483
1621,077

Throughput — sign/ecdsa-p256


sign/ecdsa-p384

Concurrencypkcs11 (req/s)
1983
21,629
42,259
83,621
165,697

Throughput — sign/ecdsa-p384


sign/ecdsa-secp256k1

Concurrencypkcs11 (req/s)
12,514
24,117
43,234
89,205
1614,112

Throughput — sign/ecdsa-secp256k1


sign/eddsa-ed25519

Concurrencypkcs11 (req/s)
18,832
211,159
45,312
831,750
1643,367

Throughput — sign/eddsa-ed25519


verify/rsa-pkcs-sha256

Concurrencypkcs11 (req/s)
19,713
25,928
45,519
834,986
1645,735

Throughput — verify/rsa-pkcs-sha256


verify/rsa-pss-sha256

Concurrencypkcs11 (req/s)
19,066
26,041
45,977
832,932
1643,216

Throughput — verify/rsa-pss-sha256


verify/ecdsa-p256

Concurrencypkcs11 (req/s)
13,839
24,796
42,641
813,641
1620,837

Throughput — verify/ecdsa-p256


verify/ecdsa-p384

Concurrencypkcs11 (req/s)
11,725
22,915
42,241
87,383
1610,307

Throughput — verify/ecdsa-p384


verify/ecdsa-secp256k1

Concurrencypkcs11 (req/s)
15,711
25,469
43,044
820,059
1628,242

Throughput — verify/ecdsa-secp256k1


verify/eddsa-ed25519

Concurrencypkcs11 (req/s)
17,392
26,057
44,666
831,497
1641,930

Throughput — verify/eddsa-ed25519


key-creation/aes

Concurrencypkcs11 (req/s)
1734
2702
4382
8416
16458

Throughput — key-creation/aes


batch/aes-cbc

Concurrencypkcs11 (req/s)
1117
2155
4141
8442
16647

Throughput — batch/aes-cbc


Criterion Benchmarks

Symmetric Encryption

Benchmarkpkcs11
aes-cbc845.5 µs
aes-gcm803.0 µs

Asymmetric Encryption

Benchmarkpkcs11
rsa-oaep287.3 µs
rsa-pkcs238.1 µs

Sign / Verify

Benchmarkpkcs11
ecdsa-p256/sign259.3 µs
ecdsa-p256/verify289.6 µs
ecdsa-p384/sign965.6 µs
ecdsa-p384/verify496.7 µs
ecdsa-secp256k1/sign378.3 µs
ecdsa-secp256k1/verify153.3 µs
eddsa-ed25519/sign118.5 µs
eddsa-ed25519/verify167.7 µs
rsa-pkcs-sha256/sign24.32 ms
rsa-pkcs-sha256/verify129.2 µs
rsa-pss-sha256/sign23.03 ms
rsa-pss-sha256/verify102.0 µs