Digital Signature Schemes: ECDSA, Schnorr, and Why Cryptography Secures Ownership
How different signature algorithms prove ownership of private keys without revealing them. The evolution from Bitcoin's ECDSA to newer schemes with better properties.
Chapters
- Digital signatures are the cryptographic foundation that lets…
- You mentioned the nonce
- Backward compatibility and consensus risk
- What about newer schemes?
Transcript
Digital signatures are the cryptographic foundation that lets you prove you own something without anyone else being able to take it.
SAGE: When someone sends Bitcoin, they're not actually moving coins. They're creating a digital signature that proves they control a private key without revealing that key to anyone. It's cryptographic sleight of hand. I'm here with ALGO, who spent years analyzing signature schemes for institutional custody systems. ALGO, most people know signatures exist, but how do they actually work at a fundamental level?
ALGO: Think of it as a mathematical lock with asymmetric properties. You have a private key, which is just a large random number, typically 256 bits. From that, you derive a public key through elliptic curve multiplication, a one-way function. When you sign a message, you're creating a mathematical proof that incorporates three elements: your private key, the message content, and a random nonce. The resulting signature can be verified by anyone with your public key, but the probability of forging it without the private key is approximately one in two to the two hundred fifty-sixth power. Effectively impossible.
SAGE: So the public key is like an address anyone can see, but the signature proves you have the private key without ever showing it. What makes ECDSA, the scheme Bitcoin uses, different from earlier approaches like RSA?
ALGO: Efficiency and key size. RSA signatures require key lengths of 2048 or 4096 bits for equivalent security. ECDSA achieves the same security with 256-bit keys because the elliptic curve discrete logarithm problem is harder than integer factorization. Bitcoin specifically uses the secp256k1 curve. The signature process involves generating a random nonce k, computing a point on the curve, and then creating two values called r and s. The r value comes from the x-coordinate of that curve point, and s is computed using the message hash, the private key, and that nonce. What makes this elegant is that verification only requires curve addition and multiplication, which are fast operations even on constrained devices.
SAGE: You mentioned the nonce. That's the random number generated each time you sign something, correct? Why does that matter?
ALGO: The nonce is where most signature implementations fail catastrophically. If you reuse the same nonce k for two different messages with the same private key, anyone observing both signatures can algebraically solve for your private key. This has happened in production systems. The PlayStation 3 jailbreak in 2010 happened because Sony reused nonces in their signing code. In Bitcoin, there was the 2013 blockchain.info wallet bug where the Android random number generator produced predictable nonces. Users lost funds because their private keys were extracted from the blockchain by analyzing their signatures. The probability of safely reusing a nonce is zero. This is not a rounding error. It's an architectural vulnerability in ECDSA.
SAGE: That's a design flaw that seems almost dangerous. If one implementation mistake exposes the entire private key, what's the alternative?
ALGO: Schnorr signatures, which Satoshi considered but didn't use because they were patent-encumbered until 2008. Schnorr has a critical advantage: signature aggregation and deterministic nonce generation. With ECDSA, if multiple parties want to sign the same transaction, you need multiple separate signatures, each 64 to 72 bytes. With Schnorr, you can combine multiple signatures into a single signature of the same size. For multi-signature wallets or complex smart contracts, this reduces blockchain space by 30 to 40 percent. The mathematical structure is cleaner too. A Schnorr signature is just two values: R, which is a curve point, and s, which is computed as the nonce plus the hash of the public key, the message, and R, all multiplied by the private key. The linearity of this construction allows mathematical composability that ECDSA lacks.
SAGE: So Schnorr is more efficient and enables features ECDSA can't support. But Bitcoin launched with ECDSA in 2009 and only added Schnorr support in 2021 with Taproot. Why did it take over a decade?
ALGO: Backward compatibility and consensus risk. Bitcoin's security model depends on overwhelming agreement about validation rules. Changing signature schemes means introducing new opcodes and transaction types. The probability of a consensus split during a cryptographic upgrade approaches certainty if not executed carefully. Schnorr was added through a soft fork using a technique called script versioning. Old nodes see Schnorr transactions as anyone-can-spend but don't validate them, while upgraded nodes enforce the new rules. The technical risk was manageable, but the coordination risk across miners, exchanges, and wallet providers took years of testing. Adoption has been slow. As of late 2024, approximately 15 percent of Bitcoin transactions use Taproot. The network effect of existing ECDSA infrastructure is powerful.
SAGE: When you verify a signature, what's actually happening mathematically? Walk me through that moment of verification.
ALGO: You have the message, the signature containing r and s, and the public key. First, you hash the message to get a fixed-size digest. Then you compute two values: u1 equals the message hash divided by s, and u2 equals r divided by s. These are modular operations in the curve's finite field. Next, you perform elliptic curve multiplication: multiply the generator point by u1 and the public key by u2, then add those results together. This gives you a point on the curve. Take the x-coordinate of that point and reduce it modulo the curve order. If that value equals r from the signature, the signature is valid. The probability of this matching by chance without the correct private key is negligible, on the order of one in two to the one hundred twenty-eight. The beauty is that this entire process never requires the private key. The curve mathematics ensure that only someone who knew the private key could have created values that satisfy this equation.
SAGE: What about newer schemes? I've heard about BLS signatures in proof-of-stake systems. How do they compare?
ALGO: BLS uses pairing-based cryptography on different curve constructions, typically BLS12-381. The key advantage is signature aggregation that's even more powerful than Schnorr. You can aggregate thousands of signatures from different signers into a single constant-size signature, about 96 bytes, regardless of how many participants signed. Ethereum's consensus layer uses this because validators need to sign attestations every epoch. With hundreds of thousands of validators, aggregation reduces bandwidth by 99 percent. The tradeoff is verification cost. BLS signature verification requires pairing operations, which are computationally expensive, roughly 10 to 100 times slower than ECDSA or Schnorr verification depending on implementation. For applications where aggregation saves more than verification costs, the tradeoff is favorable. For general-purpose transactions, Schnorr remains more efficient.
SAGE: So the choice between signature schemes isn't about security alone, it's about the specific properties each application needs. What should people understand about the trust model here?
ALGO: The security assumption underlying all these schemes is that certain mathematical problems are hard. For elliptic curve signatures, we assume the discrete logarithm problem has no efficient solution. If that assumption breaks, through quantum computers running Shor's algorithm or some mathematical breakthrough, every ECDSA and Schnorr signature becomes forgeable. The probability of this in the next decade is difficult to quantify, but the risk is non-zero. This is why post-quantum signature research focuses on lattice-based or hash-based schemes with different hardness assumptions. But currently, elliptic curve signatures provide a verified security level sufficient for protecting trillions in value. The practical vulnerabilities are implementation errors, not the mathematics. Generate nonces correctly, protect private key material, and the cryptography holds.
SAGE: See you Tuesday. The signature doesn't reveal the secret, it proves you hold it through mathematics that makes forgery effectively impossible.