Repository navigation
Cryptography
Practical Cryptography Reference: Algorithms, Applied Use, and What to Avoid
Part of the ULTIMATE CYBERSECURITY MASTER GUIDE
Cryptography learning: Cryptopals and curated challenge pathways cover exercises; distinguish classical puzzles from production-grade encryption.
Historical crypto cross-reference: Cypherpunk Symposium collection review covers classical cipher learning and corrects outdated MD5/SHA-1 collision claims. Do not use legacy Python 2 examples for production cryptography.
Dedicated home for cryptography; which algorithms to use (and avoid), how to apply them correctly (TLS, password storage, key management), and where the field is heading (post-quantum).
Indexes the Cryptography section: fundamentals and a current-vs-deprecated summary (this file), an algorithm reference by primitive (algorithms.md), and applied cryptography - TLS, password storage, key management, and common mistakes (applied-crypto.md).
Give practitioners a single reference for making correct, current cryptographic choices and recognizing the recurring mistakes - grounded in NIST guidance.
- Choosing an algorithm, key size, or mode for a design or review
- Reviewing password storage, TLS config, or key management
- Understanding the post-quantum transition and crypto-agility
- Recognizing deprecated/broken primitives in existing code
- Overview
- The One Rule
- Current vs Deprecated (Quick Reference)
- Post-Quantum Cryptography
- Folder Contents
- Hardware keys and encrypted storage
- Important Notice
- Resources
Cryptography is referenced throughout this repository (TLS, hashing, password storage, VPNs, disk encryption) but had no dedicated home. This section consolidates it into fundamentals, an algorithm reference, and applied guidance - all aligned with current NIST/FIPS standards.
The three primitive families:
- Symmetric - one shared key for encryption (fast; AES, ChaCha20).
- Asymmetric - public/private key pairs for key exchange and signatures (RSA, ECC).
- Hashing - one-way integrity fingerprints (SHA-2, SHA-3); with KDFs for password storage (Argon2, bcrypt).
Warning
Don't roll your own crypto. Use well-reviewed, maintained libraries
(libsodium, the platform's TLS stack, cryptography for Python, Tink) and
vetted protocols. Almost every real-world cryptographic failure is a
misuse - wrong mode, reused nonce, hardcoded key, fast hash for passwords -
not a broken algorithm. Prefer high-level, misuse-resistant APIs.
| Use | โ Use | ๐ซ Avoid / Deprecated |
|---|---|---|
| Symmetric encryption | AES-256-GCM, ChaCha20-Poly1305 (AEAD) | DES, 3DES, RC4, AES-ECB |
| Hashing (integrity) | SHA-256/384/512, SHA-3 | MD5, SHA-1 |
| Password storage | Argon2id, scrypt, bcrypt, PBKDF2 | MD5/SHA "fast" hashes, unsalted hashes |
| Asymmetric / key exchange | RSA โฅ 3072, ECC (P-256, Curve25519), ECDH | RSA โค 1024, static DH, custom curves |
| Signatures | Ed25519, ECDSA (P-256), RSA-PSS | RSA โค 1024, DSA |
| Transport | TLS 1.3 (1.2 acceptable) | TLS 1.0/1.1, SSLv3 |
Deprecations follow NIST SP 800-131A Rev 2 - e.g. 3DES is disallowed and SHA-1 is being retired. Details in algorithms.md.
A sufficiently large quantum computer would break RSA and ECC. The threat is already relevant via "harvest now, decrypt later" - adversaries capturing encrypted data today to decrypt once quantum is viable.
NIST finalized the first PQC standards in August 2024:
- FIPS 203 - ML-KEM (based on CRYSTALS-Kyber) - key encapsulation.
- FIPS 204 - ML-DSA (based on CRYSTALS-Dilithium) - digital signatures.
- FIPS 205 - SLH-DSA (based on SPHINCS+) - stateless hash-based signatures.
What to do now: inventory where you use public-key crypto, build crypto-agility (the ability to swap algorithms), and plan migration - starting with long-lived secrets and hybrid (classical + PQC) key exchange.
Use the Hardware Security Keys and Passkeys guide for FIDO2, WebAuthn, synced vs device-bound passkeys, and authenticator certification levels (L1, L1+, L2, L3, L3+). Its SoloKeys guide covers the Solo 2 Secure/Hacker distinction and safe enrollment.
For storage confidentiality, start with Encrypted Drives and Removable Storage and use PhantomDrive only as an experimental hardware/firmware research example. Hardware login tokens are not encrypted USB drives; supported OpenPGP/PIV features are separate from FIDO authentication.
For OpenPGP key inspection, file encryption, detached signatures and verification commands, see the GnuPG CLI quick reference.
| File | Description | Status |
|---|---|---|
| algorithms.md | Algorithm reference by primitive - symmetric, asymmetric, hashing, KDFs, and PQC, with key sizes and deprecations | โ Complete |
| applied-crypto.md | Applied cryptography - TLS, password storage, key management, randomness, and common mistakes | โ Complete |
| encrypted-storage.md | Removable drive encryption, technology comparisons, recovery and safe client evidence handling | โ Reference |
| phantomdrive-guide.md | Experimental PhantomDrive CH569W hidden encrypted USB, testing and risk limits | โ Research guide |
| security-keys-passkeys.md | FIDO2, WebAuthn, passkey types, authenticator security certification levels and audits | โ Reference |
| solokeys-guide.md | Solo 2 Secure/Hacker, key enrollment, verification, firmware and OpenPGP/PIV boundaries | โ Device guide |
| Mary, Queen of Scots | Historical cipher case study, intercepted correspondence, and a worked teaching example | โ Complete |
| Deciphering workbook | Cipher comparisons, worked decryption, unknown-key methods, practice exercises, and a MIT Press reading connection | โ Complete |
| Classical/ | Classical ciphers, leetspeak, Unicode alphabets and homoglyphs, cryptanalysis (frequency analysis, Kasiski, IC), and a Python toolkit | โ Complete |
Important
Educational reference, not a substitute for a cryptographer. For high-assurance or novel designs, engage a specialist and prefer FIPS-validated modules where required. Standards and recommended key sizes change - verify against the current NIST publications before relying on specifics.
- NIST Post-Quantum Cryptography
- NIST SP 800-57 Part 1 (Key Management)
- NIST SP 800-131A Rev 2 (Transitions)
- OWASP Cryptographic Storage Cheat Sheet
- Cryptographic Right Answers (Latacora)
- libsodium documentation
Repository: ULTIMATE CYBERSECURITY MASTER GUIDE
Maintained by: Pacific Northwest Computers
- algorithms.md - algorithm reference by primitive
- applied-crypto.md - TLS, password storage, key management
- security-keys-passkeys.md - FIDO2 and passkey fundamentals, levels and deployment
- solokeys-guide.md - SoloKeys hardware walkthrough
- encrypted-storage.md - encrypted drive comparisons and safe handling
- phantomdrive-guide.md - experimental USB research
- Classical/ - classical ciphers, leetspeak, alternative alphabets, cryptanalysis
- ../OPSEC/press-freedom/README.md - journalist and source protection, retention, and device seizure planning
- ../Documentation/VPN.md - applied transport encryption
- ../GLOSSARY.md - acronyms (AEAD, KDF, PKIโฆ)
- ๐ง Applied Cryptography
- ๐งฎ Cryptographic Algorithm Reference
- Encrypted Drives, Removable Storage, and Key Protection
- Hardware Security Keys, FIDO2, Passkeys, and Certification Levels
- PhantomDrive: Experimental Hidden Encrypted USB Research Guide
- SoloKeys and Solo 2: FIDO2, Passkeys, and Multi-Protocol Keys
- ๐ค Alternative Alphabets
- ๐ ๏ธ Building Your Own Alphabet
- Cipher Types and a Practical Deciphering Workbook
- ๐ Classical Ciphers
- ๐๏ธ Classical Ciphers, Leetspeak & Alternative Alphabets
- ๐ Cryptanalysis
- ๐ข Leetspeak (1337)
- Mary, Queen of Scots: Ciphers, Codebreaking, and Compromised Letters
- ๐ก๏ธ Security Relevance
๐ Folder: Cryptography | โ๏ธ Suggest an edit | ๐บ๏ธ Browse by Topic
- ๐บ๏ธ Browse by Topic
- ๐ All Repository Files
- ๐งญ Learning Paths
- ๐ Master Guide
- ๐ค Glossary
- โ๏ธ Legal & Disclaimer
๐ Foundations & Learning
๐ก๏ธ Defense & Investigations
- Incident Response
- Open Source Intelligence (OSINT)
- Reverse Engineering
- Operations Security (OPSEC)
- Compliance
โ๏ธ Platforms & Infrastructure
๐ก Hardware, Wireless & Field Projects
- PNWC Cyberdeck
- Hardware Testing
- Hardware Hacking
- Software-Defined Radio
- Wardriving
- uConsole
- Space Security
๐งฐ Assessment & Field Reference
๐ฆ Downloads & Project Resources
๐๏ธ Additional Topics