Skip to content
Chaoran Huang
Applied Cryptography

Applied Cryptography: From Definitions to Computing on Secrets

A six-part series. Start with what "secure" even means, then build a secure channel, authenticate the other end, prove statements without revealing them, compute jointly on private inputs, and finally compute on data no one can see.

This is a series outline, not a finished set of posts.

Each page contains a throughline, section bullets, examples, assumptions, and references. The finished prose has not been written.

There are two questions you can ask about any cipher. How does it work: how RSA multiplies, how AES moves bytes around, how Diffie-Hellman lands on the same number twice. And what are we actually claiming when we call it secure.

The second one is the whole subject.

Cryptography is not about secrets. It is about writing down exactly what an attacker must not be able to do, and then building something that provably stops them.

Every post here starts from one informal wish — nobody can read this, I know who I'm talking to, prove it without telling me, let's compute this together — and turns it into a definition precise enough to build against. The definitions are the point. The schemes fall out of them.

The series starts where every cryptography course starts, with hiding a message from someone who shouldn't read it. It ends with a server computing on your data while being mathematically unable to see it.

Before you start

You'll need modular arithmetic, a little group theory, and enough probability to read an expectation. You don't need any prior cryptography.

If generator of a cyclic group or Zn\mathbb{Z}_n^* makes you pause, Bits, Math, Hashes, Streams covers the modular arithmetic, group theory, and hashing this series leans on. Start there.

Read the posts in order. Each one uses the primitives the previous one built, and Part 1 is the one the other five depend on.

The arc

Three acts. The first builds the vocabulary, the second builds the thing you already use every day, and the third stops treating encrypted data as inert.

The arc of the series: three acts and six parts, rising from vocabulary through a secure channel to computing on encrypted data. Act I is Part 1, what security means. Act II is Part 2, a secure channel, and Part 3, knowing who is on it. Act III is Part 4, proofs that reveal nothing, Part 5, two parties computing together, and Part 6, one server computing alone.
The arc — three acts, six parts

Each arrow is the question the previous post leaves unanswered. Act III is where cryptography stops being about hiding things and starts being about computing on them.

The posts

Assumption tracker

Reference, not required reading

Nothing here is needed to start Part 1. Each post ends with its own copy of this table, grown by whatever that post introduced. This is the finished ledger, kept on the hub so you can see the whole foundation at once.

Exactly one construction in this series is unconditionally secure, the one-time pad, and Part 1 explains why that's what makes it useless. Everything else rests on a small pile of problems we believe are hard and can't prove are. The whole pile is here so you can see what the rest of it stands on.

AssumptionIntroduced inInformallyIf it falls
One-way functions existPart 1Easy to compute, hard to invertAll of modern cryptography
Pseudorandom permutations existPart 1AES is indistinguishable from a random permutationEvery block cipher, every mode
Discrete logarithmPart 2Given gag^a, recover aaDiffie-Hellman, Schnorr, ElGamal
Computational Diffie-HellmanPart 2Given ga,gbg^a, g^b, compute gabg^{ab}Key exchange
Decisional Diffie-HellmanPart 2Distinguish gabg^{ab} from randomElGamal, oblivious transfer, the voting system
Factoring / RSAPart 3Recover p,qp, q from N=pqN = pqRSA signatures, most of the web's PKI
Collision resistancePart 3Find xxx \neq x' with H(x)=H(x)H(x) = H(x')Hash-and-sign, certificates, Merkle trees
Random oracle modelPart 4Treat HH as a truly random functionFiat-Shamir, non-interactive proofs
Learning with errorsPart 6Solve noisy linear equationsLattice cryptography, FHE, post-quantum

Read the table as a timeline

Shor's algorithm breaks the discrete-log and factoring families used in Parts 2–4. It does not generically eliminate collision resistance or the random-oracle model. No polynomial-time quantum attack is known for the LWE families introduced in Part 6.

Go deeper