Expand description
Craton HSM — a PKCS#11 v3.0-compliant Software HSM in pure Rust.
This crate provides a complete software HSM implementation with classical and post-quantum cryptography, FIPS 140-3 readiness, and a C ABI compatible with any PKCS#11 consumer.
Modules§
- audit
- Tamper-evident audit logging with chained SHA-256.
- config
- Configuration — TOML-based
HsmConfigwith algorithm policy. - core
- Core HSM state — the central
HsmCorestruct shared by all entry points. Core HSM state — the central struct shared by C ABI, daemon, and admin CLI. - crypto
- Cryptographic operations — keygen, sign, encrypt, digest, PQC, DRBG, self-tests, backends.
- error
- Error types —
HsmErrorenum withCK_RVmapping. - pkcs11_
abi - PKCS#11 C ABI layer — types, constants, and 70+
#[no_mangle]function exports. - session
- Session management —
SessionManager, session state machine, handle allocation. - store
- Object storage — in-memory
ObjectStore, encrypted persistence, key material, backups. - token
- Token and slot management — PIN hashing, login state, multi-slot support.