MultiversX Tracker is Live!

How many times and where exactly is ECDSA used in Bitcoin?

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 169 Views

A digital signature scheme, like ECDSA, is formally defined as a collection of three algorithms:

  • A key generation algorithm which creates a (private key, public key) pair.
  • A signing algorithm which given a message and a private key, computes a signature.
  • A verification algorithm which given a message and a public key, verifies that the signature was created by the corresponding private key.

These three algorithms are used at distinct times in the lifetime of a Bitcoin transaction:

  • The ECDSA key generation algorithm (*) is used when a receiver wants to create an address. The private and public key are stored in the wallet, and the public key is transformed into an address, which is then handed to the sender. The sender then constructs a transaction crediting that address.
  • When the receiver wants to spend the received coins, they need to construct a transaction which "redeems" them. This involves the ECDSA signing algorithm to authorize the transaction to spend those coins, showing the owner of the coins consents to it.
  • When that transactions is broadcast to the network, Bitcoin nodes and wallets will verify the transaction, as invalid transactions are not allowed. This involves the use of the ECDSA verification algorithm.

So to answer your question: it depends which algorithm you're talking about. The key generation algorithm is used once per address. The signing algorithm is used once per transaction input. The verification algorithm is performed by every node once for every transaction input.

(*) = In modern Bitcoin wallets, the addresses are not actually randomly generated anymore, but derived from a seed instead. This could be seen as choosing to use a distinct, but compatible, key generation algorithm. It's also worth noting that key generation for ECDSA isn't actually ECDSA-specific, as every 256-bit number is a valid private key, and the conversion algorithm from private key to public key is (mostly) shared across all EC-based algorithms (e.g. it is compatible with BIP340 Schnorr signatures, and the ECDH key agreement protocol).


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments