fxpkcs11 module, which connects directly to an HSM and exposes keys stored in an HSM token, this module connects to CryptoHub over REST/TLS and exposes the keys in a CryptoHub service and key store. This page explains how CryptoHub concepts map onto PKCS#11 slots, tokens, and objects, so you can predict which keys an application sees and which operations succeed.
From application call to CryptoHub
When an application initializes the module, the module readscryptohub.json, applies logging and request settings, establishes TLS connections to the configured CryptoHub destinations, and authenticates. Cryptographic calls are then serviced by CryptoHub against the selected service and key store, rather than by a locally attached HSM.
Slots and tokens
Each entry in thecryptohubs array maps to a PKCS#11 slot. The entry’s slot field is the numeric slot identifier, and its label provides a friendly name. The token exposed on that slot represents the CryptoHub service and key store the module is configured to target.
Because PRODUCTION destinations participate in round-robin load balancing and BACKUP destinations take over only when production destinations fail, a slot represents a logical CryptoHub target rather than a single physical appliance. Set a destination’s role to NONE to exclude it from load balancing and failover.
Services, key stores, and the exposed key estate
Threeglobal settings determine which keys a token exposes:
service_uuidselects the CryptoHub service to target.key_store_nameselects the key store within that service. Only keys in this key store are used.key_protectionselects the protection model. The module uses the key store whose protection model and service match this value.
Protection models
Thekey_protection value controls how CryptoHub protects the keys the module uses. Choose the model that matches your security and performance requirements.
Object identity and matching
The module represents CryptoHub keys and certificates as PKCS#11 objects with the usual attributes, such asCKA_CLASS, CKA_LABEL, and CKA_ID. How the module assigns CKA_ID — and therefore how a certificate is matched to its private key — is controlled by the global.cert_id_mode setting.
Choose
Default unless your application requires object identities that come only from metadata (Metadata) or that are keyed on CryptoHub trusted-key UUIDs (KeyUuid).
Caching and cache misses
The module caches keys and certificates it resolves from CryptoHub. Whenglobal.reload_on_cache_miss is true, the module reloads the key and certificate cache after a lookup fails, so newly created CryptoHub objects become visible without reinitializing the module. When it is false, a lookup that misses the cache does not trigger a reload.
Usage policy overrides mechanism availability
A mechanism appearing inC_GetMechanismList does not by itself guarantee an operation succeeds. Two layers can restrict what a key can do:
- CryptoHub policy and key metadata. CryptoHub enforces the usage and policy attached to each key. An operation that a mechanism supports can still be rejected if the key’s CryptoHub metadata or the service’s policy does not permit it.
- Module usage configuration. The
pkcs11.default_usages,pkcs11.forced_usages, andpkcs11.forced_usages.by_labelsettings determine the usages the module applies to symmetric (AES, DES) and asymmetric (RSA, ECC) keys.forced_usagestakes precedence overby_label, which takes precedence overdefault_usages. See Configuration.
Local versus CryptoHub-backed operations
Some PKCS#11 calls are handled entirely within the module, while others require a round trip to CryptoHub:- Local: module initialization and configuration parsing, slot and token enumeration, mechanism list reporting, and cache lookups that hit.
- CryptoHub-backed: authentication, key generation, key and certificate lookup on a cache miss, signing, verification, encryption, decryption, wrapping, unwrapping, derivation, and key encapsulation and decapsulation.

