Trapdoor functions — the core idea
A trapdoor one-way function is easy to compute in one direction and infeasible to invert without a secret piece of information (the trapdoor). Every public-key cryptosystem is built on one:
- RSA: multiplying large primes is fast; factoring the product is infeasible without knowing the factors.
- Diffie-Hellman / DSA: exponentiation in a cyclic group is fast; the discrete logarithm is infeasible.
- ECC: scalar multiplication of a point () is fast; recovering from (the elliptic curve discrete log problem, ECDLP) is infeasible.
Public key = applying the function (no trapdoor needed). Private key = the trapdoor that enables inversion. Security rests on hardness assumptions — not proven unbreakable, but no polynomial-time classical algorithm is known. Shor's algorithm solves all three on a quantum computer, which is why post-quantum cryptography is a priority.
