After enabling the hsm_proxy HSM client, you can use the key_mgmt_tool to manage keys for CU users within HSM. The key_mgmt_tool is a command line utility that allows for the creation, deletion, and inspection of key attributes. This topic describes how to use the key_mgmt_tool.
Prerequisites
hsm_proxy HSM client is running. For more information, see Start the HSM client (hsm_proxy).
Download key_mgmt_tool
The key_mgmt_tool is bundled with the hsm_mgmt_tool in a single installation package. For more information, see Download the installation package.
Start and exit the tool
To start the key_mgmt_tool command line utility:
/opt/hsm/bin/key_mgmt_tool
To exit the key_mgmt_tool command line utility:
Command: exit
Obtain help
Execute the following command to display all available key_mgmt_tool commands:
Command: help
Execute the following command to obtain help for a specific key_mgmt_tool command:
Command: <command-name> -h
Command reference
The following table describes the commands in key_mgmt_tool.
Command | Description |
Encrypts and decrypts the key content in the file. | |
Removes a key from the HSM. | |
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. | |
Verifies whether there are keys 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 write them to a file. | |
Generates a private key in simulated PEM format and saves it to a file. | |
Retrieves the HSM instance's partition certificate and saves it in a file. | |
Retrieves the IDs of HSM users who can use the keys. If the key is controlled, the number of controlled users will be 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 if a given file contains a real private key or a fake PEM key. | |
Lists the attributes of HSM keys and their constant representations. | |
Retrieves user types and IDs within an HSM instance, along with other user attributes. | |
Logs on to or logs out from an HSM instance. | |
Converts a session key into a permanent key. | |
Generates a signature for a file using your private keys. | |
Imports the wrapped (encrypted) key from a file into your HSM instance. | |
Verifies if the specified file is signed with the given key. | |
Exports the encrypted copy of the key from an HSM instance to a file. |