ilusm.dev

hsm

Hardware Security Module integration, PKCS#11, key operations.

Load with: use hsm

Quick example

use hsm

result = hsmop("value", "value", 10)
prn(result)

Functions

PKCS#11 initialization

hsmop(lib, slot, pin)

Opens a connection or resource. Takes lib, slot, pin.

hsmcl(h)

Closes or clears. Takes h.

Key generation

hsmge(h, bits, lbl)

Gets or retrieves a value. Takes h, bits, lbl.

hsmge1(h, bits, lbl)

Performs the operation. Takes h, bits, lbl.

hsmge2(h, curve, lbl)

Performs the operation. Takes h, curve, lbl.

Key listing

hsmke(h)

Performs the operation. Takes h.

hsmfi(h, lbl)

Performs the operation. Takes h, lbl.

Key operations

hsmsi(h, kh, mech, d)

Performs the operation. Takes h, kh, mech, d.

hsmvr(h, kh, mech, d, sig)

Performs the operation. Takes h, kh, mech, d, sig.

hsmen(h, kh, mech, pt)

Encodes. Takes h, kh, mech, pt.

hsmde(h, kh, mech, ct)

Decodes. Takes h, kh, mech, ct.

Mechanisms

hsmme()

Performs the operation.

Object management

hsmne(h, cls, lbl, v)

Creates a new instance. Takes h, cls, lbl, v.

hsmrd(h, oh)

Reads data. Takes h, oh.

hsmde1(h, oh)

Performs the operation. Takes h, oh.

Session management

hsmlo(h, usr, pin)

Performs the operation. Takes h, usr, pin.

hsmlo1(h)

Performs the operation. Takes h.

Random generation

hsmra(h, n)

Performs the operation. Takes h, n.

Wrap/Unwrap

hsmwr(h, wk, tk, mech)

Writes data. Takes h, wk, tk, mech.

hsmun(h, wk, wkdat, mech, tmpl)

Performs the operation. Takes h, wk, wkdat, mech, tmpl.

Cloud HSM adapters

hsmaw(cid, reg)

Performs the operation. Takes cid, reg.

hsmaz(url)

Performs the operation. Takes url.

hsmgc(proj, loc, kr)

Performs the operation. Takes proj, loc, kr.

TPM integration

hsmtp(dev)

Performs the operation. Takes dev.

hsmtp1(h, d, pcr)

Performs the operation. Takes h, d, pcr.

hsmtp2(h, blob)

Performs the operation. Takes h, blob.

hsmtp3(h, pcr)

Performs the operation. Takes h, pcr.

Thales/SafeNet specific

hsmsa()

Performs the operation.

hsmca()

Performs the operation.

Key backup

hsmba(h, kh, f, wk)

Performs the operation. Takes h, kh, f, wk.

hsmre(h, f, uk, lbl)

Performs the operation. Takes h, f, uk, lbl.

Audit logging

hsmau(h, op, d)

Performs the operation. Takes h, op, d.

PIN management

hsmin(h, sopin, usrpin)

Initialises. Takes h, sopin, usrpin.

hsmpi(h, old, new)

Performs the operation. Takes h, old, new.

SO operations

hsmin1(h, pin)

Performs the operation. Takes h, pin.

Notes

  • Hardware Security Module interface - key storage, signing.