<p>You say you are familiar with how secp256k1 and ECDSA works but from what you say later I'm unsure whether you are. SegWit v0 didn't change the signing algorithm (ECDSA) nor the curve (secp256k1). SegWit <strong>v1</strong> (Taproot) <strong>did</strong> change the signing algorithm (Schnorr). The address format with SegWit v0 (bech32) did change but that is nothing to do with signing. The signing part is exactly the same as pre-SegWit other than the message (or transaction data) being signed. What is signed is defined by the sighash flag which did change with the SegWit upgrade (<a href="https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#specification" rel="nofollow noreferrer">BIP 143</a>).</p>
<blockquote>
<p>For instance, if I have some Bitcoin Input in my wallet, how is the secp256k1 curve used so that I can unlock (verify that I own) that Bitcoin and transfer it to Bob. Then, how can Bob sign this Bitcoin that he received using the curve.</p>
</blockquote>
<p>With SegWit v0 you produce a witness (that generally includes a signature generated using the ECDSA signing algorithm) to transfer Bitcoin to a new destination. The key thing with the introduction of SegWit was where the witness is stored and not how the signature was generated. However the receiver (Bob in this case) doesn't sign anything. The funds are locked to his public key/address but he only needs to produce a signature if and when he moves the funds from this address.</p>

CC BY-SA 4.0
2022-06-22T11:27:49.577Z
2022-06-22T11:42:40.193Z
2022-06-22T11:42:40.193Z
Michael Folkson
<p>I am quite familiar with the way secp256k1 ECDSA works as well as the equations that are utilised. However, I have no idea how this ECDSA applies to signing Bitcoin (SegWit Format) and transferring it to another wallet address.</p>
<p>For instance, if I have some Bitcoin Input in my wallet, how is the secp256k1 curve used so that I can unlock (verify that I own) that Bitcoin and transfer it to Bob. Then, how can Bob sign this Bitcoin that he received using the curve.</p>

CC BY-SA 4.0
2022-06-22T15:35:01.323Z
Please use regular capitalization in topic titles, these aren't newspaper headlines.
Murch
<segregated-witness><signature><ecdsa><transaction-input><secp256k1>
How is a Bitcoin transaction signed using ECDSA?
Jamo
# How is a Bitcoin transaction signed using ECDSA?

(Asked by: username_0 on 2022-06-22)

I am quite familiar with the way secp256k1 ECDSA works as well as the equations that are utilised. However, I have no idea how this ECDSA applies to signing Bitcoin (SegWit Format) and transferring it to another wallet address.

For instance, if I have some Bitcoin Input in my wallet, how is the secp256k1 curve used so that I can unlock (verify that I own) that Bitcoin and transfer it to Bob. Then, how can Bob sign this Bitcoin that he received using the curve.

**Tags:** segregated-witness, signature, ecdsa, transaction-input, secp256k1

> **Comments:**
> **username_1**: Please use regular capitalization in topic titles, these aren't newspaper headlines.  

---

## 1 answers

### Answer by username_2 on 2022-06-22. Score: 2 | Accepted answer

You say you are familiar with how secp256k1 and ECDSA works but from what you say later I'm unsure whether you are. SegWit v0 didn't change the signing algorithm (ECDSA) nor the curve (secp256k1). SegWit **v1** (Taproot) **did** change the signing algorithm (Schnorr). The address format with SegWit v0 (bech32) did change but that is nothing to do with signing. The signing part is exactly the same as pre-SegWit other than the message (or transaction data) being signed. What is signed is defined by the sighash flag which did change with the SegWit upgrade ([BIP 143](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki#specification)).

> For instance, if I have some Bitcoin Input in my wallet, how is the secp256k1 curve used so that I can unlock (verify that I own) that Bitcoin and transfer it to Bob. Then, how can Bob sign this Bitcoin that he received using the curve.

With SegWit v0 you produce a witness (that generally includes a signature generated using the ECDSA signing algorithm) to transfer Bitcoin to a new destination. The key thing with the introduction of SegWit was where the witness is stored and not how the signature was generated. However the receiver (Bob in this case) doesn't sign anything. The funds are locked to his public key/address but he only needs to produce a signature if and when he moves the funds from this address.


---

