Storing Besu validator keys in an HSM with PKCS#11: when your network needs it
If you run QBFT validators for a regulated operator, the node key that identifies each validator and signs its blocks is the asset an auditor will ask about first. The Besu HSM plugin's native-pkcs11 provider is the default and recommended production path for any PKCS#11 v2.40 hardware security module, including Thales Luna and Utimaco GP HSM. The reason for the hardware route is direct: Besu's documentation states that the local node private key file is not encrypted. Anyone who can read that file on the host can copy the key, so file permissions and volume placement reduce exposure but do not provide hardware-backed protection.
The plugin changes where the private key lives and how signing requests are made. It registers with Besu's SecurityModuleService, so Besu asks the module to perform node signing instead of reading a key file. It does not change QBFT consensus, peer discovery or the genesis configuration, and it does not remove the need to protect the host, the Besu configuration and the HSM's own administrator credentials. Provider choice, key alias and authentication settings are supplied as plugin CLI options, which means the credential handling for the HSM partition becomes part of your secrets design.
Before you plan the build, confirm with your HSM vendor that your model and firmware expose a PKCS#11 v2.40 interface, and confirm with the Besu HSM plugin README that the provider matches your hardware. The native-pkcs11 provider is not compatible with AWS CloudHSM, which is covered in a sibling topic. Also confirm which Besu release your network runs, because the plugin version has to match it. Record the node key's public identity and the validator set entry before you change the signing path, so that a key mismatch is caught before go-live rather than during block production.
How the HSM plugin connects Besu to the HSM
The flow starts at the Besu node, which loads the Besu HSM plugin from its plugins directory. The plugin registers with Besu's SecurityModuleService and is configured with the provider, key alias and authentication settings as CLI options. The native-pkcs11 provider then talks to the HSM through the PKCS#11 interface, and the key itself stays in the HSM partition under its alias. Check that the signing key never leaves the trust boundary and that the provider you chose matches your HSM model.
Besu reaches the validator key only through the plugin and the PKCS#11 provider.
Which provider fits your HSM and environment
This table compares the two PKCS#11 providers in the Besu HSM plugin and the environments each one suits. Read each row against your HSM vendor, your environment (production, development or cloud-managed HSM), and the questions to confirm before you pick a provider.
| Option | Where it fits | Limits and what to confirm |
|---|---|---|
| native-pkcs11 (plugin default) | Production validator keys on any PKCS#11 v2.40 HSM, such as Thales Luna or Utimaco GP HSM | Recommended for production. Confirm your HSM's PKCS#11 library version and that the ECDH and signing mechanisms Besu needs are exposed. |
| sunpkcs11-jce | Development and tests against SoftHSM2 | Not for production. ECDH compatibility with production HSMs is not guaranteed, so do not carry this choice into a live network. |
| AWS CloudHSM | Not covered by native-pkcs11, which is not compatible with it | Uses a different provider (cloudhsm-jce) and its own setup. See the sibling page on Besu validator keys in AWS CloudHSM. |
| Thales Luna or Utimaco HSM in your data center | Organizations that own the appliance and its client software | Confirm the client library path, partition or slot access, and which firmware and PKCS#11 version your vendor supports. |
| Cloud-hosted HSM service other than CloudHSM | Only where the service exposes a standard PKCS#11 interface | Confirm with the provider whether a PKCS#11 v2.40 library is offered and whether it is supported for native-pkcs11. |
| Air-gapped or closed network | Validator nodes that cannot reach external key services | Confirm that the HSM client, library and key creation tooling can be installed and updated without internet access. |
How to install the HSM plugin and create the validator key before start-up
This sequence prepares the HSM client library, installs the Besu HSM plugin with the native PKCS#11 provider, creates the validator key under a stable alias, and confirms the node identity before the validator starts for the first time.
Confirm the HSM client library and PKCS#11 module
The infrastructure or security engineer on the validator host confirms that the vendor's PKCS#11 client library is installed, matches the HSM firmware and client versions your vendor supports, and loads on the host. Check the library path, the slot the HSM partition appears in, and that the node's service account can read the module and the client configuration. Ask the HSM vendor which PKCS#11 version the library implements, since the Besu HSM plugin's native-pkcs11 provider is documented against PKCS#11 v2.40. The step is done when the vendor's listing tool shows the partition and the token is reachable by the service account without elevated rights.
Choose the provider for production
The platform engineer selects the provider before any files are copied. The Besu HSM plugin README recommends the native-pkcs11 provider for production, and it works with any PKCS#11 v2.40 HSM, including Thales Luna and Utimaco GP HSM. The sunpkcs11-jce provider targets SoftHSM2 for development and tests only, and the README does not guarantee ECDH compatibility with production HSMs, so do not use it for validator keys. Record the provider name in the change ticket, because it becomes part of the node configuration that auditors will review. The step is done when the chosen provider is written into the runbook for this node.
Copy the plugin JAR into the plugins directory
The platform engineer downloads the Besu HSM plugin release that matches the Besu version in use and checks it against the release notes and the project's README, then copies the JAR into the directory Besu loads plugins from. Set the plugins directory explicitly in the service configuration rather than relying on a default path, so every node in the network loads the same file. Keep the JAR under change control with its checksum recorded. The step is done when the file sits in the plugins directory with the expected owner and read permissions, and the checksum matches the recorded value.
Create the validator key in the HSM under a stable alias
The security engineer creates the key pair on the HSM partition before the node first starts, using the HSM vendor's tooling and the secp256k1 curve that Besu node keys use. Give the key a stable, descriptive alias such as one tied to the node name and environment, and record it because the plugin reads the key by alias. Confirm that the key is non-extractable if your HSM policy requires it, and that the service account has signing rights without rights to export. The step is done when the vendor tool lists the key under the alias with the expected attributes and the key is not listed as exportable.
Pass provider, alias and authentication as plugin options
The platform engineer adds the plugin CLI options to the Besu service configuration together with the --security-module option, naming the plugin and the provider, the key alias, and the authentication settings the HSM requires for the partition. Store the PIN or credential in the secret mechanism your environment uses rather than in a plain text unit file or shell history, and confirm the option names against the plugin's README for the release in use. The step is done when the configuration renders without errors and the credential is readable only by the service account.
Start the node and confirm the plugin loads
The platform engineer starts the Besu service and reads the startup log for lines showing that the HSM plugin registered with Besu's security module service and opened the expected token. Errors about the library path, the slot, the PIN, or a missing alias stop the start-up at this point, so resolve them before any further change. The step is done when the log confirms the plugin loaded with the chosen provider and the node reaches normal operation without falling back to a key file.
Check the node identity against the expected enode
The network operator compares the node's enode, derived from the public key held in the HSM, with the value recorded in the network's planned peer list and genesis configuration. A mismatch means the node is signing with a different identity than the one other validators expect, so stop and correct the alias or key before the node joins the validator set. Keep the verified enode in the network inventory with the HSM key alias, so that later audits can trace identity to a specific HSM key. The step is done when the enode in the logs or node RPC output matches the recorded value and peers accept the connection.
Configuration decisions that shape the HSM setup
Four decisions shape the HSM setup, and each should be settled before anyone installs the plugin. The first is key alias naming and ownership. The plugin selects a key by alias, so the alias must identify the node and the environment it belongs to, and someone must own the object on the HSM: who creates it, who can read or rotate it, and who is told when it changes. Ask the HSM vendor how object labels are stored and whether aliases must be unique per partition. Confirm the exact alias option name in the plugin version you install, because the README is the reference for option names and they can change between releases.
The second decision is how the HSM PIN or credential reaches the plugin. The plugin takes authentication settings as CLI options, so a value typed on the command line can end up in shell history, process listings or a service unit file that is readable by too many people. Plan a delivery path before the first start: an environment variable or file injected by your service manager or secrets store, with file permissions limited to the Besu service account. Confirm with your HSM vendor whether the credential is a user PIN, a partition password or a client certificate, since each has different rotation and lockout behavior. Test a wrong credential on a staging HSM to learn how the lockout policy responds.
The third decision is whether each node gets its own HSM partition or the nodes share one. A dedicated partition per node limits the blast radius of a credential compromise and makes key deletion or rotation for one validator independent of the others, but it increases administration and licensing overhead on the HSM. Shared partitions simplify administration but mean one credential unlocks every validator key in the partition. Record the partition and alias for each validator in your key inventory. The fourth decision is how the enode identity is recorded for the validator set. The public key derived from the HSM-held node key must be captured once the key exists, then checked against the enode entries in the genesis and peer configuration before any node joins. Treat that check as a gate in your change process, not a one-time task.
Security and operational risks of HSM-held validator keys
Moving a validator node key into an HSM removes it from the node's disk, but it creates new dependencies on credentials, backups, network reachability, release compatibility, logs and people. The cards below cover the decisions and checks that connect those dependencies before the validator goes live.
HSM login credentials
The plugin takes authentication settings as CLI options, so the PIN or credential it uses can end up in process arguments, shell history or service files if handled carelessly. Decide how the login is supplied at start-up, who can read that source, and how it is rotated. Confirm with your HSM vendor whether the PKCS#11 login can be limited to a single partition user with signing rights only, and test that the validator still starts after a rotation.
Plugin READMEKey backup and recovery inside the HSM
A validator key that exists only in one HSM partition is lost if that device fails or is wiped. Ask your HSM vendor how keys are backed up, whether backups can be restored to a replacement device, and whether the key can be marked non-exportable while still being recoverable. Record the recovery steps and rehearse them, because a validator that cannot sign counts toward the validator set's loss of quorum.
Behavior when the HSM is unreachable
If the HSM cannot be reached when Besu starts, the node cannot sign and will not take part in consensus until the connection returns. Define the start-up order so the HSM client, network path and partition are ready before Besu, and set alerts on failed provider initialization. Test a planned HSM outage on a non-production validator to confirm how the rest of the validator set behaves.
Plugin and Besu version compatibility
The HSM plugin is a separate artifact that must match the Besu release it runs with. Besu ships on a calendar cadence and Besu 26.6.0 requires JDK 25, so a Besu upgrade can break the plugin or its Java runtime. Before each upgrade, check the plugin README and release notes for the target Besu version, test the pairing with the same provider library on a staging validator, and keep the previous JAR and Besu build ready for rollback.
Besu releasesAudit logging of signing operations
Besu logs will show that the node is running, but they may not record which key signed which block at the HSM. Ask your HSM vendor what audit records the device keeps for sign operations, where they are stored, and how long they are retained. Forward HSM audit events into the same monitoring stack as Besu logs so an investigator can match a block to a signing event.
Separation of duties
HSM administrators who manage partitions, users and backups should not also control the Besu host, its service configuration or its plugins. Define which team creates the key, which team holds the login, and which team deploys the validator. Record these roles in the access model so that a single operator cannot sign on the HSM and alter the node that uses it without a second approval.
Questions teams ask before they bring in outside help
What does an HSM setup for Besu validator keys cost?
No price is published here, and the total depends mostly on what you already own. The main cost components are the HSM hardware or service, any licences for the HSM client software and PKCS#11 library, the time your HSM administrators spend on provisioning and key ceremonies, integration work on each validator host, and testing on a non-production network. Some costs are one-time, such as hardware and initial integration, while others recur, such as HSM support contracts, licence renewals and the operational effort of rotating or replacing keys. Costs rise with the number of validators, the number of HSM partitions or clusters you need for redundancy, and how many environments must be protected. Ask any provider for a quote built from a written scope that lists each of these components separately, and confirm with your HSM vendor which licences apply to your model.
How long does an HSM-backed validator deployment take?
The duration depends mainly on how quickly your HSM team can provide access and complete key creation, and on how many validators and environments are involved. The work usually moves through four phases: confirming the HSM and provider choice, installing the plugin and the vendor PKCS#11 library on test nodes, creating keys and validating start-up on a test network, and then planning the production change. Delays most often come from HSM procurement or partition setup, approval of change windows, and access requests that pass through several teams. Ask for a plan that names the dependencies on the HSM team and the change calendar, and treat any single duration offered without those dependencies as incomplete.
What do we need to provide before outside help starts?
Expect to provide network access from the validator hosts to the HSM, a named HSM administrator who can create partitions, users and keys, and an account for the Besu service user with the rights needed to load the provider library. You will also need a test network with at least the validator count you plan to run, a change window for production work, and access to your existing Besu node configuration and key inventory. Confirm which HSM client software versions your administrators support, because the PKCS#11 library must match the HSM firmware. Agree in writing who approves changes to HSM policy and who holds the credentials used by the plugin.
Can our own team set this up without outside help?
Yes, a team with HSM administration skills and Besu operators can do this internally, and the plugin documentation is written for that purpose. The steps are installing the plugin JAR into the Besu plugins directory, selecting the native-pkcs11 provider for production, and creating the key before the node starts. The harder parts are usually the vendor-specific PKCS#11 configuration, testing failover, and documenting the procedure for auditors. Outside help makes most sense when your team lacks HSM experience, when you need the work evidenced for a compliance review, or when many validators must move at once. Decide this after reviewing the HSM vendor's documentation and your own staffing, and confirm which parts you want handled in a fixed-scope engagement.
Which provider should we pick for production validator keys?
For production, the Besu HSM plugin README describes the native-pkcs11 provider as the default and recommended choice. It works with any HSM that supports PKCS#11 v2.40, which the README lists as including Thales Luna and Utimaco GP HSM. It is not currently compatible with AWS CloudHSM, which needs a separate approach covered elsewhere. The sunpkcs11-jce provider targets SoftHSM2 for development and tests only, and the README does not guarantee ECDH compatibility with production HSMs, so do not use it for production keys. Confirm your HSM's PKCS#11 version and library path before you select a provider.
Does the HSM also protect our account keys?
No, the HSM plugin in this setup protects the node key that identifies the validator on the network and signs QBFT blocks. Account keys that sign transactions are a separate concern, handled by different tools and reviewed differently. Your auditors will likely ask about both, so plan the controls for each. The page on node keys versus account keys explains which tool protects which key and what evidence to prepare for each. Ask any provider to state in writing which key types are in scope for the HSM work.
What happens to existing key files during the migration?
The existing node private key file is not encrypted, according to Besu's node key documentation, so it should be treated as sensitive material during and after migration. Before you switch to the HSM, record the current node identity so the validator keeps the same enode and validator address, then create the HSM key and confirm the new setup reproduces that identity on a test network. Once production is verified, remove or securely archive the file according to your key retention policy, and check that no backups, images or configuration management repositories still hold a copy. Keep a dated record of each step for the change file. Confirm the rollback path before you start, because a failed switch may require the original file to be restored.
Where a partner adds value on an HSM-backed validator
A fixed-scope engagement for this topic starts with an environment review, because the HSM choice drives most of the work that follows. The review confirms which HSM model and firmware the organization already runs, whether its PKCS#11 library is a v2.40 implementation (the level the Besu HSM plugin README says the native-pkcs11 provider works with), and whether the target platform is one the provider does not support, such as AWS CloudHSM. It also records who holds the HSM partition credentials, where the Besu nodes run, and which change process the organization requires before a validator key is created. The output is a written provider decision with the reasons for it, so the compliance team can see why native-pkcs11 was chosen over sunpkcs11-jce, which the same README limits to SoftHSM2 for development and tests.
The build then happens in a test network, not on a production validator. The team installs the plugin JAR into Besu's plugins directory, configures the provider, key alias and authentication options as plugin CLI options, creates the validator key on the HSM before first start, and confirms that the node starts and that QBFT block signing works through the HSM. Verification covers a failed login, a missing alias and a restart, since those are the failures operators meet first. DeployOpen then writes the runbook, the key creation record and the test evidence for the organization's compliance and security teams. To be clear, DeployOpen prepares these systems, controls and evidence, but it does not issue audit reports, attestations or certifications. The organization's independent auditor decides whether the controls meet its requirements.
Ask any partner to confirm the exact HSM model, firmware, PKCS#11 library version and Besu release in the written scope before work starts, because each of these changes the test plan. Also confirm who takes over the HSM administration and key lifecycle after handover, and what happens to the validator key when the HSM is replaced. These are the points where an internal team and a partner most often disagree, and a fixed-scope agreement should state them plainly.
How DeployOpen scopes and delivers Besu HSM key storage
DeployOpen plans and delivers PKCS#11 storage for Besu validator node keys inside your own infrastructure, from provider selection through key creation and start-up checks. Each engagement starts with a written scope so your security, operations and compliance teams agree on what is built and handed over before work begins.
How we scope
- We confirm your HSM model, firmware and PKCS#11 library version against the plugin's provider requirements before work starts.
- The written scope names each validator node, the key alias convention, and where the plugin JAR and provider library will be installed.
- We agree which HSM partitions, credentials and access roles are in scope, and which Besu hosts receive the plugin configuration.
How we build
- We configure the native-pkcs11 provider, install the plugin into Besu's plugins directory, and set provider, key alias and authentication options.
- We create validator node keys on the HSM before first start-up, then confirm each node loads its key from the module rather than a key file.
- We test start-up failure paths, including wrong PIN, missing key alias and unreachable HSM, and record the expected Besu log output for each.
How we hand over
- You receive a runbook covering installation steps, plugin CLI options, key creation procedure and the start-up verification checklist.
- Documentation records which key material lives on the HSM, which backup and recovery steps apply, and who holds each credential.
- We walk your operations and security teams through the build and confirm they can repeat key creation and node restart without us.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, including review when Besu or the plugin changes version.
- Before each Besu upgrade, we check plugin and provider compatibility and confirm that the HSM-backed nodes still start cleanly.
- Reviews of access to HSM partitions and credential rotation can be scheduled as part of a retainer or a separate fixed-scope engagement.

