Use this when sensitive data lacks proper encryption (OWASP A02).
Cryptographic Failures
1. Cryptographic failures: weak/no encryption, poor key management, weak hashing.
2. Classify data.
3. Encrypt in transit and at rest.
4. Modern algorithms.
5. Don't roll your own.
sensitive data → strong crypto → protected
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Quick checks Verify boundary
nmap --script ssl-enum-ciphers -p 443 host— no TLS 1.0/1.1, no CBC-only or RC4 suites.- Passwords stored with Argon2id/bcrypt/scrypt, not MD5/SHA-1/SHA-256.
- No secrets or keys in source code (
gitleaks detect). - Sensitive fields encrypted at rest with keys in a KMS.
- Random values from a CSPRNG (
secrets,random_bytes), notrand().
Step 2 Common mistakes Narrow the fault
- Weak or custom crypto; secrets in code.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Use TLS everywhere.
- Use modern algorithms and modes.
- Hash passwords with Argon2/bcrypt.
testssl.sh <site>— TLS- Data at rest encryption review — sensitive data
- Password hashing algorithm — Argon2id/bcrypt
ReferenceWhy it matters1 section · depth on demand
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Cryptographic failures cover sensitive data exposed due to missing or weak cryptography: data sent without TLS, passwords stored with fast hashes, outdated algorithms, hard-coded keys or disabled certificate validation.
Common failures and fixes:
| Failure | Fix |
|---|---|
| Plain HTTP or internal unencrypted APIs | TLS everywhere, HSTS |
| Passwords hashed with MD5/SHA-1 | Argon2id, scrypt, bcrypt |
| Hard-coded keys in code | Key management service, secret store |
| ECB mode, home-made crypto | Vetted libraries with AEAD |
| Certificate validation disabled | Proper trust stores |
| Sensitive data stored unnecessarily | Data minimisation |
Start by classifying data and identifying where sensitive data is stored and transmitted, then apply protection accordingly.
Examples
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in OWASP → Cryptographic Failures. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://owasp.org/www-project-application-security-verification-standard/ · confidence 94%