Skip to the content ForoHackers
Log inJoin

Cryptography: start here

Cryptography
#3269 · · Quote · Report

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

  1. Modular arithmetic and basic probability, enough to follow why the schemes work.
  2. Encrypt and decrypt a file with a vetted library, then see what goes wrong when you misuse a mode.
  3. Hash a password properly with a slow, salted KDF, and explain why each part is there.
  4. Walk through a TLS handshake step by step in a packet capture.
  5. 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

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply