SoftHSMv2 is a software implementation of the PCKS#11 interface. It is often used as replacement for real HSM devices in test environments where protecting key material is not a strong requirement. In this post I will explain how the state of SoftHSMv2 is persisted, the security behind it and what can be improved. Tokens and objects Token is the PKCS#11 term for something that stores cryptographic objects and performs cryptographic operations.