Skip to main content

07 - References and Security Standards

This chapter provides a curated catalog of authoritative standards, RFC specifications, real-world CVE failure modes, production-grade cryptographic libraries, and automated security testing tooling.


📜 Key Standards & RFC Specifications

Standard / RFCTitle / SubjectFocus Area
NIST SP 800-57 Part 1Recommendation for Key ManagementKey lifecycles, key storage, and key transition timelines
NIST SP 800-63BDigital Identity Guidelines: AuthenticationPassword guidelines, KDF iteration thresholds
FIPS 140-3Security Requirements for Cryptographic ModulesHardware (HSM) and software cryptographic module validation
FIPS 197Advanced Encryption Standard (AES)Specification of the AES block cipher
FIPS 203 / 204 / 205Post-Quantum Cryptography StandardsOfficial specifications for ML-KEM, ML-DSA, and SLH-DSA
RFC 5869HMAC-based Extract-and-Expand Key Derivation (HKDF)Standard protocol for session key derivation
RFC 8032Edwards-Curve Digital Signature Algorithm (EdDSA)Specification of Ed25519 and Ed448 signature schemes
RFC 8439ChaCha20 and Poly1305 for IETF ProtocolsSpecification of ChaCha20-Poly1305 AEAD
RFC 8446The Transport Layer Security (TLS) Protocol Version 1.3Modern secure network transport specification
OWASP Top 10 A02Cryptographic FailuresPrimary web application cryptographic risk guidelines

⚠️ CVE Knowledge Base: Notable Cryptographic Failures

Analyzing historical vulnerabilities highlights why protocol design and low-level code implementation require extreme caution:

CVE / EventCommon NameVulnerability TypeRoot Cause Analysis
CVE-2014-0160HeartbleedMemory DisclosureMissing bounds check in OpenSSL TLS Heartbeat extension allowed remote attackers to read 64KB of server memory (leaking private keys and passwords).
CVE-2014-3566POODLEPadding Oracle AttackSSL 3.0 fallback permitted adversaries to exploit CBC mode padding validation errors to decrypt HTTPS session cookies byte-by-byte.
CVE-2020-0601CurveBallCert Validation BypassWindows Crypt32.dll failed to verify generator point parameters in ECC certificates, allowing attackers to forge arbitrary TLS certificate chains.
CVE-2022-0778OpenSSL DoSInfinite LoopParsing invalid explicit prime curve parameters in BN_mod_sqrt() triggered an infinite loop, allowing remote Denial of Service.
2010 PS3 LeakSony PS3 ExploitNonce ReuseECDSA signature implementation reused a fixed nonce k, allowing full algebraic derivation of Sony's master private key.

🛠️ Production Cryptographic Libraries Matrix

Language / EcosystemStandard Library / Approved PackagesFeatures & Recommendations
Pythoncryptography (PyCA)High-level hazmat primitives, AESGCM, Ed25519, HKDF. Avoid PyCrypto (abandoned).
Node.jscrypto (Built-in) / sodium-nativeNative OpenSSL bindings, Web Crypto API support, Argon2 module.
Gocrypto/* (crypto/cipher, crypto/ed25519)Robust standard library, constant-time assembly routines, golang.org/x/crypto.
JavaJCA (javax.crypto) / BouncyCastleNative Ed25519 (Java 15+), BouncyCastle for FIPS 140-3 compliance & PQC support.
Rustring / rustls / subtleMemory-safe cryptography, constant-time operations, panic-free parsing.
C / C++libsodium / OpenSSL 3.xHigh-level misuse-resistant libsodium (crypto_secretbox). Avoid raw cipher implementations.

🔍 Automated Security Testing & SAST Tools

Integrating static analysis and secret scanning into CI/CD pipelines catches cryptographic flaws prior to production deployment:

1. Static Application Security Testing (SAST)

  • Semgrep Cryptography Ruleset: Scans codebases for ECB mode usage, weak PRNGs (random.random()), broken hashes (MD5, SHA1), and hardcoded secrets.
    semgrep --config "p/security-audit" --config "p/ci"
  • Bandit (Python): Identifies insecure cryptographic imports (import md5, random) and low-bit RSA key generation.
    bandit -r ./src -sk B303,B304,B311

2. Secret & Key Scanning

  • TruffleHog: Deep history scanner detecting high-entropy private keys, API tokens, and certificate keys in Git repositories.
    trufflehog git file://. --only-verified
  • Gitleaks: Lightweight CI tool preventing key commits via pre-commit hooks.

3. TLS Transport Scanners

  • testssl.sh: Command-line tool testing TLS endpoints for deprecated protocols (SSLv3, TLS 1.0, TLS 1.1), weak ciphers, and PFS support.
    ./testssl.sh --severity HIGH https://api.yourdomain.com
  • SSL Labs Server Test: Automated evaluation of web gateway TLS configuration posture.
Share this guide