Discrete Logarithm Problem (DLP)
The hardness of recovering a private key from a public key, the assumption Bitcoin's signatures rest on.
Basically
The discrete logarithm problem is a maths puzzle that is easy to calculate one way and extremely hard to reverse. Bitcoin's digital signatures depend on that difficulty.
Key Takeaways
- The discrete logarithm problem (DLP) underpins elliptic curve cryptography: given two points on a curve, finding the scalar that maps one to the other is computationally infeasible, while the forward calculation is fast.
- Bitcoin relies on the DLP for key security: a private key is multiplied by a generator point on the secp256k1 curve to produce a public key, and the best classical attack requires roughly 2¹²⁸ operations.
- Quantum computers running Shor's algorithm could solve the DLP efficiently, so post-quantum cryptography research matters for Bitcoin's long-term security.
What Is the Discrete Logarithm Problem?
The discrete logarithm problem (DLP) asks: given a generator point G and a resulting point Q on an elliptic curve, find the integer k such that Q = kG. In plain terms, if someone tells you the starting point and the destination, can you work out how many "steps" were taken? For elliptic curves over large finite fields, no known classical algorithm can answer this efficiently.
The resulting asymmetry makes public-key cryptography possible. Computing Q from k and G, called scalar multiplication or point multiplication, takes microseconds, but reversing it to recover k from Q and G would take longer than the age of the universe with current hardware. The DLP is not proven unsolvable; decades of research have failed to produce an efficient classical solution, so cryptographers treat its empirical hardness as a security guarantee.
Bitcoin users depend on the DLP being hard every time they generate a key pair, create a digital signature, or broadcast a transaction. An easy DLP would let anyone who saw a public key derive the corresponding private key and steal the associated funds.
How It Works
The DLP exists in several mathematical settings, but Bitcoin uses the elliptic curve variant, sometimes called ECDLP. The problem maps directly to Bitcoin's key generation.
The scheme's security rests entirely on the assumption that step 2 cannot be reversed. Given Q and G, there is no efficient way to compute k.
The secp256k1 Curve
Bitcoin uses the secp256k1 curve, defined by the equation y² = x³ + 7 over a prime field GF(p), where p = 2²⁵⁶ − 2³² − 977. The curve has a cofactor of 1, meaning every point other than the point at infinity has the same prime order n. That property eliminates certain small-subgroup attacks that affect curves with larger cofactors.
The order n is approximately 2²⁵⁶, which defines the size of the private key space. The best generic classical attack, Pollard's rho algorithm, requires roughly the square root of n operations, or approximately 2¹²⁸ group operations. At a trillion operations per second, that would take roughly 10¹⁹ years.
Why Scalar Multiplication Is a Trapdoor
Scalar multiplication uses the double-and-add algorithm, which is analogous to square-and-multiply for modular exponentiation. A 256-bit scalar requires at most 256 point doublings and 256 point additions, a few hundred operations in total.
The reverse operation has no shortcut that exploits the structure of the multiplication. Unlike regular division, "dividing" one elliptic curve point by another has no efficient algorithm. The best approaches, Pollard's rho and baby-step giant-step, are generic group algorithms that systematically search the space of possible scalars, and none exploits the curve's specific algebraic structure to gain a significant advantage.
Comparison with Hash Functions
The DLP is often compared with hash function preimage resistance. The two hardness assumptions differ in important ways.
The key difference under quantum attack is structural. SHA-256 mining security drops from 2²⁵⁶ to 2¹²⁸ under Grover's algorithm but remains astronomically hard, while the DLP falls completely to Shor's algorithm, which solves it in polynomial time. Quantum threats to Bitcoin therefore focus on DLP-based signatures rather than hash-based mining.
Use Cases
The DLP's hardness is not just a Bitcoin detail. It is the foundation of most modern public-key cryptography.
Why It Matters for Spark
Spark, a Bitcoin Layer 2 protocol, uses FROST threshold signatures for its cooperative signing model. FROST is built on Schnorr signatures, which rely on the DLP over secp256k1, so the security of every virtual UTXO in Spark ultimately traces back to the assumption that the DLP is hard. A broken DLP would force both on-chain Bitcoin and Layer 2 systems like Spark to migrate to post-quantum signature schemes.
The Quantum Threat
Shor's algorithm, running on a sufficiently large quantum computer, can solve the elliptic curve DLP in polynomial time. A March 2026 paper from Google Quantum AI estimated that breaking secp256k1 would require fewer than 1,200 logical qubits and roughly 90 million Toffoli gates, translating to under 500,000 physical qubits on superconducting hardware with current error rates. No quantum computer with this capability exists today, but the estimate represents a roughly 20-fold reduction from prior projections.
The quantum vulnerability primarily affects exposed public keys. Early Bitcoin addresses in Pay-to-Public-Key format and addresses that have already spent funds, revealing the public key, are most at risk. Modern address types like P2WPKH and P2TR protect the public key behind a hash until spending time, but the key is exposed in the mempool between broadcast and confirmation; the research article on harvest-now-decrypt-later attacks and post-quantum cryptography threats to Bitcoin offers a deeper analysis.
Assumed, Not Proven
The hardness of the DLP is a conjecture, not a theorem. No one has proved that an efficient classical algorithm cannot exist, much like P vs NP is widely believed to be hard but remains unproven. Cryptographers rely on the fact that decades of intense research have failed to produce one.
Index calculus methods, which provide subexponential attacks on DLP in certain finite field settings, have been adapted to elliptic curves under heuristic assumptions. These adaptations have not produced practical attacks on curves like secp256k1 with prime-order groups so far, but ongoing research means the situation could shift.
Curve Choice Matters
Not all elliptic curves offer the same DLP hardness. Supersingular curves and anomalous curves, where the curve order equals the field size, admit efficient discrete logarithm algorithms. The security of secp256k1 depends on its specific parameter choices, namely a large prime field, a prime-order group, and a cofactor of 1, because a poorly chosen curve could reduce the DLP to a trivial problem.
Post-Quantum Migration
Bitcoin proposals like BIP-360 introduce quantum-resistant address formats using hash-based or lattice-based signature schemes that do not rely on the DLP. The challenge is migrating the existing UTXO set, especially coins in addresses with exposed public keys, before quantum computers reach sufficient scale. The research on Taproot's quantum vulnerability and NIST post-quantum standards provides details on the migration roadmap.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. You should always do your own research before using any protocol or technology.