<p>No, only two hashes. The hash itself isn't typically described as a part of ECDSA though the input must already be hashed (because e.g. a signature of 0 is trivially forged).</p>

CC BY-SA 4.0
2018-10-18T23:16:41.897Z
2018-10-18T23:16:41.897Z
G. Maxwell
<p>I am trying to unwrap bitcoin transaction generation process.</p>

<p>A bit confused about signing part.</p>

<p>My understanding is the transaction is sha256'd, then sha256'd one more time, then ECDSA'd. </p>

<p>Based off <a href="https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm</a>, ECDSA will first hash the message. Does that mean the transaction is sha256'd <strong>3</strong> times in total?</p>

<p>All the best!</p>

<p>Johnny</p>

<raw-transaction><signature><message-signing>
Signature generation
Johnny
# Signature generation

(Asked by: username_0 on 2018-10-18)

I am trying to unwrap bitcoin transaction generation process.

A bit confused about signing part.

My understanding is the transaction is sha256'd, then sha256'd one more time, then ECDSA'd.

Based off <https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm>, ECDSA will first hash the message. Does that mean the transaction is sha256'd **3** times in total?

All the best!

username_0

**Tags:** raw-transaction, signature, message-signing


---

## 1 answers

### Answer by username_1 on 2018-10-18. Score: 2 | Accepted answer

No, only two hashes. The hash itself isn't typically described as a part of ECDSA though the input must already be hashed (because e.g. a signature of 0 is trivially forged).


---

