Cryptography is the mathematics and engineering of secrecy, integrity and proof: encrypting data, checking that it was not changed, and showing who sent it. It underpins HTTPS, messaging, passwords and software updates. Its first rule is to use well-reviewed building blocks and never to invent your own.
Key concepts
- Symmetric encryption: one shared key encrypts and decrypts; fast, used for bulk data, with authenticated modes such as AES-GCM or ChaCha20-Poly1305.
- Public-key cryptography: a key pair lets strangers agree on keys and verify signatures without a prior secret.
- Hashes and MACs: a hash fingerprints data; a MAC adds a key so only key holders can produce it.
- Randomness: keys, nonces and salts must come from a cryptographically secure generator.
- Protocols: primitives are safe only when composed correctly, as in TLS; most real failures are in the composition and in key handling.
Vocabulary
- Nonce: a number used once per key; reusing it can be disastrous.
- Salt: random data mixed into a password hash so equal passwords differ.
- KDF: key derivation function, which turns a password or secret into keys.
- Forward secrecy: past sessions stay safe even if a long-term key leaks later.
What to study, in order
- Modular arithmetic and basic probability, enough to follow why the schemes work.
- Encrypt and decrypt a file with a vetted library, then see what goes wrong when you misuse a mode.
- Hash a password properly with a slow, salted KDF, and explain why each part is there.
- Walk through a TLS handshake step by step in a packet capture.
- Read the specification of one modern primitive and implement it only as an exercise, never for use.
Related tags
#cryptanalysis #information-theory #secure-coding #privacy #protocols