An open-source PKCS#11 v3.2 cryptographic module under Simorgh Labs
TOE name: FreeHSM Cryptographic Module TOE version: 1.0.0-FIPS Target EAL: EAL4 augmented with ALC_FLR.2 (Flaw remediation) and AVA_VAN.5 (Advanced vulnerability analysis) Protection Profile claim: eIDAS QSCD (EN 419211-2) or cPP for Cryptographic Modules (NIAP, when published)
The TOE is a software cryptographic module (“Soft HSM”) providing PKCS#11 v3.2 services to applications. It is delivered as a single shared object libfreehsm.so plus the configuration file freehsm.conf. It depends on the OpenSSL 3.x FIPS provider, which is treated as a separately-evaluated module within the same Operational Environment.
getrandom, memfd_secret, prctl)| Identifier | Statement |
|---|---|
| O.CRYPTO | The TOE shall provide cryptographic services using only FIPS-validated primitives loaded from the OpenSSL FIPS provider. |
| O.AUTH | The TOE shall authenticate operators (CO, USER) before granting access to private key material. |
| O.AUDIT | The TOE shall record security-relevant events in an append-only log resistant to insertion, deletion, and modification by an attacker without the audit-MAC key. |
| O.SSP | The TOE shall protect Sensitive Security Parameters (DEKs, private keys, PINs) from unauthorized disclosure during operation and on termination (zeroize). |
| O.SELFTEST | The TOE shall perform power-on and conditional self-tests; on failure, the TOE shall enter an unrecoverable ERROR state. |
| O.ROLE_SEP | The TOE shall enforce separation between CO and USER roles: only CO can re-initialize the token or unlock a USER PIN; only the role owner can change its own PIN. |
| Identifier | Statement |
|---|---|
| OE.OS | The operational OS shall provide process isolation (no ptrace from a different UID) and mlock capability. |
| OE.STORAGE | The filesystem storing token files shall provide atomic file replacement (rename + fsync). |
| OE.OPENSSL | The OpenSSL FIPS provider shall be installed, validated, and in approved mode. |
| OE.OP | Operators shall protect their authentication credentials (PIN) and shall not log in over an untrusted channel. |
| OE.PHYS | The host shall be physically protected against unauthorized access (server room or equivalent). |
fhsm_audit_event_t (see include/fhsm_audit.h).FHSM_EV_GENERATE_KEY / _KEYPAIR.OPENSSL_secure_clear_free upon C_DestroyObject, C_Logout, C_Finalize, or token lock.docs/FIPS_140_3.md §4.docs/FIPS_140_3.md.CKA_PRIVATE, CKA_SENSITIVE, CKA_EXTRACTABLE and the authenticated role.C_UnwrapKey sets CKA_LOCAL = false; imports go through the same access check.C_DestroyObject are unrecoverable.C_GetTokenInfo is the only public service callable before C_Login.C_Login via the CKU_* flag.C_InitToken and C_SetPIN on the USER PIN.C_Initialize.C_Logout and C_CloseSession zeroize per-session secrets.| Subsystem | File(s) | TSFI exposed |
|---|---|---|
| State machine | src/fhsm_state.c |
(internal only) |
| Secure memory | src/fhsm_memory.c |
(internal only) |
| Crypto primitives | src/fhsm_crypto.c + kat/ |
(internal only) |
| Token store | src/fhsm_token.c |
(internal only) |
| Session table | src/fhsm_session.c |
(internal only) |
| Audit log | src/fhsm_audit.c |
(internal only) |
| PKCS#11 façade | src/fhsm_pkcs11.c |
C_* (full PKCS#11 v3.2) |
The TSFI is exclusively the set of C_* symbols exported by libfreehsm.so. All other symbols are hidden by -fvisibility=hidden and the linker version script.
afchine-pubkey.asc; a docs/keys/dev-pubkeys.gpg keyring was named
here as the eventual multi-maintainer form and has not been written, there
being one maintainer.Dockerfile.build (Debian 12 + OpenSSL 3.2 FIPS module from CMVP cert #4825).cppcheck + scan-build + clang-tidy clean.security@freehsm.example (PGP key fingerprint TBD).gcc ≥ 12.0 or clang ≥ 15.0 with the flag set defined in Makefile.valgrind --tool=memcheck, valgrind --tool=helgrind, ASAN, UBSAN.The TOE is designed to resist attacks with attack potential Beyond-High, the AVA_VAN.5 target. Evidence:
The TOE is delivered as a signed .tar.xz source archive (make dist) and a binary RPM/DEB package built reproducibly. Both bundles are signed with the same GPG key. Customers verify the signature and the SHA-256 digest published on the project website over HTTPS.
The CST-evidence work batch adds 4 transverse TSFs that complement the EAL4+ functional family coverage:
| TSF identifier | Family | Description | Source |
|---|---|---|---|
| FCS_RBG_EXT.1 | FCS (Cryptographic Support) | Hardened DRBG with multi-source seeding (getrandom + RDRAND + /dev/urandom + TSC jitter), SHA-384 conditioner per SP 800-90C, NIST SP 800-90B health tests (RCT, APT, CRNGT), auto-reseed every 1 MiB or 1 h. | src/fhsm_drbg.c, include/fhsm_drbg.h, RNG.md |
| FCS_CKM_EXT.4 | FCS | Pair-wise consistency check post C_GenerateKeyPair (RSA, EC, ML-KEM, ML-DSA, SLH-DSA). Failure latches ERROR + refusal to persist. Per FIPS 140-3 §7.10.2.b. |
src/fhsm_pairwise.c, include/fhsm_pairwise.h |
| FPT_TST_EXT.1 | FPT (Protection of TSF) | TPM 2.0 sealing of the per-token DEK (opt-in via FHSM_TPM_SEALING=1). DEK bound to PCRs 0-7 of the boot chain. Mismatch on unseal treated as wrong PIN (oracle resistance). |
src/fhsm_token_tpm.c, src/fhsm_tpm.c |
| FMT_SMR_EXT.1 | FMT (Security Management) | Runtime mode switch between permissive (default) and strict via FHSM_MODE env or mode = conf directive; the former spellings legacy and fips still work. Sufficient for a single binary to satisfy both the FIPS 140-3 evaluator and operators who need interoperability with legacy systems. |
src/fhsm_mode.c, src/dispatch/fhsm_dispatch_legacy.c |
| External interface | TSF covered |
|---|---|
C_GenerateKeyPair |
FCS_CKM_EXT.4 (pair-wise check) + existing FCS_CKM.1 |
Any fhsm_rng_bytes consumer |
FCS_RBG_EXT.1 (RCT + APT + CRNGT) |
fhsm_token_init / fhsm_token_login |
FPT_TST_EXT.1 (optional TPM sealing) |
Every C_* mechanism call |
FMT_SMR_EXT.1 (mode-dependent dispatch) |