Skip to main content

Command Overview

note

Usage of this tool requires previous installation of Java Runtime Environment (see Prerequisites).

The primus-tools.jar file contains a set of different Java command line commands for the Primus HSM or CloudHSM as well as other utilities. The general call structure is as follows:

java -jar primus-tools.jar <ToolName> <HSM connection and credentials> [further tool parameters] [-help]

Commands will require an established <HSM connection and credentials> parameter to be able to execute properly. For further assistance on how to prepare your <HSM connection and credentials> parameter, see HSM Connection and Access Credentials section.

Commands Overview

The table below shows the overview of current Primus Tools commands.

Options and more information for a specific command can be listed by calling without parameters or with parameter -help, e.g.:

java -jar primus-tools.jar CreateKey <HSM connection and credentials> -help
usage: CreateKey -host <host> [-port <port>] -user <user> [-password <password>]
-keyname <keyname> [-keypassword <keypassword>] -type <type> [-size <size>]
[-curve <curve>] [-flags <flags>] [-access <access>]

The detailed description of the commands is found under Command Details.

Credential Management

Used for credential management for the HSM and the connection to it

CommandDescription
GetUserSecretGet (optionally blinded) permanent user secret
GenerateBlindingKeyFileGenerate a blinding key file
BlindPasswordBlinding of passwords, setup passwords, user secrets
LoginLogin test (to check credentials and connectivity)

HSM Device Information

Used for acquiring HSM device information and logs

CommandDescription
GetLogGet the HSM user log
GetDeviceInfoGet device name, firmware version and used provider version

Object Management

Commands used for managing HSM objects.

CommandDescription
ListKeyStoreObjectList partition objects (type, size, flags, hash) for single aliases
ListKeyStoreObjectsList partition objects (type, size, flags, hash)
ListKeyEntryList key information
ListKeyFlagsList key flags
CreateKeyCreate key
DeleteKeyDelete key
GetKeyFlagGet a single key flag for a key
SetKeyFlagSet key flag
SetKeyIdSet key id
RenameKeyRename a key or change a key password
ImportCertificateCertificate Import
ImportPublicKeyImport a public key
ImportKeyWrappedImport a wrapped key
GetPublicKeyExport a public key
ExportKeyWrapped Export a wrapped key

Partition Management

Commands used for managing HSM partitions.

CommandDescription
GetKeyStoreStatisticsGet number of objects (type, number) and show used/free size
ListKeyStoreList partition information (as visible to JCE API)
ClearKeyStoreClear the partition (delete all objects/keys)

Smart Key Attributes

Commands used for Smart Key Attribute key management.

CommandDescription
CreateAttestationKeyCreate attestation key (for signed attestations and timestamps, needs RKS)
ListEkaAccessList smart key (SKA/eka) access information
CreateEkaKeyCreate smart (EKA/SKA) key
CreateIntegrityKeyCreate integrity key (for SKA use)
GetAttestationGet key attributes (attested/signed)
ModifyEkaModify smart key (SKA/EKA) attributes
SetKeyFlagEkaSet key flag on SKA/EKA key
SignEkaSign test with SKA/EKA

KeytoolX & JarsignerX

Commands used for subcommands of KeytoolX and JarsignerX.

CommandDescription
KeytoolXAdapter to keytoolX
JarsignerXAdapter to jarsignerX

Bring Your Own Key

Commands used for different BYOK procedures.

CommandDescription
AzureByokExportWrap-export RSA, EC, or AES key, for Azure BYOK
AwsKmsByokExportWrap-export a AES key for AWS KMS BYOK

|SalesforceByokExport| Wrap-export a AES/HMAC key derivation for Salesforce BYOK (currently in testing)|

Elliptic Curve Integrated Encryption Scheme

Commands used for ECIES procedures.

CommandDescription
IesChunkingEncryptElliptic Curve Integrated Encryption Scheme chunking file encryption
IesChunkingDecryptElliptic Curve Integrated Encryption Scheme chunking file decryption
IesEncryptElliptic Curve Integrated Encryption Scheme file encryption
IesDecryptElliptic Curve Integrated Encryption Scheme file decryption

EMV

Commands used for EMV procedures.

CommandDescription
ImportKeySplitImport of plain key split into 3 parts (EMV)
ImportKeyWrappedZmkImport of key encrypted (wrapped)
ExportKeyWrappedZmkExport of key encrypted (wrapped)
ExportKeySplitExport of plain key split into 3 parts (EMV)

Signing

Commands used for signing and signature verification.

CommandDescription
SignSign test
JarSignatureCheckCheck Primus JCE provider (primusX.jar) code signature