After enabling the hsm_proxy HSM client, you can use key_mgmt_tool to create, delete, and inspect keys for CU users in an HSM instance.
Prerequisites
The hsm_proxy HSM client must be running. For more information, see Start the HSM client (hsm_proxy).
Download key_mgmt_tool
key_mgmt_tool is bundled with hsm_mgmt_tool in a single installation package. For more information, see Download the installation package.
Start and exit the tool
To start key_mgmt_tool:
/opt/hsm/bin/key_mgmt_tool
To exit key_mgmt_tool:
Command: exit
Obtain help
Run the following command to display all available key_mgmt_tool commands:
Command: help
Run the following command to get help for a specific command:
Command: <command-name> -h
Command reference
The following table describes the key_mgmt_tool commands.
|
Command |
Description |
|
Encrypts and decrypts key content in a file. |
|
|
Removes a key from an HSM instance. |
|
|
Provides the corresponding hexadecimal error code from key_mgmt_tool. |
|
|
Exits the key_mgmt_tool. |
|
|
Exports a private key from an HSM instance to a disk file. |
|
|
Exports the public key from an HSM instance to a disk file. |
|
|
Exports the plaintext of the symmetric key from an HSM instance to a file. |
|
|
Retrieves a key as a masked object file from an HSM instance. |
|
|
Searches for keys using key attribute values. |
|
|
Checks whether keys exist on an HSM instance. |
|
|
Creates a DSA (Digital Signature Algorithm) key pair in an HSM instance. |
|
|
Generates an Elliptic Curve Cryptography (ECC) key pair in an HSM instance. |
|
|
Generates RSA asymmetric key pairs in an HSM instance. |
|
|
Generates a symmetric key in an HSM instance. |
|
|
Generates the key attribute values from an HSM instance and writes them to a file. |
|
|
Generates a private key in simulated PEM format and saves it to a file. |
|
|
Retrieves the partition certificate of an HSM instance and saves it to a file. |
|
|
Retrieves the IDs of HSM users who can use a key. For controlled keys, the number of controlled users is also returned. |
|
|
Imports a private key into an HSM instance. |
|
|
Imports a public key into an HSM instance. |
|
|
Imports a symmetric key in plaintext from a file to an HSM instance. |
|
|
Inserts a masked object into an HSM instance from a disk file. |
|
|
Determines whether a file contains a real private key or a fake PEM key. |
|
|
Lists the attributes of HSM keys and their constant representations. |
|
|
Retrieves user types, IDs, and other attributes within an HSM instance. |
|
|
Logs in to or logs out of an HSM instance. |
|
|
Converts a session key into a permanent key. |
|
|
Generates a signature for a file using your private keys. |
|
|
Imports a wrapped (encrypted) key from a file into an HSM instance. |
|
|
Verifies whether a file is signed with the specified key. |
|
|
Exports an encrypted copy of a key from an HSM instance to a file. |