Home/Blog/Secure Certificate Storage with HSMs: Enterprise Best Practices
Security

Secure Certificate Storage with HSMs: Enterprise Best Practices

Learn how to protect cryptographic keys with Hardware Security Modules including HSM types, FIPS certification levels, key management best practices, and cloud HSM options for enterprise PKI.

By InventiveHQ Team
Secure Certificate Storage with HSMs: Enterprise Best Practices

Secure Certificate Storage with HSMs: Enterprise Key Protection

Hardware Security Modules (HSMs) provide the highest level of protection for cryptographic keys. Unlike software-stored keys that can be extracted if systems are compromised, HSM-protected keys physically cannot leave the device—all cryptographic operations occur inside tamper-resistant hardware. This guide covers HSM types, certification standards, deployment patterns, and best practices for enterprise key management.

Why HSM Protection Matters

Software-stored private keys are vulnerable to extraction:

┌─────────────────────────────────────────────────────────────────────────┐
│                Software vs HSM Key Storage                               │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  SOFTWARE KEY STORAGE               HSM KEY STORAGE                      │
│  ────────────────────────────────────────────────────────────────────── │
│                                                                          │
│  ┌─────────────────────┐           ┌─────────────────────┐              │
│  │  Server Memory      │           │  Server Memory      │              │
│  │  ┌───────────────┐  │           │  ┌───────────────┐  │              │
│  │  │ Private Key   │◀─┼──Copy──   │  │ Key Handle    │  │              │
│  │  │ (Extractable) │  │           │  │ (Reference)   │  │              │
│  │  └───────────────┘  │           │  └───────┬───────┘  │              │
│  └─────────────────────┘           └──────────┼──────────┘              │
│                                               │                          │
│  If attacker gains root:                      │                          │
│  • Key can be copied                          ▼                          │
│  • Key can be exfiltrated          ┌─────────────────────┐              │
│  • All future traffic              │  HSM (Tamper-Proof) │              │
│    can be decrypted                │  ┌───────────────┐  │              │
│                                    │  │ Private Key   │  │              │
│                                    │  │ (Never Leaves)│  │              │
│                                    │  └───────────────┘  │              │
│                                    │                     │              │
│                                    │  If attacker gains  │              │
│                                    │  root: Key CANNOT   │              │
│                                    │  be extracted       │              │
│                                    └─────────────────────┘              │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

Key scenarios requiring HSM protection:

Use CaseRisk Without HSMHSM Benefit
CA Root KeyPKI compromise, all certs untrustedKey never exposed, tamper detection
Code SigningMalware signed as legitimateMulti-person authorization
TLS Private KeyTraffic decryption, impersonationKey protected even if server compromised
Database EncryptionData breach, compliance violationKey operations audited, access controlled
Payment ProcessingCard data theft, PCI-DSS failureRequired for PIN encryption

HSM Types and Form Factors

Network HSMs (Appliances)

Network-attached HSMs serve multiple applications and provide high throughput.

Enterprise options:

VendorModelFIPS LevelThroughput (RSA 2048)
ThalesLuna Network HSM 7Level 320,000 ops/sec
UtimacoSecurityServerLevel 315,000 ops/sec
EntrustnShield Connect XCLevel 312,000 ops/sec
SecurosysPrimus X SeriesLevel 310,000 ops/sec

Typical deployment:

┌─────────────────────────────────────────────────────────────────────────┐
│                   Network HSM Deployment                                 │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│   ┌─────────────┐    ┌─────────────┐    ┌─────────────┐                │
│   │ Web Server  │    │ CA Server   │    │ Vault       │                │
│   │ (TLS)       │    │ (Signing)   │    │ (Secrets)   │                │
│   └──────┬──────┘    └──────┬──────┘    └──────┬──────┘                │
│          │                  │                   │                        │
│          │ PKCS#11         │ PKCS#11          │ PKCS#11                 │
│          │                  │                   │                        │
│          └────────────┬─────┴───────────────────┘                       │
│                       │                                                  │
│                       ▼                                                  │
│          ┌────────────────────────┐                                     │
│          │     Load Balancer      │                                     │
│          └────────────┬───────────┘                                     │
│                       │                                                  │
│          ┌────────────┴───────────┐                                     │
│          ▼                        ▼                                      │
│   ┌─────────────┐          ┌─────────────┐                              │
│   │  HSM Node 1 │◀────────▶│  HSM Node 2 │                              │
│   │  (Primary)  │  HA Sync │  (Secondary)│                              │
│   └─────────────┘          └─────────────┘                              │
│                                                                          │
│   Both nodes contain synchronized keys for high availability            │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

USB Token HSMs

Portable devices for individual workstations:

DeviceFIPS LevelBest ForPrice Range
YubiHSM 2Level 3Small PKI, code signing$650
Nitrokey HSM 2Level 2Personal keys, development$109
SafeNet eToken 5110Level 3Smart card + HSM$50-100

Cloud HSMs

Managed HSM services with cloud-native integration:

ProviderServiceFIPS LevelPricing Model
AWSCloudHSMLevel 3$1.60/hour per HSM
AzureDedicated HSMLevel 3$4.85/hour per HSM
AzureManaged HSMLevel 3$3.20/hour + operations
GCPCloud HSMLevel 3$1.00-2.50/hour

FIPS 140-2/140-3 Certification Levels

Understanding FIPS certification helps you choose the right HSM for your requirements:

┌─────────────────────────────────────────────────────────────────────────┐
│                    FIPS 140-2 Security Levels                            │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  LEVEL 1 - Basic                                                        │
│  ─────────────────────────────────────────────────────────────────────  │
│  • Algorithm correctness testing                                         │
│  • No physical security requirements                                     │
│  • Software-only implementations acceptable                              │
│  • Use case: Low-security applications                                   │
│                                                                          │
│  LEVEL 2 - Tamper-Evident                                               │
│  ─────────────────────────────────────────────────────────────────────  │
│  • Physical tamper-evident seals                                         │
│  • Role-based authentication required                                    │
│  • Operator must be able to detect tampering                            │
│  • Use case: General enterprise, development                             │
│                                                                          │
│  LEVEL 3 - Tamper-Resistant ← Most common for enterprise               │
│  ─────────────────────────────────────────────────────────────────────  │
│  • Active tamper response (key zeroization)                              │
│  • Identity-based authentication                                         │
│  • Physical resistance to probing/manipulation                           │
│  • Use case: CA keys, code signing, payment systems                      │
│                                                                          │
│  LEVEL 4 - Environmental Protection                                     │
│  ─────────────────────────────────────────────────────────────────────  │
│  • Protection against environmental attacks                              │
│  • Voltage/temperature fault detection                                   │
│  • Complete envelope of protection                                       │
│  • Use case: High-security government, military                          │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

Compliance requirements by regulation:

StandardMinimum LevelKey Types
PCI-DSSLevel 3 (PIN), Level 2 (other)PIN encryption keys
eIDASLevel 3Qualified signature keys
WebTrust for CAsLevel 3CA signing keys
HIPAALevel 2+ (recommended)PHI encryption keys
Federal PKILevel 3All CA keys

Key Management Best Practices

Key Lifecycle Management

┌─────────────────────────────────────────────────────────────────────────┐
│                    HSM Key Lifecycle                                     │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  1. GENERATION         2. ACTIVATION         3. ACTIVE USE              │
│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐            │
│  │ Generate in  │────▶│ Enable for   │────▶│ Sign, Decrypt│            │
│  │ HSM (never   │     │ operations   │     │ operations   │            │
│  │ import)      │     │ after review │     │              │            │
│  └──────────────┘     └──────────────┘     └──────────────┘            │
│                                                   │                      │
│                                                   │ (Validity period)    │
│                                                   ▼                      │
│  6. DESTRUCTION        5. ARCHIVAL          4. DEACTIVATION            │
│  ┌──────────────┐     ┌──────────────┐     ┌──────────────┐            │
│  │ Secure       │◀────│ Retain for   │◀────│ Disable new  │            │
│  │ deletion     │     │ decryption   │     │ operations   │            │
│  │ (zeroize)    │     │ only         │     │              │            │
│  └──────────────┘     └──────────────┘     └──────────────┘            │
│                                                                          │
│  Key States:                                                             │
│  • Pre-active: Generated, not yet enabled                               │
│  • Active: Available for all operations                                  │
│  • Deactivated: Decrypt only (for historical data)                      │
│  • Compromised: Revoked, all use prohibited                             │
│  • Destroyed: Cryptographically erased                                   │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

Multi-Person Authorization (M-of-N)

Critical operations should require multiple administrators:

# Example: Thales Luna HSM M-of-N configuration
# Require 3 of 5 administrators to activate root CA key

# Initialize partition with M-of-N
lunacm:> partition init -label "RootCA" -m 3 -n 5

# Each administrator generates their credential
lunacm:> role createChallenge -name admin1
lunacm:> role createChallenge -name admin2
# ... repeat for all 5

# To use the root CA key, 3 admins must authenticate
lunacm:> role login -name admin1
lunacm:> role login -name admin2
lunacm:> role login -name admin3
# Now key operations are permitted

Separation of Duties

┌─────────────────────────────────────────────────────────────────────────┐
│                    HSM Role Separation                                   │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  ROLE                   PERMISSIONS                                      │
│  ─────────────────────────────────────────────────────────────────────  │
│                                                                          │
│  Security Officer       • Create/delete partitions                       │
│  (SO)                   • Set policies                                   │
│                         • Reset PINs                                     │
│                         • Cannot access keys                             │
│                                                                          │
│  Partition              • Generate keys                                  │
│  Administrator          • Manage key lifecycle                           │
│                         • Configure applications                         │
│                         • Cannot modify SO policies                      │
│                                                                          │
│  Crypto User            • Use keys for operations                        │
│  (Application)          • Cannot generate/delete keys                    │
│                         • Cannot modify policies                         │
│                                                                          │
│  Auditor                • View audit logs                                │
│                         • Cannot perform any operations                  │
│                         • Read-only access                               │
│                                                                          │
│  No single role can:                                                    │
│  • Generate AND use keys without oversight                              │
│  • Modify policies AND access keys                                       │
│  • Delete audit logs while performing operations                        │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

HSM Integration Scenarios

CA Key Protection

Protect certificate authority signing keys with HSM:

# OpenSSL with PKCS#11 engine
# Configure OpenSSL to use HSM

cat > /etc/ssl/hsm-openssl.cnf << 'EOF'
openssl_conf = openssl_init

[openssl_init]
engines = engine_section

[engine_section]
pkcs11 = pkcs11_section

[pkcs11_section]
engine_id = pkcs11
dynamic_path = /usr/lib64/engines-1.1/libpkcs11.so
MODULE_PATH = /usr/lib64/libCryptoki2_64.so
init = 0

[req]
distinguished_name = req_dn
default_bits = 2048

[req_dn]
CN = Example Corp Issuing CA

[ca]
default_ca = CA_default

[CA_default]
# ... CA configuration
EOF

# Generate key in HSM (never leaves device)
pkcs11-tool --module /usr/lib64/libCryptoki2_64.so \
    --login --keypairgen \
    --key-type RSA:2048 \
    --label "issuing-ca-key" \
    --id 01

# Create certificate using HSM key
openssl req -new -x509 \
    -config /etc/ssl/hsm-openssl.cnf \
    -engine pkcs11 \
    -keyform engine \
    -key "pkcs11:object=issuing-ca-key;type=private" \
    -out issuing-ca.crt \
    -days 1825 \
    -subj "/CN=Example Corp Issuing CA/O=Example Corp"

TLS Termination with HSM

Configure Nginx to use HSM for TLS private keys:

# /etc/nginx/nginx.conf
# Requires nginx compiled with PKCS#11 support

ssl_engine pkcs11;

server {
    listen 443 ssl;
    server_name example.com;

    # Certificate chain (public, can be on disk)
    ssl_certificate /etc/ssl/certs/server-chain.crt;

    # Private key in HSM (referenced by PKCS#11 URI)
    ssl_certificate_key "engine:pkcs11:pkcs11:object=tls-key;type=private";

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers off;
}

HashiCorp Vault HSM Integration

Configure Vault to use HSM for auto-unseal:

# /etc/vault.d/vault.hcl

seal "pkcs11" {
  lib            = "/usr/lib64/libCryptoki2_64.so"
  slot           = "0"
  pin            = "env:HSM_PIN"
  key_label      = "vault-seal-key"
  hmac_key_label = "vault-hmac-key"
  generate_key   = "true"
}

storage "raft" {
  path = "/var/lib/vault/data"
  node_id = "vault-1"
}

listener "tcp" {
  address     = "0.0.0.0:8200"
  tls_disable = 0
  tls_cert_file = "/etc/vault.d/tls/vault.crt"
  tls_key_file  = "/etc/vault.d/tls/vault.key"
}

For AWS CloudHSM:

seal "awskms" {
  region     = "us-east-1"
  kms_key_id = "alias/vault-seal-key"
  # Uses CloudHSM-backed KMS custom key store
}

Code Signing with HSM

Sign code using HSM-protected key:

# Windows Authenticode signing with HSM
# Requires SafeNet Authentication Client or similar

signtool sign /v /fd SHA256 \
    /sha1 <certificate-thumbprint> \
    /tr http://timestamp.digicert.com \
    /td SHA256 \
    MyApplication.exe

# macOS codesigning with hardware token
codesign --sign "Developer ID Application: Example Corp" \
    --keychain /Library/Keychains/System.keychain \
    --timestamp \
    MyApplication.app

# Linux signing with PKCS#11
# Using osslsigncode for Windows binaries
osslsigncode sign \
    -pkcs11engine /usr/lib64/engines-1.1/libpkcs11.so \
    -pkcs11module /usr/lib64/libCryptoki2_64.so \
    -key "pkcs11:object=code-signing-key;type=private" \
    -certs code-signing-cert.pem \
    -ts http://timestamp.digicert.com \
    -in unsigned.exe \
    -out signed.exe

Cloud HSM Deployment

AWS CloudHSM Setup

# Create CloudHSM cluster
aws cloudhsmv2 create-cluster \
    --hsm-type hsm1.medium \
    --subnet-ids subnet-0123456789abcdef0

# Initialize cluster (requires HSM client)
/opt/cloudhsm/bin/cloudhsm_mgmt_util /opt/cloudhsm/etc/cloudhsm_mgmt_util.cfg

# Configure crypto user for applications
createUser CU app_user <password>

# Generate key
aws-cloudhsm> genRSAKeyPair -m 2048 -e 65537 -l ca-signing-key

Integrate with AWS services:

# CloudFormation for ACM with CloudHSM
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  CustomKeyStore:
    Type: AWS::KMS::CustomKeyStore
    Properties:
      CustomKeyStoreName: cloudhsm-keystore
      CloudHsmClusterId: !Ref CloudHSMCluster
      KeyStorePassword: !Ref KeyStorePassword
      TrustAnchorCertificate: !Ref TrustAnchorCert

  CMK:
    Type: AWS::KMS::Key
    Properties:
      CustomKeyStoreId: !Ref CustomKeyStore
      KeySpec: RSA_2048
      KeyUsage: SIGN_VERIFY

Azure Dedicated HSM

# Create Dedicated HSM
az dedicated-hsm create \
    --resource-group myResourceGroup \
    --name myHSM \
    --location eastus \
    --sku-name SafeNetLunaNetworkHSMA790 \
    --stamp-id stamp1 \
    --network-profile-network-interfaces privateIPAddress=10.0.0.5

# Initialize using Thales Luna client
lunacm:> partition init -label AzureHSM

GCP Cloud HSM

# Create key ring with HSM protection
gcloud kms keyrings create ca-keyring \
    --location global

# Create HSM-protected key
gcloud kms keys create ca-signing-key \
    --keyring ca-keyring \
    --location global \
    --purpose asymmetric-signing \
    --default-algorithm rsa-sign-pkcs1-4096-sha256 \
    --protection-level hsm

# Sign certificate using Cloud HSM
gcloud kms asymmetric-sign \
    --key ca-signing-key \
    --keyring ca-keyring \
    --location global \
    --version 1 \
    --digest-algorithm sha256 \
    --input-file tbs-certificate.bin \
    --signature-file signature.bin

High Availability and Disaster Recovery

HSM Clustering

┌─────────────────────────────────────────────────────────────────────────┐
│                    HSM High Availability                                 │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  ACTIVE-ACTIVE CLUSTER                                                  │
│                                                                          │
│  ┌─────────────────────────────────────────────────────────────────┐   │
│  │                        Application Servers                       │   │
│  │  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐            │   │
│  │  │ Server1 │  │ Server2 │  │ Server3 │  │ Server4 │            │   │
│  │  └────┬────┘  └────┬────┘  └────┬────┘  └────┬────┘            │   │
│  └───────┼────────────┼────────────┼────────────┼──────────────────┘   │
│          │            │            │            │                       │
│          └────────────┴─────┬──────┴────────────┘                      │
│                             │                                           │
│                             ▼                                           │
│                    ┌────────────────┐                                  │
│                    │  Load Balancer │                                  │
│                    └────────┬───────┘                                  │
│                             │                                           │
│               ┌─────────────┴─────────────┐                            │
│               ▼                           ▼                             │
│       ┌─────────────┐             ┌─────────────┐                      │
│       │   HSM #1    │◀───────────▶│   HSM #2    │                      │
│       │  (Active)   │  Key Sync   │  (Active)   │                      │
│       │  Site A     │             │  Site B     │                      │
│       └─────────────┘             └─────────────┘                      │
│                                                                          │
│  • Both HSMs contain identical keys (synchronized)                      │
│  • Applications connect to either (load balanced)                       │
│  • Failover is automatic if one HSM fails                               │
│  • Geographic separation for disaster recovery                          │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

Backup and Recovery Procedures

# Thales Luna HSM backup example

# 1. Create backup key (one-time setup)
lunacm:> srk generatebackup -keytype AES -keylength 256

# 2. Perform backup
lunash:> partition backup -partition ProductionCA \
    -label "backup-2025-01-16" \
    -password <backup-password>

# 3. Export backup to file
lunash:> backup export -source local -serial <backup-serial>

# 4. Store encrypted backup file securely
# - Encrypt with separate key
# - Store in geographically separate location
# - Document recovery procedure
# - Test restoration annually

# Recovery procedure
lunash:> backup restore -label "backup-2025-01-16" \
    -password <backup-password> \
    -partition ProductionCA

Logging and Monitoring

Audit Log Requirements

┌─────────────────────────────────────────────────────────────────────────┐
│                    HSM Audit Events                                      │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│  Authentication Events          Key Operations                           │
│  ────────────────────────────────────────────────────────────────────── │
│  • Login attempts (success/fail) • Key generation                       │
│  • Logout events                 • Key deletion                         │
│  • PIN changes                   • Key export (wrapped)                 │
│  • Role activations              • Signing operations                   │
│                                  • Decryption operations                 │
│                                                                          │
│  Administrative Events          Security Events                          │
│  ────────────────────────────────────────────────────────────────────── │
│  • Policy changes               • Tamper attempts detected              │
│  • Partition creation/deletion  • Failed access attempts               │
│  • User creation/deletion       • Threshold violations                  │
│  • Firmware updates             • Key compromise notifications          │
│                                                                          │
│  Required Log Fields:                                                    │
│  • Timestamp (UTC, millisecond precision)                               │
│  • User/role identity                                                    │
│  • Operation type                                                        │
│  • Object identifier (key label)                                        │
│  • Result (success/failure)                                              │
│  • Client IP address                                                     │
│  • Session identifier                                                    │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

SIEM Integration

# Forward HSM logs to SIEM
# Example: Thales Luna to Splunk

# Configure syslog forwarding
lunash:> syslog server add -server splunk.example.com -port 514

# Enable detailed audit logging
lunash:> audit config -severitylevel 7

# Splunk query for security events
index=hsm sourcetype=luna
| search severity=alert OR event_type=tamper OR event_type=auth_failure
| stats count by event_type, user

Common Pitfalls

PitfallImpactPrevention
Importing keys instead of generatingKey exposure before HSM protectionAlways generate keys inside HSM
Single administratorInsider threat, key abuseM-of-N authorization for critical keys
No backup HSMSingle point of failureClustered deployment with sync
Weak backup protectionBackup key theftHSM-encrypted backups, split custody
Inadequate loggingUndetected compromiseComprehensive audit logging to SIEM
Ignoring firmware updatesKnown vulnerabilitiesScheduled maintenance windows
Single-site deploymentDisaster vulnerabilityGeographic distribution
No capacity planningPerformance bottlenecksMonitor ops/sec, plan for peak load
Shared partitionsCross-application compromiseDedicated partitions per application
Missing key rotationExtended exposure windowDocumented rotation schedule

Conclusion

HSMs provide the highest level of protection for cryptographic keys by ensuring keys never leave tamper-resistant hardware. Whether using network appliances, USB tokens, or cloud services, HSM deployment requires careful planning around high availability, backup procedures, and access controls.

Key takeaways:

  • Generate keys in HSM—never import software-generated keys
  • Use FIPS 140-2 Level 3 for CA keys, code signing, and payment processing
  • Implement M-of-N authorization for critical key operations
  • Deploy HSM clusters for high availability and disaster recovery
  • Integrate with SIEM for comprehensive audit logging
  • Test backup and recovery procedures annually

For related topics, see our guides on PKI Certificate Authority Setup and Certificate Lifecycle Management.

Frequently Asked Questions

Find answers to common questions

A Hardware Security Module is a dedicated cryptographic processor that generates, stores, and manages cryptographic keys in tamper-resistant hardware. Keys never leave the HSM in plaintext—all cryptographic operations occur inside the device. HSMs provide physical protection against tampering, logical protection against extraction, and audit logging for compliance. They're essential for protecting high-value keys like CA private keys, code signing keys, and database encryption keys.

Software-stored keys can be extracted if the system is compromised—attackers with root access can copy private keys. HSMs protect keys even if the server is fully compromised because keys physically cannot leave the device. HSMs also provide tamper detection (destroying keys if physical intrusion is detected), separation of duties (requiring multiple administrators), and compliance with regulations like PCI-DSS, HIPAA, and eIDAS that mandate HSM use for certain key types.

FIPS 140-2 is a US government standard for cryptographic modules. Level 1 requires basic algorithm correctness. Level 2 adds tamper-evident seals and role-based authentication. Level 3 adds tamper-resistance (active detection and key zeroization) and identity-based authentication. Level 4 adds environmental protection (voltage, temperature attacks). Most enterprise HSMs are Level 3 certified. Level 3 is typically required for CA keys, code signing, and payment processing.

Network HSMs (like Thales Luna, Utimaco, AWS CloudHSM) are rack-mounted appliances accessed over the network, supporting high-performance operations and multiple applications. USB token HSMs (like YubiHSM, SafeNet eToken) are small devices for individual workstations, typically used for code signing or personal key storage. Network HSMs offer higher throughput (thousands of operations/second), clustering, and remote management. USB tokens are portable and lower cost.

Cloud HSMs (AWS CloudHSM, Azure Dedicated HSM, GCP Cloud HSM) provide the same FIPS 140-2 Level 3 security as on-premises HSMs but in a managed service. Benefits include no hardware procurement, built-in high availability, and integration with cloud services. Drawbacks include recurring costs, network latency, and dependency on cloud provider. On-premises HSMs offer complete physical control but require significant capital investment, maintenance expertise, and physical security infrastructure.

HSM keys are backed up using key wrapping—the key is encrypted with a backup key (also stored in HSM) before export. The wrapped key blob is useless without the backup key. For enterprise HSMs, use vendor-specific backup utilities with split key custody (requiring multiple administrators). Some HSMs support M-of-N key recovery (e.g., 3 of 5 administrators required). Store encrypted backups in physically separate, secure locations. Test restoration procedures regularly.

A key ceremony is a formal, documented procedure for generating or recovering critical cryptographic keys, typically for CA root keys. It involves multiple trusted individuals (key custodians), detailed scripts, video recording, witnessed procedures, and secure facilities. Key ceremonies provide auditability, prevent single-person compromise, and meet compliance requirements. WebTrust and eIDAS regulations require documented key ceremonies for public CAs. Even private PKIs should follow key ceremony practices for root CAs.

Yes, HSMs can perform TLS termination (SSL offload) where the private key operations occur in the HSM while the server handles the rest. This protects TLS keys even if the web server is compromised. HSMs like Thales Luna and AWS CloudHSM integrate with Nginx, Apache, and F5 load balancers via PKCS#11. Performance varies—modern HSMs handle thousands of RSA operations per second, but ECDSA is significantly faster. For high-traffic sites, ensure HSM capacity matches peak load.

HashiCorp Vault supports HSM integration through the Seal configuration. Configure Vault to use PKCS#11 with your HSM for auto-unsealing and key protection. The HSM stores Vault's master key, preventing access to secrets even if Vault's storage is compromised. AWS CloudHSM, Azure Managed HSM, and Thales Luna are supported. Enterprise Vault also supports HSM-backed encryption for the Transit secrets engine, protecting application encryption keys with HSM security.

PCI-DSS requires HSMs for PIN encryption and key management (Level 3 for PIN blocks). eIDAS requires HSMs for qualified electronic signatures. WebTrust requires HSMs for publicly-trusted CA operations. HIPAA recommends HSMs for protected health information encryption. SOC 2 controls often specify HSM use for key management. Federal PKI (FPKI) requires FIPS 140-2 Level 3 or higher. Even when not explicitly required, HSMs demonstrate security due diligence for audits.

Don't wait for a breach to act

Get a free security assessment. Our experts will identify your vulnerabilities and create a protection plan tailored to your business.