<p>I think you got confused because you changed the order of signature and public key in scriptSig which consumes P2PKH output.</p>
<p><strong>First comes the signature, then the public key.</strong> <a href="https://bitcoin.stackexchange.com/a/107873/140802">Here</a> you can see the complete list for all standard transactions.</p>
<p>Since the signature is the first data-push in scriptSig, the DER format of the signature in the transaction you specified is as follows:</p>
<pre><code>DER sequence:30
sequence_length:39
integer_value:02
length:15
R:3b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
integer_value:02
length:20
S:7cb21ff771e841b5706df6f7e26bbea177d05129b1fe1ec49af65f4bb0ba744a
</code></pre>

CC BY-SA 4.0
2023-09-26T22:41:47.857Z
Thanks, actually what destabilized me was the unusually low value for r
mathboi
CC BY-SA 4.0
2023-09-26T22:44:03.980Z
@mathboi You're welcome
dassd
CC BY-SA 4.0
2023-09-26T22:02:32.863Z
2023-09-26T22:12:46.597Z
2023-09-26T22:12:46.597Z
dassd
<p>I'm having trouble understanding how the following transaction was valided (Block 364845 July 2015) :</p>
<p>2c6c27639e79038cf446e795e267dc8abbe96d1f21cdd17518cc6b57ad2d86d9</p>
<p>It has one input, and is redeeming a P2PKH output.</p>
<p>It's ScriptSig is (95 bytes):</p>
<p><strong>3c</strong>303902153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c6302207cb21ff771e841b5706df6f7e26bbea177d05129b1fe1ec49af65f4bb0ba744a03<strong>21</strong>0265939df6b81b4d5ecb3b913d7013efda1498349b65b61847825c37bfde5b87fe</p>
<p>The <strong>bold</strong> bytes are data-pushes. The second data-push is the public key, it is the first one that I'm having a problem with. It is supposed to be the signature, but I don't understand it, it doesn't even seem to be DER encoded. The s-value seems to be 0x7cb21ff771e841b5706df6f7e26bbea177d05129b1fe1ec49af65f4bb0ba744a and the sighash x03, but I can't read the r-value.</p>

<transactions><signature><validation>
How was this transaction validated?
mathboi
# How was this transaction validated?

(Asked by: username_0 on 2023-09-26)

I'm having trouble understanding how the following transaction was valided (Block 364845 July 2015) :

2c6c27639e79038cf446e795e267dc8abbe96d1f21cdd17518cc6b57ad2d86d9

It has one input, and is redeeming a P2PKH output.

It's ScriptSig is (95 bytes):

**3c**303902153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c6302207cb21ff771e841b5706df6f7e26bbea177d05129b1fe1ec49af65f4bb0ba744a03**21**0265939df6b81b4d5ecb3b913d7013efda1498349b65b61847825c37bfde5b87fe

The **bold** bytes are data-pushes. The second data-push is the public key, it is the first one that I'm having a problem with. It is supposed to be the signature, but I don't understand it, it doesn't even seem to be DER encoded. The s-value seems to be 0x7cb21ff771e841b5706df6f7e26bbea177d05129b1fe1ec49af65f4bb0ba744a and the sighash x03, but I can't read the r-value.

**Tags:** transactions, signature, validation


---

## 1 answers

### Answer by username_1 on 2023-09-26. Score: 1 | Accepted answer

I think you got confused because you changed the order of signature and public key in scriptSig which consumes P2PKH output.

**First comes the signature, then the public key.** [Here](https://bitcoin.stackexchange.com/a/107873/140802) you can see the complete list for all standard transactions.

Since the signature is the first data-push in scriptSig, the DER format of the signature in the transaction you specified is as follows:

```
DER sequence:30
sequence_length:39
integer_value:02
length:15
R:3b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63
integer_value:02
length:20
S:7cb21ff771e841b5706df6f7e26bbea177d05129b1fe1ec49af65f4bb0ba744a

```

> **Comments:**
> **username_0**: Thanks, actually what destabilized me was the unusually low value for r  
> **username_1**: @username_0 You're welcome  

---

