Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

πŸ” kms β€” Cryptographic Posture Report

ℹ️ Auto-generated report β€” do not edit by hand

Last commit: 70512c0b

To regenerate:

bash .mise/scripts/audit/crypto_sensor.sh --repo-root .

🎯 Security Posture Scorecard

βœ… None
Unmitigated CRITICAL
21 total CRITICAL
1
Unmitigated HIGH
41 total HIGH
59%
PQC Readiness
asymmetric ops with PQC alternative
49%
FIPS Coverage
FIPS 140-3 approved algorithm refs
204
Zeroize References
key material cleared on drop

πŸ“Š Discovery Overview

SeverityCountContext
πŸ”΄ CRITICAL21Broken algorithms (DESΒ·MD5Β·RC4) β€” all KMIP spec enums, blocked at runtime
🟠 HIGH41Weak key sizes (RSA-1024·EC-P192) and deprecated SHA-1
🟑 MEDIUM0Medium-severity issues
πŸ”΅ LOW / βšͺ INFO2449Informational algorithm usage references
pie title Sensor findings by severity
"CRITICAL" : 21
"HIGH" : 41
"INFO" : 2449

Reference counts = source lines matching each algorithm pattern.

AlgorithmCategoryFIPS 140-3PQCRefs
PKCS#11/HSMHSM interfaceβŒβ€”559
RSAAsymmetricβœ…βŒ248
X.509 certificatePKI / TLSβœ…β€”233
ML-KEM (FIPS 203)Post-Quantum KEMβœ…βœ…225
SLH-DSA (FIPS 205)Post-Quantum Signatureβœ…β€”223
Covercrypt (ABE)Attribute-Based EncryptionβŒβ€”197
ML-DSA (FIPS 204)Post-Quantum Signatureβœ…β€”141
EdDSA (Ed25519/Ed448)Asymmetricβœ…βŒ141
AES-GCM/GCM-SIVSymmetricβœ…β€”66
Argon2KDFβŒβ€”26
Hybrid KEMClassical + PQCβœ…βœ…24
EC-P192Asymmetric β€” WEAK KEY❌❌20
EC (ECDSA/ECDH)Asymmetricβœ…βŒ15
DES/3DESSymmetric β€” DEPRECATEDβŒβ€”15
SHA-1Hash β€” deprecated for signingβŒβ€”13
ChaCha20-Poly1305Symmetric (non-FIPS)βŒβ€”8
RSA-1024Asymmetric β€” WEAK KEY❌❌8
RC4Symmetric β€” BROKENβŒβ€”5
SHA-2/SHA-3Hashβœ…β€”1
MD5Hash β€” BROKENβŒβ€”1

Deprecated entries in kmip_1_4/ are KMIP spec enum definitions β€” not active operations. Blocked at runtime by algorithm_policy.rs.

pie title Algorithm usage by category
"PKCS#11 / HSM" : 559
"Asymmetric (RSA)" : 248
"TLS / X.509" : 233
"PQC (ML-KEM)" : 225
"PQC (SLH-DSA)" : 223
"ABE (Covercrypt)" : 197
"PQC (ML-DSA)" : 141
"Asymmetric (EdDSA)" : 141
"Symmetric (AES)" : 66
"Asymmetric β€” weak" : 28
"KDF (Argon2)" : 26
"PQC (Hybrid KEM)" : 24
"Asymmetric (EC)" : 15
"Symmetric (deprecated)" : 15
"Hash (deprecated)" : 13
"Symmetric (ChaCha20)" : 8
"Symmetric (RC4)" : 5
"Hash (SHA-2/3)" : 1
"Hash (MD5)" : 1
DependencyDescriptionStandardCargo.toml refs
openssl (FIPS provider)openssl (FIPS provider)85
opensslOpenSSL 3.6 (FIPS provider)FIPS 140-334
cosmian_crypto_corecosmian_crypto_core5
x509-parserx509-parserRFC 52804
p256p256 (NIST P-256)FIPS 186-53
rustlsrustls (TLS)RFC 84462
aes-gcmRustCrypto/aes-gcm-sivRFC 84521
argon2RustCrypto/argon2RFC 91061
cosmian_cover_cryptcosmian_cover_crypt1
k256k256 (secp256k1)1
ringring (BoringSSL subset)1
flowchart TD
    KMS["kms"]
    KMS --> OPENSSL__FIPS_PROVIDER_["openssl (FIPS provider)"]
    KMS --> OPENSSL["OpenSSL (FIPS provider)"]
    KMS --> COSMIAN_CRYPTO_CORE["cosmian_crypto_core (KEM combiner)"]
    KMS --> X509_PARSER["x509-parser"]
    KMS --> P256["p256 NIST P-256"]
    KMS --> RUSTLS["rustls (TLS)"]
    KMS --> AES_GCM["RustCrypto/aes-gcm"]
    KMS --> ARGON2["RustCrypto/argon2"]
    KMS --> COSMIAN_COVER_CRYPT["cosmian_cover_crypt (ABE)"]
    KMS --> K256["k256 secp256k1"]
    KMS --> RING["ring (BoringSSL subset)"]

⚑ Priority Remediation

62 CRITICAL + HIGH total | 1 actionable | 61 suppressed by KMIP policy

#SeverityAlgorithmFileDetailRemediation
1🟠 HIGHEC-P192ttlv/enum_lookup.rs:200P-192 is below the 112-bit security level. Use P-256 or higher.Upgrade to P-256 or higher curve.

πŸš€ Post-Quantum Readiness

Score: 59% β€” 59% of asymmetric operations have a PQC alternative.

pie title PQC vs Classical asymmetric coverage
    "PQC-ready (ML-KEM, ML-DSA, SLH-DSA, Hybrid)" : 59
    "Classical-only (RSA, EC, EdDSA)" : 41
StandardAlgorithmStatus
FIPS 203ML-KEM (CRYSTALS-Kyber)βœ…
FIPS 204ML-DSA (CRYSTALS-Dilithium)βœ…
FIPS 205SLH-DSA (SPHINCS+)βœ…
CNSA 2.0Hybrid KEM (classical + PQC)βœ…
RFC 8032EdDSA (Ed25519 / Ed448)βœ…
FIPS 186-5ECDH / ECDSA (P-256+)βœ…

All four NIST PQC standards implemented

FIPS 203, 204, 205 and CNSA 2.0 Hybrid KEM are already deployed. The European Commission end-of-2026 inventory mandate is addressed.


πŸ”’ FIPS 140-3 Compliance

Score: 49% of detected algorithm references are FIPS 140-3 approved.

The remaining 51% are:

CategoryReason
PKCS#11 / HSMFIPS status depends on the certified HSM hardware
Covercrypt ABEAttribute-based encryption β€” FIPS not applicable
ChaCha20-Poly1305Non-FIPS builds only (--features non-fips)
KMIP 1.4 legacy enumsType definitions β€” not active crypto operations

FIPS build mode

cargo build (without --features non-fips) exercises only FIPS 140-3 approved algorithms at runtime.


πŸ›‘οΈ Memory Safety β€” Zeroize Discipline

The sensor found 204 references to Zeroizing<T> / ZeroizeOnDrop across the codebase β€” automatic key-material zeroing on drop (CWE-316 mitigation).

Best practice implemented

All derived key material (HKDF, PBKDF2) and private key bytes are wrapped in Zeroizing<Vec<u8>> β€” secrets are scrubbed from memory when their scope ends.


πŸ” How the Sensor Works

flowchart LR
    A["Discover\nScan Rust sources\n& Cargo.toml"] --> B["Analyze\nApply risk rules\nMatch KMIP context"]
    B --> C["Prioritize\nSeverity scoring\nMitigation tagging"]
    C --> D["Report\nCBOM & MkDocs\nJSON + Markdown"]
    D --> E["Monitor\nPre-commit hook\nCI integration"]
    style A fill:#f0f9ff,stroke:#0ea5e9
    style B fill:#fefce8,stroke:#eab308
    style C fill:#fff7ed,stroke:#f97316
    style D fill:#f0fdf4,stroke:#22c55e
    style E fill:#faf5ff,stroke:#a855f7
LayerToolWhat it discovers
Source codescan_source.pyAlgorithm usage, deprecated primitives, weak keys, hardcoded material, PQC/zeroize
Dependency treecdxgen (OWASP CycloneDX)Cryptographic library versions from Cargo.lock
CVE feedcargo audit (RustSec)Known vulnerabilities in crypto dependencies
Live TLStestssl.sh (optional)Cipher suites, certificate chain, TLS version

The sensor outputs a Cryptographic Bill of Materials (CBOM) in CycloneDX 1.6 format (see cbom/cbom.cdx.json).


▢️ How to Run

Full scan β€” source + CVE + CBOM (also updates this page)

bash .mise/scripts/audit/crypto_sensor.sh --repo-root .
# With live TLS scan:
bash .mise/scripts/audit/crypto_sensor.sh \\
    --repo-root . --server-url https://localhost:9998 --update-cbom

Source scanner only (fast, no network)

python3 .mise/scripts/audit/scan_source.py \\
    --repo-root . --output /tmp/findings.json

Risk scorer + page regeneration

python3 .mise/scripts/audit/risk_score.py \\
    --input /tmp/findings.json \\
    --output-json /tmp/risk_report.json \\
    --docs-output documentation/docs/certifications_and_compliance/audit/crypto_inventory.md

Output files are written to cbom/sensor/ (stable path β€” overwritten on each run):

FileContent
findings.jsonRaw per-line source scanner findings
risk_report.jsonRisk-scored findings + CVE data
cargo_audit.jsonCVE advisory data
dep_cbom.jsonDependency-level CBOM (cdxgen)
tls_report.txtTLS scan output (if --server-url was given)