Skip to content

Cryptography

github-actions[bot] edited this page Nov 15, 2026 · 1 revision

Practical Cryptography Reference: Algorithms, Applied Use, and What to Avoid

Part of the ULTIMATE CYBERSECURITY MASTER GUIDE

Focus Standards Type


Cryptography learning: Cryptopals and curated challenge pathways cover exercises; distinguish classical puzzles from production-grade encryption.

๐ŸŽฏ Purpose

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).

โš™๏ธ Function

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).

๐Ÿ† Goal

Give practitioners a single reference for making correct, current cryptographic choices and recognizing the recurring mistakes - grounded in NIST guidance.

๐Ÿ“‹ When To Use

  • 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

๐Ÿ“‹ Table Of Contents


๐ŸŽฏ Overview

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).

๐Ÿ›‘ The One Rule

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.


๐Ÿ“Š Current Vs Deprecated (Quick Reference)

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.


๐Ÿ”ฎ Post-quantum Cryptography

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.


๐Ÿ”‘ Hardware Keys & Encrypted Storage

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.


๐Ÿ“‚ Folder Contents

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 Notice

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.


๐Ÿ“š Resources



Related Files


โฌ…๏ธ Back to Master Index |


๐Ÿ“‘ All Pages in Cryptography

Guides & Reference

Classical


๐Ÿ“‚ Folder: Cryptography | โœ๏ธ Suggest an edit | ๐Ÿ—บ๏ธ Browse by Topic

Clone this wiki locally