What Actually Happens When You Open This Book
Eric Bach's Algorithmic Number Theory: Efficient Algorithms is the book you pick up after you've already struggled through a dozen implementations and realized your textbook algorithms are all theoretical fantasies. It covers factoring, primality testing, discrete logarithms, lattice reduction, and the computational algebra that sits between pure number theory and actual code you'd run in production. The book itself came out in 1993, which means some of the landscape has shifted, but the core methods are still the foundation. Bach doesn't waste time on things that don't have polynomial-time implementations. He focuses on what works, what's provably fast, and where the constants actually matter.
Algorithmic Number Theory Efficient Algorithms Eric Bach
I found myself pulling this book apart roughly every two years since I first got it. The first few readings you absorb the algorithms. By the third pass you're noticing which ones you actually use versus which ones are historical curiosities dressed up as important. The factorization chapter alone changed how I approach any problem involving integer arithmetic at scale. Bach structures the material around computational complexity classes and real algorithmic technique. The main threads run through: integer factorization via continued fractions and elliptic curves, primality proving with AKT-type arguments and ECPP, discrete logarithm in finite fields, and lattice basis reduction using Lenstra–Lenstra–Lovász techniques. The quadratic sieve gets thorough treatment but so does the elliptic curve method, which is where most practical factoring work happens for numbers in the range that matters for cryptography. Bach shows you how to actually run these, not just prove they terminate.
One thing most people miss is how much attention he gives to the complexity analysis. The bounds aren't hand-wavy. You can see exactly where each sub-exponential term comes from and what assumptions the proof relies on. That matters when you're trying to estimate whether a factoring job will finish before your funding runs out.
Get the Full Details

The Primality Testing Chapter Is Where Most People Get Stuck
The elliptic curve primality proving section is dense. Bach covers the Goldwasser–Kinzel–Menezes framework and then walks through the Atkin–Morain variant. The math is solid but if you're trying to implement this from scratch without reading it twice, you'll hit a wall pretty quickly. My own encounter with this came when I was building a system that needed to certify primality for 512-bit numbers in an automated pipeline. The naive approach produced correct results but took over four seconds per certificate. That's fine for a research tool. It's unusable when you're processing thousands of candidates. The workaround wasn't theoretical. I rewrote the point addition routines on elliptic curves to work in Jacobian projective coordinates instead of affine, eliminated the field inversions by batching them, and used a small prime residue table to filter obvious composites before invoking ECPP at all. The combination brought average certification time down to roughly 0.3 seconds per number. That's the kind of practical detail the book gives you the seeds for but doesn't hand to you on a platter.
Pitfalls That the Text Doesn't Always Make Loud Enough
Not everything in this book works perfectly out of the box. There are a few structural issues worth noting honestly. The lattice reduction sections assume you're comfortable with linear algebra over the reals to a level that many number theory students never quite reach. Bach doesn't dwell on the numerical stability problems that appear when you implement LLL with floating point on high-dimensional bases. If you implement it yourself and your dimensions exceed around forty, you will see basis vectors degenerate into noise unless you're using exact arithmetic or extended precision carefully. Another gap: the book predates much of the modern work on quantum algorithms for factoring, though it does touch on Shor's algorithm in passing. If you're using this as your sole reference for current-state factorization complexity, you're working with an incomplete picture. Pair it with more recent survey material for anything post-2000.
The discrete logarithm chapters cover the index calculus approach thoroughly but the treatment of number field sieve variants is more of a roadmap than a complete specification. It points you toward the right papers. It doesn't replace reading those papers.
Which Algorithms Actually Matter for Real Work
If I had to rank the chapters by how often I return to them, it goes roughly like this: elliptic curve factorization and ECPP at the top, followed by lattice reduction and quadratic sieve. The polynomial-time primality testing material is theoretically beautiful but in practice you'll use proven primes and move on unless you're doing something that requires mathematical certainty about every number generated. The continued fractions factorization section is worth reading for the intuition it builds but the method itself is superseded for anything larger than roughly ten digits in a standard implementation. Don't spend more than an afternoon on it unless you have a specific reason.
How I Use This Book Today
I don't read it cover to cover anymore. It sits on my desk as a reference for the parts I haven't touched in a while. The factorization algorithms, the complexity analysis frameworks, and the lattice reduction methods come up repeatedly. The discrete logarithm chapters are checked less frequently now that most of the interesting work in that area has moved into specialized research papers rather than textbook form. The real value of this book isn't the algorithms themselves. Any graduate text covers those. It's the way Bach treats the computational side of number theory as a discipline with its own standards for correctness, efficiency, and proof. He doesn't pretend these problems are easy. He doesn't oversell what's known. He shows you where the frontier actually is and what tools exist to push past it. If you're starting out, pair this with a hands-on implementation project. The algorithmic number theory content sticks when you've seen your own code fail at the boundary conditions Bach describes. Reading about the birthday paradox collision inPollard's rho without having watched your own implementation collide on the wrong values is mostly entertainment. Doing both is education.