FIPS crypto-boundary sidecar

Module sketch, not a certificate

doc
RB-FIPS-SIDECAR-001
rev
0.1.0 / 2026-08-22
code
robobus/crypto/sidecar.py
status
architecture + reference backend; not CMVP-validated

1. Honest claim

robobus implements approved algorithms (FIPS 197/180-4/202/203/204/205, SP 800-38D/56C) and a FIPS-mode architecture: algorithm policy, power-on self-tests, and a separate-process crypto boundary (this sidecar).

This is not a CMVP-validated cryptographic module. Only an accredited CST laboratory plus NIST/CSE can issue that certificate. Where a standard requires a validated module (not just an approved algorithm), bind the sidecar to a validated backend (OpenSSL 3 FIPS provider, AWS-LC-FIPS, or a PKCS#11 HSM). "openssl backend" is not that certificate.

Lab/hobbyist remains the default clone: doctor does not fail-close if OpenSSL is missing. Production ship-sets (csfc, crypto-toe, space) do.

2. Cryptographic boundary

Proposed module name: robobus FIPS Crypto Sidecar. Type: software module, Level 1 target. Embodiment: the sidecar process.

  application (OUTSIDE)     robobus bus / ROS / LSL / adapters
           |  AF_UNIX  length-prefixed seal/open
           v
  +---- sidecar process (MODULE BOUNDARY) -------------------+
  |  mlockall  SecretBuffer key (wiped on stop/SIGTERM)      |
  |  AEAD AES-256-GCM  -->  validated backend you bind       |
  |  socket 0600   roles: Crypto Officer / User              |
  +----------------------------------------------------------+

The application never holds the AEAD key; only ciphertext crosses the boundary. Handshake KEM/sign ops are reserved for a later protocol extension (ops 1=seal, 2=open today).

roleservices
Crypto Officerconfigure backend, load/rotate key, start/stop, self-tests
Userseal (encrypt+auth), open (decrypt+verify)

Level 1 requires no operator authentication.

3. Socket protocol

AF_UNIX stream. Path max ~100 bytes (use /tmp/robobus-fips.sock). Default: $ROBOBUS_FIPS_SIDECAR or <ring-dir>/fips.sock.

request : uint32be len | op(1) | payload     op 1=seal  2=open
response: uint32be len | status(1) | body     0=ok  1=err

SidecarClient.seal/open matches primitives.Aead, so a Session routes through the sidecar when the env var is set. ChaCha20-Poly1305 is a CLI choice for lab only; FIPS policy must disable it.

4. How to run

# terminal 1 - boundary process
robobus crypto sidecar --keyfile ~/.robobus/fips.key --alg aes256-gcm \
    --socket /tmp/robobus-fips.sock

# terminal 2 - apps delegate AEAD
export ROBOBUS_FIPS_SIDECAR=/tmp/robobus-fips.sock
robobus doctor --profile csfc
robobus ros2 --from-bus /cmd:cmd --security cnsa20 --keyfile ~/.robobus/fips.key

robobus crypto compliance --standard fips   --suite nist5
robobus crypto compliance --standard cnsa20 --suite cnsa20
robobus crypto compliance --standard csfc   --suite csfc

Key file mode 0600; 256-bit key from SP 800-90A DRBG (secrets.token_bytes) if created. Socket chmod 0600. Keys live in module process memory and are zeroized on exit.

5. Approved algorithms (CAVP from the backend)

functionalgorithmstandard
AEAD (sidecar today)AES-256-GCMFIPS 197 / SP 800-38D
KEMML-KEM-512/768/1024FIPS 203
SignatureML-DSA-44/65/87FIPS 204
SignatureSLH-DSAFIPS 205
HashSHA-256/384/512FIPS 180-4
Hash/XOFSHA-3 / SHAKEFIPS 202
KDFHKDFSP 800-56C
DRBGOS CSPRNGSP 800-90A

CNSA 2.0 suite cnsa20 constrains to ML-KEM-1024 + ML-DSA-87 + AES-256 + SHA-384. SHA-256 on artifacts is interop, not CNSA 2.0. Non-approved in FIPS mode: ChaCha20-Poly1305, X25519/X448 (hybrid suites are belt-and-suspenders, not FIPS).

6. Self-tests (implemented)

robobus.crypto.compliance.run_self_tests() at start-up / on demand:

Still needed for a real CMVP package: software-integrity test over the module binary at load; deterministic ML-KEM/ML-DSA KATs with FIPS seeds from the backend harness.

7. CMVP checklist (open)

Ship-set crypto-toe is the CMVP-shaped TOE: librobobus + OpenSSL only; protocol codecs out of SBOM. CSfC wants two validated layers: suite csfc plus a second validated transport (MACsec/IPsec) beneath.

Normative notes: docs/COMPLIANCE.md, docs/CMVP-READINESS.md.