Installation Guide SoftHSM2 in Windows

Purnomo Wahyu Hidayat
3 min readDec 22, 2019

--

SoftHSM is an implementation of a cryptographic store accessible through a PKCS #11 interface. You can use it to explore PKCS #11 without having a Hardware Security Module. It is being developed as a part of the OpenDNSSEC project. SoftHSM uses Botan for its cryptographic operations.

For windows we can download package from :
https://github.com/disig/SoftHSM2-for-Windows

Choose portable or MSI Installer. If we choose portable need set/modify SOFTHSM2_CONF and PATH environment variables manually.

Install SoftHSM2 using MSI Installer

After download package as MSI Installer then double click this package until welcome screen

SoftHSM2 MSI Installer
Welcome screen SoftHSM2

Choose Next button

EULA Screen

Check EULA and Next button will shown

EULA Checked

Choose Destination installation location. Default location D:\SoftHSM2

Destination installation SoftHSM2

or we can select another location (press Change button)

Choosing location destination
After change location

Then press Next button then press Install button to start installation process

After installation process done will pop up README.txt

Completed installation process

Final Result Installation Process

SoftHSM2 will proper running is PATH and SOFTHSM2_CONF setting up into environment variable :

SOFTHSM2_CONF into Variables
SOFTHSM2 Lib into PATH

Initialize Slot at SoftHSM2

After installation done we need initialize slot. SoftHSM2 architecture divides the HSM into multiple slots. Each slot has an associated security provider and can be protected by a separate Personal Identification Number (PIN). You can create a separate slot on the SoftHSM2 for Application and protect the slot with a unique PIN.

Open Command Prompt (cmd.exe) and go to SoftHSM2\bin folder :

Command Prompt Go to SoftHSM2 bin folder

To initialize slot 0 we can execute command :

Command To Initialize Slot 0

securestack : label slot. If need add label with separated space ex. My Label 1 we must add double quote inside label ex. “My Label 1”

Show slots list created in SoftHSM2 :

Command Show Slot List SoftHSM2

--

--

Purnomo Wahyu Hidayat

Public Key Infrastructure Enthusiastic, Research And Development Area