The question P = NP asks whether every problem that is fast to check is also fast to solve. The whole world is betting that the answer is no. Every public-key cryptosystem (banking, messaging, identity, software updates) rests on the assumption that certain NP problems are genuinely hard. Most of operations research, drug design, protein folding, and AI training would become trivial if the answer turned out to be yes. Almost nobody believes that. Decades of attacks on these problems have produced nothing, and the Clay Mathematics Institute will pay a million dollars to anyone who settles the question either way. The practical implication for your engineering planning is this: do not bet on P = NP being true. Treat NP-complete problems as hard, build accordingly, and reach for SaaS solvers or approximations rather than waiting for a breakthrough.
05
What if the line collapsed
The unproven equality that, if proven, would rewire the entire economy in a week.
- RSA is the most concrete bet on P ≠ NP. The encryption is one multiplication; the inverse is factoring. The Rust
num-primecrate handles both halves and makes the asymmetry visible — primality test in microseconds, factoring of a 200-bit composite in minutes.use num_prime::nt_funcs::is_prime; use num_bigint::BigUint; fn rsa_modulus(p: &BigUint, q: &BigUint) -> BigUint { assert!(is_prime(p, None).probably()); assert!(is_prime(q, None).probably()); p * q // Recovering p, q from p*q alone is the bet. No fast classical // algorithm is known. The day one is found, every RSA key on the // internet is broken. } -
is_primedoes not return a plainbool— primality testing on huge integers is not always deterministic. The crate returns a three-valuedPrimalityenum that distinguishes "proved prime," "proved composite," and "probably prime" (passed Miller-Rabin, the standard probabilistic test, with an error rate roughly1in2⁶⁰per witness)..probably()collapses both positive answers — proved-prime and probably-prime — intotrue, leaving only proved-composite asfalse. For cryptographic-sized numbers, "probably" is the right answer to act on; the false-positive rate is below the rate at which cosmic rays flip bits in your RAM.// is_prime() returns a tri-state, not just a bool: // // Primality::Yes → proved prime (deterministic test passed) // Primality::Probably → passed Miller-Rabin, no proof either way // Primality::No → proved composite (a witness was found) // // .probably() merges the two positive answers into true: let answer = is_prime(p, None); let acceptable: bool = answer.probably(); // // Same as writing: let acceptable = match answer { Primality::Yes => true, Primality::Probably => true, Primality::No => false, }; // // The 1-in-2⁶⁰ error rate sounds scary; in practice it is far // below the rate of hardware bit-flips from cosmic rays. Every // piece of production crypto code in the world treats Probably // as Yes.