Listing keys from a key group
Use the following procedure to list all or selected keys that you created in a particular key group.
To list the keys in a key group
- To list the keys in a key group enter the following command:
nbkmsutil -listkeys -kgname ENCR_mygroup
The nbkmsutil outputs the list in the verbose format by default. Following is a non-verbose listing output.
KGR ENCR_mygroup AES_256 1 Yes 134220503860000000 134220503860000000 - KR my_latest_key Active 134220507320000000 134220507320000000 key for Jan, Feb, March data Number of keys: 1
The following options helps to list all keys from a specific key group or a specific key from a particular key group:
nbkmsutil -listkeys -all | -kgname <key_group_name> [ -keyname <key_name> | -activekey ]
[ -noverbose | -export ]
The -all option lists down all the keys from all the key groups. The keys are listed in a verbose format.
The -kgname option lists the keys from the specified key group.
The -keyname option lists a specific key from the specified key group. It must however be used with the option -kgname.
The -activekey option lists an active key from the specified key group name. It must however be used with the -kgname option.
Note:
The -activekey and -keyname options are mutually exclusive.
The -noverbose option lists the details of the keys and key groups in a formatted form (non-readable). The default is a verbose list.
The -export option generates an output that the key_file requires. (The key_file is used in nbkmsutil -export -path <key_container_path > -key_file file. You can use the output for another key_file.
Run the following command to list all the keys from a specific key group:
nbkmsutil - listkeys -kgname <key_group_name>
Run the following command to list specific keys from a specific key group:
nbkmsutil - listkeys -kgname <key_group_name> -keyname <key_name>
Run the following command to list all keys from all groups:
nbkmsutil -listkeys -all
Run the following command to list all keys from a specific key group:
nbkmsutil - listkeys -kgname <key_group_name>
Run the following command to list the active keys from a specific key group:
nbkmsutil - listkeys -kgname <key_group_name> -activekey