ECDSA (Elliptic Curve Digital Signature Algorithm)
Bitcoin's original signature scheme for proving ownership, still used by every pre-Taproot output type alongside Taproot's Schnorr signatures.
ECDSA is Bitcoin's original digital signature scheme. It's how the network has verified, since 2009, that the person spending a UTXO is the one who actually controls the private key it was sent to.
The mechanism is built on the secp256k1 elliptic curve. Roughly:
- A signer with private key
dproduces a signature(r, s)that depends ond, the message being signed, and a secret noncek(random in textbook ECDSA; libsecp256k1 derives it deterministically from the key and message per RFC 6979). - Anyone with the corresponding public key can verify the signature is mathematically consistent - meaning whoever signed must have known
d. - The verifier learns nothing about
din the process.
Production ECDSA implementations also have to follow strict constant-time discipline: the scalar multiplication step in signing leaks key bits through timing if implemented naively, and a 2011 attack recovered a TLS server's ECDSA key from a scalar-multiplication timing leak in OpenSSL. Bitcoin Core's libsecp256k1, built to be free of timing side channels for secret-key operations, is one of the more carefully-engineered constant-time signers in production cryptography.
ECDSA works, but it has some annoyances:
- Signature malleability. A given signature
(r, s)can be trivially massaged into(r, n - s), wherenis the curve order. Both verify against the same key for the same message. This caused real headaches for transaction-ID stability. SegWit fixed it for the inputs that use it, by taking signatures out of the data the transaction ID is computed from. - No native aggregation. Five cosigners on a multisig output produce five separate signatures, each occupying space on-chain. There's no clean way to compress them.
- Slightly awkward proofs. Provable security results for ECDSA are messier than for Schnorr.
Schnorr signatures, activated with Taproot in November 2021 at block 709,632, address all three issues. ECDSA is still used by every pre-Taproot output type (P2PK, P2PKH, P2SH, P2WPKH, P2WSH) and remains the most-tested signature scheme in production Bitcoin. Taproot outputs use Schnorr only: the key path verifies a BIP 340 signature, and tapscript's OP_CHECKSIG was redefined for Schnorr keys and signatures instead of ECDSA.
ECDSA's security rests on the elliptic-curve discrete logarithm problem being computationally hard. That assumption is broken by Shor's algorithm on a sufficiently powerful quantum computer. See Post-Quantum Bitcoin for the migration framework.
Key takeaways
- Elliptic curve-based method for signing transactions
- Formed the cornerstone of Bitcoin's cryptographic security
- Schnorr signatures now coexist, bringing potential benefits
Related chapters
On the mailing list
The topic timeline: Signatures and cryptography (155 threads).
Corrected
-
Was: The entry called P2WPKH and P2WSH legacy address types and said new Taproot outputs use Schnorr 'by default'.
Now: P2WPKH and P2WSH are SegWit v0 output types, not legacy ones; what they share with P2PKH and P2SH is that they are pre-Taproot and still use ECDSA. Taproot outputs use Schnorr only: BIP 341 key path spends verify a BIP 340 signature and BIP 342 redefines OP_CHECKSIG for Schnorr instead of ECDSA, with no ECDSA option. Details
Sources (7)
- BIP-340 - Schnorr Signatures for secp256k1: Bitcoin has traditionally used ECDSA over secp256k1; ECDSA signatures are inherently malleable since (r, n-s) verifies whenever (r, s) does; the best provable-security results for ECDSA rely on stronger assumptions; Schnorr's linearity is the building block for multisignatures (2020)
- bitcoin-core/secp256k1 - README: constant time, constant memory access signing; intended to be completely free of timing sidechannels for secret-key operations; derandomized ECDSA via RFC 6979 (accessed 2026-10-14)
- Billy Bob Brumley and Nicola Tuveri - Remote Timing Attacks are Still Practical: a timing leak in OpenSSL's elliptic-curve scalar multiplication recovers a TLS server's ECDSA private key (IACR ePrint 2011/232)
- BIP-141 - Segregated Witness: signature data is no longer part of the transaction hash, so nonintentional malleability becomes impossible for inputs that use it (2015)
- BIP-341 - Taproot: key path spends verify a BIP 340 signature; the deployment activated at height 709632 on mainnet (2020)
- BIP-342 - Validation of Taproot Scripts: OP_CHECKSIG and OP_CHECKSIGVERIFY are modified to operate on Schnorr public keys and signatures instead of ECDSA (2020)
- Peter W. Shor - Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (1995)
External references (3)
Related terms (11)
Published . Revised . One correction logged for this page.
Edit this page on GitHub