FIPS 140-3 mode Algorithm restriction, KAT self-test on startup, host posture detection.
What it does
Enabling FIPS mode causes digger to:
- Run Known-Answer Tests over the FIPS-approved algorithm set
(SHA-256, AES-256-GCM, ML-DSA-65, ML-KEM-768). Abort if any KAT fails
unless
--force. - Gate every PQC operation through
assert_approved_sig()/assert_approved_kem(). Non-finalized algorithms raiseFIPSViolation. - Record the FIPS mode marker in the chain-of-custody record and the evidence log.
Source: digger/fips/mode.py.
Enabling
Three equivalent paths:
# CLI flag (one-shot)
digger --fips-mode investigate --case-dir ./case-1
# Environment variable (persistent for a shell)
export DIGGER_FIPS_MODE=1
digger investigate --case-dir ./case-1
# Programmatic
digger fips enable
FIPS-approved algorithm set
Symmetric (FIPS 197 + FIPS 800-38)
AES-{128,192,256}-{GCM, CCM, CTR, CBC, KW, XTS(128/256)}
Hashes (FIPS 180-4 + FIPS 202)
SHA-{1, 224, 256, 384, 512, 512/224, 512/256}
SHA3-{224, 256, 384, 512}
SHAKE128, SHAKE256
SHA-1 is permitted for non-signature use only.
PQC signatures (FIPS 203/204/205/206)
ML-DSA-{44, 65, 87}
SLH-DSA-SHA2-{128,192,256}{s,f} SLH-DSA-SHAKE-{128,192,256}{s,f}
Falcon-{512, 1024} Falcon-padded-{512, 1024}
PQC KEMs (FIPS 203)
ML-KEM-{512, 768, 1024}
Status
$ digger fips status
{
"in_fips_mode_process": false,
"self_test": {
"sha256_kat": true,
"sha3_256_kat": true,
"aes_256_gcm": true,
"ml_dsa_65": true,
"ml_kem_768": true
},
"os_fips_marker": null
}
- in_fips_mode_process
- Whether this Python process is currently in FIPS mode.
- self_test
- KAT results for each FIPS algorithm digger uses.
true= pass;false= KAT failed;"skipped: …"= algorithm unavailable. - os_fips_marker
- Whether the OS reports FIPS mode (
kernel.fips_enabledon Linux, registry value on Windows).nullon macOS — Apple's corecrypto module is FIPS-validated by default with no boolean to toggle.
What digger checks vs. doesn't
| Check | digger does it |
|---|---|
| Refuse non-approved PQC sig algorithms | Yes |
| Refuse non-approved PQC KEM algorithms | Yes |
| Refuse non-approved symmetric ciphers when called via the helper | Yes |
| Run KAT at startup | Yes |
| Validate liboqs is a CMVP-listed build | No — outside scope |
| Validate OpenSSL FIPS provider is loaded | No — outside scope |
| Enable OS-level FIPS mode | No — OS responsibility |
digger is not a validated cryptographic module. It enforces algorithm policy at the application layer and runs sanity-check KATs. True FIPS 140-3 compliance is a property of the OS, the OpenSSL FIPS provider, and the liboqs build — not of this user-mode tool.
Verifying behavior
# Approved algorithm — works
digger --fips-mode pqc sign --case-dir x --algorithm ML-DSA-65 --key /tmp/k
# Non-approved algorithm — refused with clear remediation
digger --fips-mode pqc sign --case-dir x --algorithm CROSS-rsdp-128-balanced --key /tmp/k
# → FIPSViolation: signature algorithm 'CROSS-rsdp-128-balanced' is not FIPS-approved.
# In FIPS mode you must use one of [..ML-DSA-44, ML-DSA-65, ...].
Auditing what was used
FIPS-mode entry is recorded in:
- The evidence DB
logtable ([FIPS] mode enabled (self-test passed=True)) - The chain-of-custody record's events (via the case lifecycle hook)
- Case metadata (
fips_modekey — settable via the runner)