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.29.0 Generated: 2026-10-29


Benchmark Environment

FieldValue
Date2026-10-29 12:04:31 UTC
HSM backendNone (Software)
Commandmise run bench:pkcs11
Buildbench / non-fips
DatabaseSQLite (temporary, single benchmark run)
CPUIntel(R) Core(TM) i9-14900T @ 1,625 MHz
CPU cores24 physical / 32 logical (HT)
RAM31.1 GB
OSUbuntu 24.04.5 LTS
Kernel6.8.0-147-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:                      27%
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)
13,753
23,394
43,445
813,758
1619,379

Throughput — encrypt/aes-cbc


encrypt/aes-gcm

Concurrencypkcs11 (req/s)
13,885
23,866
43,924
813,868
1619,580

Throughput — encrypt/aes-gcm


encrypt/rsa-pkcs

Concurrencypkcs11 (req/s)
15,639
23,050
42,805
819,459
1625,283

Throughput — encrypt/rsa-pkcs


encrypt/rsa-oaep

Concurrencypkcs11 (req/s)
15,589
23,218
43,486
818,463
1624,159

Throughput — encrypt/rsa-oaep


decrypt/aes-cbc

Concurrencypkcs11 (req/s)
18,888
27,085
45,324
830,207
1640,662

Throughput — decrypt/aes-cbc


decrypt/aes-gcm

Concurrencypkcs11 (req/s)
18,576
28,498
44,787
829,887
1640,332

Throughput — decrypt/aes-gcm


decrypt/rsa-pkcs

Concurrencypkcs11 (req/s)
143
276
4128
8188
16226

Throughput — decrypt/rsa-pkcs


decrypt/rsa-oaep

Concurrencypkcs11 (req/s)
142
276
4128
8188
16220

Throughput — decrypt/rsa-oaep


sign/rsa-pkcs-sha256

Concurrencypkcs11 (req/s)
142
275
4126
8187
16215

Throughput — sign/rsa-pkcs-sha256


sign/rsa-pss-sha256

Concurrencypkcs11 (req/s)
142
275
4128
8178
16221

Throughput — sign/rsa-pss-sha256


sign/ecdsa-p256

Concurrencypkcs11 (req/s)
110,032
213,299
48,544
829,832
1643,648

Throughput — sign/ecdsa-p256


sign/ecdsa-p384

Concurrencypkcs11 (req/s)
11,027
21,726
42,317
83,472
165,411

Throughput — sign/ecdsa-p384


sign/ecdsa-secp256k1

Concurrencypkcs11 (req/s)
13,157
25,218
43,828
810,621
1615,182

Throughput — sign/ecdsa-secp256k1


sign/eddsa-ed25519

Concurrencypkcs11 (req/s)
110,714
214,991
45,816
836,554
1652,073

Throughput — sign/eddsa-ed25519


verify/rsa-pkcs-sha256

Concurrencypkcs11 (req/s)
111,989
26,343
45,657
839,251
1650,857

Throughput — verify/rsa-pkcs-sha256


verify/rsa-pss-sha256

Concurrencypkcs11 (req/s)
111,472
25,711
45,162
837,732
1648,650

Throughput — verify/rsa-pss-sha256


verify/ecdsa-p256

Concurrencypkcs11 (req/s)
17,354
25,576
43,716
826,384
1634,604

Throughput — verify/ecdsa-p256


verify/ecdsa-p384

Concurrencypkcs11 (req/s)
11,833
22,813
42,515
86,773
1610,404

Throughput — verify/ecdsa-p384


verify/ecdsa-secp256k1

Concurrencypkcs11 (req/s)
17,368
25,806
43,214
821,722
1630,376

Throughput — verify/ecdsa-secp256k1


verify/eddsa-ed25519

Concurrencypkcs11 (req/s)
17,926
28,390
44,836
830,981
1642,012

Throughput — verify/eddsa-ed25519


key-creation/aes

Concurrencypkcs11 (req/s)
1992
2733
4833
8937
16775

Throughput — key-creation/aes


batch/aes-cbc

Concurrencypkcs11 (req/s)
1409
2416
4582
81,270
161,927

Throughput — batch/aes-cbc


Criterion Benchmarks

Symmetric Encryption

Benchmarkpkcs11
aes-cbc246.0 µs
aes-gcm328.0 µs

Asymmetric Encryption

Benchmarkpkcs11
rsa-oaep199.6 µs
rsa-pkcs271.8 µs

Sign / Verify

Benchmarkpkcs11
ecdsa-p256/sign95.8 µs
ecdsa-p256/verify127.5 µs
ecdsa-p384/sign962.5 µs
ecdsa-p384/verify524.9 µs
ecdsa-secp256k1/sign309.3 µs
ecdsa-secp256k1/verify152.9 µs
eddsa-ed25519/sign94.6 µs
eddsa-ed25519/verify116.8 µs
rsa-pkcs-sha256/sign23.59 ms
rsa-pkcs-sha256/verify76.5 µs
rsa-pss-sha256/sign23.46 ms
rsa-pss-sha256/verify109.4 µs