Dev.to Security 🔐 Cybersecurity 👁 0 📖 2 min read

KPF-432 v1.2.0: Zero-Dependency PQC & Perimeter Scanner (ASN.1 DER X.509, OpenSSH, TLS, CBOM/SARIF) + 14.5 KB Rust WASM32 Verifier

Post-quantum migration is bigger than swapping one signature call in application code. Most real-world exposure sits in dependency manifests, X.509 certificates, OpenSSH keys, TLS configurations, and CI/CD scripts — and

Post-quantum migration is bigger than swapping one signature call in application code. Most real-world exposure sits in dependency manifests, X.509 certificates, OpenSSH keys, TLS configurations, and CI/CD scripts — and teams need a way to inventory and tighten all of it without breaking production overnight.

That is the goal of KPF-432 v1.2.0 (part of the OMNISAVALON engineering ecosystem): a zero-dependency Python 3.12 stdlib scanner & reference hybrid signer paired with a 14,467-byte #![no_std] / #![no_builtins] Rust WASM32 verifier.

What's New in v1.2.0

  1. Zero-Dependency Infrastructure Perimeter Scanner (no external OpenSSL / cryptography / ASN.1 packages):

    • Pure-Python ASN.1 DER X.509 Parser: Decodes PEM certificates directly from DER bytes, extracting exact RSA modulus bit lengths (RSA-1024 error, RSA-2048+ warning), broken sha1WithRSAEncryption, ECDSA / Ed25519, plus NIST ML-DSA-44/65/87 and SLH-DSA OIDs.
    • OpenSSH Wire Key Parser: Extracts exact RSA bit lengths from ssh-rsa, flags deprecated ssh-dss, and inventories ecdsa-* / ssh-ed25519 across authorized_keys, known_hosts, and .pub.
    • TLS / SSH / Container / Kubernetes Hardening: Flags TLSv1.0/TLSv1.1, TLSv1.2 without TLSv1.3, weak ciphers, missing hybrid PQC KEM groups (X25519MLKEM768, mlkem768x25519-sha256), cert-manager classical keys, openssl genrsa in Dockerfile, and committed PEM private-key blocks.
  2. Tiered Crypto-Agility Gates & Progressive Ratchet (--baseline):

    • Start cleanly in --mode observe (--write-baseline kpf432-baseline.json).
    • Block only new cryptographic or perimeter regressions in PRs with --mode hybrid --baseline kpf432-baseline.json (exit code 5, official SARIF 2.1.0 baselineState: new | unchanged).
    • Lock in full multi-basis readiness (structured lattice + hash/code fallback, zero classical perimeter blockers) with --mode enforce.
    • CycloneDX 1.6 CBOM exports both code algorithms and infra certificate / protocol assets.
  3. Dual-Orthogonal Signing & Deterministic Unicode Hygiene (--fail-on-hygiene):

    • Strict AND verification requiring both Module-LWE / Module-SIS (k=4, l=4 over Z_8380417[X]/(X^256+1)) and stateful WOTS+ (w=16, L=67) + Merkle Tree (H=6) over FIPS 202 SHAKE256.
    • Catches CVE-2021-42574 BiDi overrides, zero-width invisibles, and stray CJK UI tokens in code and manifests.

Real Local Benchmarks (Measured After Warmup)

Operation / Artifact Environment Measured
kpf432_std_pqc.wasm binary size #![no_std] Rust WASM32 (.bss arenas) 14,467 B
SHAKE256 (32 B digest) Node.js WASM32 0.004 ms (4 us)
Full WASM keygen + sign + verify (both roots) Node.js WASM32 52.60 ms
Dual-root sign (Module-LWE + 64-leaf Merkle) Python 3.12 stdlib CLI 78.24 ms

Quick Start (Zero pip Runtime Dependencies)

# Install directly from the v1.2.0 tag or run single-file CLI
pip install git+https://github.com/OMNISAVALON/[email protected]
kpf432-shield --self-test

# Audit repository + TLS/SSH/X.509 perimeter in progressive ratchet mode
python3 kpf432_shield.py --audit ./src --mode observe --write-baseline kpf432-baseline.json
python3 kpf432_shield.py --audit ./src \
  --mode hybrid \
  --baseline kpf432-baseline.json \
  --out cirg-report.json \
  --cbom cirg-cbom.json \
  --sarif cirg-audit.sarif \
  --badge cirg-badge.svg \
  --cert-md cirg-certificate.md \
  --fail-on-hygiene \
  --min-score 70

Security & Scope Notice: The CI/CD scanner (--audit, --cbom, --sarif, --fail-on-hygiene) is production-ready for repository posture and hygiene gating. The bundled dual-root signer is a compact reference/research implementation over SHAKE256 and is not wire-compatible with NIST FIPS 204 (ML-DSA) or FIPS 205 (SLH-DSA).

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.