To use Bouncy Hsm, you need to have Net 8.0 Runtime and ASP.NET Core Runtime 8 installed.
Bouncy Hsm is standard ASP.NET Core application with native shared library implements PKCS#11 interface. The following diagram shows usage:
- Download
BouncyHsm.zip
from releases. - Extract
BouncyHsm.zip
into folder. - If necessary, the web UI port should be changed in
appsettings.json
inKestrel::Endpoints::Http::Url
(andAppBasePath
, is use base path). - Run
BouncyHsm.exe
on Windows ordotnet BouncyHsm.dll
on other platforms. - Open web UI (default run on http://localhost:5000/), click Slots/Tokens in left menu, click Create new, fill form and crate first slot with token.
- In your application configure or open native PKCS#11 library in folder
native/{your platform}/BouncyHsm.Pkcs11Lib.{dll|so}
(eg,native/Win-x64/BouncyHsm.Pkcs11Lib.dll
for 64-bit Windows application ornative/Linux-x64/BouncyHsm.Pkcs11Lib.so
for 64-bit linux application).
For local development, there is no need to deploy Bouncy Hsm, just start it manually. It is recommended to configure storage, logging and web UI port.
Native PKCS#11 does not require configuration when connecting to localhost. Its configuration takes place through an environment variable, the name and value of which can be "clicked out" in the web UI in section Configure P11 lib.
To use Bouncy Hsm on a test or staging environment, it can be deployed as a service. You can read more in deployment guide.