FIPS 140-3 mode Algorithm restriction, KAT self-test on startup, host posture detection.

What it does

Enabling FIPS mode causes digger to:

  1. 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.
  2. Gate every PQC operation through assert_approved_sig() / assert_approved_kem(). Non-finalized algorithms raise FIPSViolation.
  3. 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_enabled on Linux, registry value on Windows). null on macOS — Apple's corecrypto module is FIPS-validated by default with no boolean to toggle.

What digger checks vs. doesn't

Checkdigger does it
Refuse non-approved PQC sig algorithmsYes
Refuse non-approved PQC KEM algorithmsYes
Refuse non-approved symmetric ciphers when called via the helperYes
Run KAT at startupYes
Validate liboqs is a CMVP-listed buildNo — outside scope
Validate OpenSSL FIPS provider is loadedNo — outside scope
Enable OS-level FIPS modeNo — 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: