1. Symmetric Cryptography
AES (Advanced Encryption Standard): Rijndael block cipher, 128-bit blocks, 128/192/256-bit keys. SubBytes (S-box), ShiftRows, MixColumns, AddRoundKey — 10/12/14 rounds. Modes: CBC (chaining, IV required), CTR (counter, parallelizable), GCM (authenticated encryption, AEAD). ChaCha20-Poly1305: stream cipher + MAC, used in TLS 1.3, faster on platforms without AES-NI. Security levels: AES-128 ≈ 128-bit security, AES-256 ≈ 256-bit. Side-channel attacks: timing, power analysis, cache attacks — mitigated by constant-time implementations and AES-NI hardware instructions. Key management: HKDF for derivation, secure random generation (CSPRNG), key rotation policies.
2. Asymmetric Cryptography
RSA: factoring problem, n = p·q (large primes). Encryption: c = m^e mod n, Decryption: m = c^d mod n where ed ≡ 1 (mod φ(n)). Key sizes: 2048-bit minimum (NIST), 4096-bit recommended. OAEP padding (not PKCS#1 v1.5 due to Bleichenbacher attack). Elliptic Curve Cryptography (ECC): points on y² = x³ + ax + b over finite fields. ECDLP (Elliptic Curve Discrete Logarithm Problem). Curve25519: x² = x³ + 486662x² + x over F_p, p = 2²⁵⁵-19. ECDSA for signatures, ECDH for key exchange. 256-bit ECC ≈ 3072-bit RSA security. EdDSA (Ed25519): deterministic signatures, faster verification. X25519: ECDH key agreement used in TLS 1.3, Signal Protocol.
3. Hash Functions & MACs
SHA-256: Merkle-Damgård construction, 256-bit output, 64 rounds. SHA-3 (Keccak): sponge construction, r=1088/c=512 for SHA3-256. BLAKE2/BLAKE3: faster than SHA-3, widely used in practice. Properties: preimage resistance (given h, find m), second preimage resistance, collision resistance. Birthday attack: O(2^{n/2}) for n-bit hash. Password hashing: bcrypt (cost factor), scrypt (memory-hard), Argon2id (winner of PHC, memory + time hard). HMAC: keyed hash for message authentication, HMAC-SHA256. HKDF: extract-and-expand key derivation. Merkle trees: hash chains for data integrity (blockchain, certificate transparency).
4. TLS & Protocol Security
TLS 1.3 (RFC 8446): 1-RTT handshake, 0-RTT resumption. Cipher suites: TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256. Key exchange: X25519 or P-256 ECDHE only (static RSA/DH removed). Forward secrecy: ephemeral key exchange ensures past sessions remain secure if long-term key compromised. Certificate transparency: public logs of all certificates. OCSP stapling: efficient revocation checking. HSTS: forces HTTPS, preload list. Certificate pinning: deprecated due to operational risk. PKI: X.509 certificates, CA hierarchy, Let's Encrypt (free automated certificates, 300M+ active). ACME protocol for automated certificate management.
5. Post-Quantum Cryptography
Quantum threat: Shor's algorithm factors integers in polynomial time → breaks RSA, ECC. Grover's algorithm: O(√N) search → doubles symmetric key length requirement (AES-256 remains safe). NIST PQC standardization (2024): ML-KEM (Kyber, lattice-based key encapsulation, based on Module-LWE), ML-DSA (Dilithium, lattice-based signatures), SLH-DSA (SPHINCS+, hash-based stateless signatures). FN-DSA (Falcon, lattice-based, compact signatures). Hybrid approaches: combine classical + PQC (e.g., X25519 + ML-KEM-768 in Chrome/Firefox). Migration timeline: NIST recommends transition by 2035. Harvest-now-decrypt-later: adversaries may store encrypted traffic for future quantum decryption — urgency for PQC adoption in sensitive communications.
Try it live
Everything above runs in your browser — open Public-Key Exchange Network and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Public-Key Exchange Network simulation