-
Notifications
You must be signed in to change notification settings - Fork 155
hsmCompatVerify
The hsmCompatVerify tools (hsmCompatVerifyClnt and hsmCompatVerifyServ) are standalone command-line utilities designed to verify whether an HSM (Hardware Security Module) or software-based PKCS#11 cryptographic token is compatible with Dogtag KRA (Key Recovery Authority) operations.
These tools test the essential PKCS#11 mechanisms required for KRA key archival and recovery workflows without requiring a full PKI installation.
Availability: Since PKI 11.10.
Before deploying a KRA with an HSM, administrators can use these tools to verify that the HSM supports the required cryptographic operations:
-
Key Generation: RSA, EC, and post-quantum (ML-KEM) key pair generation
-
Key Wrapping/Unwrapping: RSA-OAEP, RSA PKCS#1 v1.5, AES-KWP, AES-CBC
-
Certificate Signing: Self-signed and CA-signed certificate creation
-
Session Key Operations: AES symmetric key generation and operations
The tools simulate the complete KRA workflow:
-
Client-side: Generate user keys and wrap them for archival (using KRA transport certificate)
-
Server-side archival: Unwrap keys with transport key, re-wrap with storage key
-
Server-side recovery: Unwrap keys from storage and export to PKCS#12
| Tool | Description |
|---|---|
|
Server-side operations (setup, archival, recovery) |
|
Client-side operations (key generation and wrapping) |
-
User Keys: RSA (2048-4096 bits), EC (nistp256, nistp384, nistp521)
-
CA Keys: RSA (2048-4096 bits), EC (nistp256, nistp384, nistp521)
-
Transport/Storage Keys: RSA-2048 (required for key wrapping)
-
User Keys: ML-KEM-768
-
CA Keys: ML-DSA-65
-
Transport/Storage Keys: ML-KEM-768
See RSA/EC Key Archival Examples for usage instructions.
|
Important
|
|
-
Standalone operation: No CA/KRA server installation required
-
Multiple test modes: Setup-only, archive-only, recover-only, or full workflow
-
LDIF export/import: Archive keys to LDIF format for testing storage workflows
-
Flexible key wrapping: Support for multiple algorithms (AES-KWP, AES-CBC, RSA-OAEP)
-
PKCS#12 export: Verify complete recovery workflow with PKCS#12 file creation
-
HSM token support: Direct testing with PKCS#11 HSM tokens
Verify HSM compatibility before purchasing or deploying hardware:
# Test with your HSM token
$ hsmCompatVerifyServ --setup-only \
--hsm-token "YourHSM" \
--hsm-token-passwd-file hsm.pwd \
--verboseTest specific key wrapping algorithms required by your deployment:
# Test AES-KWP (FIPS-compliant)
$ hsmCompatVerifyClnt --keywrap-alg "AES KeyWrap/Wrapped" --verbose
# Test RSA-OAEP (recommended)
$ hsmCompatVerifyClnt --rsa-keywrap RSA-OAEP --verbose-
RSA/EC Key Archival Examples - Complete walkthrough with RSA and EC keys
-
Install the
pki-toolsorpki-hsm-compat-verifypackage:$ sudo dnf install pki-tools
-
Follow the RSA/EC Key Archival Examples guide
-
For HSM testing, ensure your HSM’s PKCS#11 library is properly configured with NSS
|
Tip
|
To find a page in the Wiki, enter the keywords in search field, press Enter, then click Wikis. |