This topic explains the process of generating a symmetric key using the genSymKey command on HSM.
Feature description
The genSymKey command allows for the creation of a symmetric key on HSM. Upon successful execution, it provides a key handle from HSM, which serves as the key's identifier.
Ensure you have initiated key_mgmt_tool and logged on to HSM with a CU identity before executing this command.
Syntax
Enter the parameters as outlined in the syntax below. For detailed parameter descriptions, see Parameters.
genSymKey -t <key-type>
-s <key-size>
-l <label>
[-id <key-ID>]
[-min_srv <minimum-number-of-servers>]
[-m_value <0..8>]
[-nex]
[-sess]
[-timeout <number-of-seconds> ]
[-u <user-ids>]
[-attest]
Parameters must be entered in the sequence specified by the syntax.
Example
Below is an example of generating a 256-bit AES key with the label 'aes256'.
Command: genSymKey -t 31 -s 32 -l aes256
Cfm3GenerateSymmetricKey returned: 0x00 : HSM Return: SUCCESS
Symmetric Key Created. Key Handle: 16
Cluster Status:
Node id 0 status: 0x00000000 : HSM Return: SUCCESSSUCCESS
Parameters
Parameter Name |
Description |
Required |
Valid Values |
-t |
Determines the type of symmetric key to generate. |
Yes |
|
-s |
Sets the key size in bits. |
Yes |
|
-l |
Assigns a label to the key. |
Yes |
No specific requirements |
-id |
Specifies an ID for the generated key. |
No |
No specific requirements |
-sess |
Marks the key as a session key. |
No |
No specific requirements |
-nex |
Designates the key as non-exportable. |
No |
No specific requirements |
-u |
Lists user IDs authorized to access the key, separated by commas for multiple users. |
No |
No specific requirements |
-m_value |
Defines the maximum number of users permitted to utilize the generated key. |
No |
No specific requirements |
-attest |
Conducts a verification of the firmware response's integrity. |
No |
No specific requirements |
-min_srv |
|
No |
No specific requirements |
-timeout |
|
No |
No specific requirements |