<blockquote>
<p>Does that say that R is the x-coordinate of the public key.</p>
</blockquote>
<p>That is not correct.</p>
<p>The R value in the signature is the x coordinate of <em>a point</em>, but that point is not equal to the public key. Instead, it is the x coordinate of the public nonce used in the signature.</p>

CC BY-SA 4.0
2022-02-18T16:41:06.260Z
2022-02-18T16:41:06.260Z
Pieter Wuille
<p>And since this is a signature, there is of course also this relation:</p>
<pre><code>G*m+Y*r == R*s
</code></pre>
<p>both sides of this equation evaluate to the point:
<code>(0x75c79891ca4248d78c84bac2d4a1d787d5a53d77044b1ab46e7de24f23e860dc,0x6b4c968c2bbba0fdec5f119d577b5be812c804a6ca4ea2858335af36685a8994)</code></p>
<p>where:</p>
<ul>
<li>G is the generator point</li>
<li>m is the message hash: <code>0xc2d48f45d7fbeff644ddb72b0f60df6c275f0943444d7df8cc851b3d55782669</code></li>
<li>Y is x*G, the public key: <code>(0x2e930f39ba62c6534ee98ed20ca98959d34aa9e057cda01cfd422c6bab3667b7,0x6426529382c23f42b9b08d7832d4fee1d6b437a8526e59667ce9c4e9dcebcabb)</code></li>
<li>r is the r-value: <code>0x9908144ca6539e09512b9295c8a27050d478fbb96f8addbc3d075544dc413287</code></li>
<li>s is the s-value: <code>0x1aa528be2b907d316d2da068dd9eb1e23243d97e444d59290d2fddf25269ee0e</code></li>
<li>R is k*G : <code>(0x9908144ca6539e09512b9295c8a27050d478fbb96f8addbc3d075544dc413287,0x64c226b542a56976625decfa9717d7b649c4b77fed49fe13b770442467a246fa)</code></li>
<li>x is the private key</li>
<li>k is the signing secret ( aka nonce )</li>
</ul>
<p>You can play with the equations <a href="https://rawcdn.githack.com/nlitsme/bitcoinexplainer/aa50e86e8c72c04a7986f5f7c43bc2f98df94107/calculator.html#bT0weGMyZDQ4ZjQ1ZDdmYmVmZjY0NGRkYjcyYjBmNjBkZjZjMjc1ZjA5NDM0NDRkN2RmOGNjODUxYjNkNTU3ODI2NjkKWT0oMHgyZTkzMGYzOWJhNjJjNjUzNGVlOThlZDIwY2E5ODk1OWQzNGFhOWUwNTdjZGEwMWNmZDQyMmM2YmFiMzY2N2I3LDB4NjQyNjUyOTM4MmMyM2Y0MmI5YjA4ZDc4MzJkNGZlZTFkNmI0MzdhODUyNmU1OTY2N2NlOWM0ZTlkY2ViY2FiYikKcj0weDk5MDgxNDRjYTY1MzllMDk1MTJiOTI5NWM4YTI3MDUwZDQ3OGZiYjk2ZjhhZGRiYzNkMDc1NTQ0ZGM0MTMyODcKcz0weDFhYTUyOGJlMmI5MDdkMzE2ZDJkYTA2OGRkOWViMWUyMzI0M2Q5N2U0NDRkNTkyOTBkMmZkZGYyNTI2OWVlMGUKUj1mcm9teChyLDApCkcqbStZKnIKUipzCgo=" rel="nofollow noreferrer">in this calculator</a></p>

CC BY-SA 4.0
2022-11-16T09:15:00.920Z
2022-11-16T09:15:00.920Z
Willem Hengeveld
<p>I've been reading about ECDSA in <a href="https://www.instructables.com/Understanding-how-ECDSA-protects-your-data/#:%7E:text=you%20only%20need%20the%20%E2%80%98x%E2%80%98%20value%20(20%20bytes)%20for%20the%20signature%2C%20and%20that%20value%20will%20be%20called%20%E2%80%98R%E2%80%98" rel="nofollow noreferrer">here</a>.</p>
<p>Step 11 says that</p>
<blockquote>
<p>you only need the ‘x‘ value (20 bytes) for the signature, and that value will be called ‘R‘</p>
</blockquote>
<p>Does that say that R is the x-coordinate of the public key.
But I don't see that happening in a raw transactions.</p>
<p>For the pizza transaction, it's scriptSig looks like that：</p>
<blockquote>
<p>48</p>
</blockquote>
<blockquote>
<p>30450221009908144ca6539e09512b9295c8a27050d478fbb96f8addbc3d075544dc41328702201aa528be2b907d316d2da068dd9eb1e23243d97e444d59290d2fddf25269ee0e01</p>
</blockquote>
<blockquote>
<p>41</p>
</blockquote>
<blockquote>
<p>042e930f39ba62c6534ee98ed20ca98959d34aa9e057cda01cfd422c6bab3667b76426529382c23f42b9b08d7832d4fee1d6b437a8526e59667ce9c4e9dcebcabb</p>
</blockquote>
<p>The first one is signature,the second one is the public key.
I don't see any relationship between the two items.</p>

<signature><raw-transaction><ecdsa>
What is the relationship between r in signature and the public key
KHJUAF403456ZS3K564WAEF
# What is the relationship between r in signature and the public key

(Asked by: username_0 on 2022-02-18)

I've been reading about ECDSA in [here](https://www.instructables.com/Understanding-how-ECDSA-protects-your-data/#:%7E:text=you%20only%20need%20the%20%E2%80%98x%E2%80%98%20value%20(20%20bytes)%20for%20the%20signature%2C%20and%20that%20value%20will%20be%20called%20%E2%80%98R%E2%80%98).

Step 11 says that

> you only need the ‘x‘ value (20 bytes) for the signature, and that value will be called ‘R‘

Does that say that R is the x-coordinate of the public key.
But I don't see that happening in a raw transactions.

For the pizza transaction, it's scriptSig looks like that：

> 48

> 30450221009908144ca6539e09512b9295c8a27050d478fbb96f8addbc3d075544dc41328702201aa528be2b907d316d2da068dd9eb1e23243d97e444d59290d2fddf25269ee0e01

> 41

> 042e930f39ba62c6534ee98ed20ca98959d34aa9e057cda01cfd422c6bab3667b76426529382c23f42b9b08d7832d4fee1d6b437a8526e59667ce9c4e9dcebcabb

The first one is signature,the second one is the public key.
I don't see any relationship between the two items.

**Tags:** signature, raw-transaction, ecdsa


---

## 2 answers

### Answer by username_1 on 2022-02-18. Score: 2

> Does that say that R is the x-coordinate of the public key.

That is not correct.

The R value in the signature is the x coordinate of *a point*, but that point is not equal to the public key. Instead, it is the x coordinate of the public nonce used in the signature.


---

### Answer by username_2 on 2022-11-16. Score: 1

And since this is a signature, there is of course also this relation:
G*m+Y*r == R*s

both sides of this equation evaluate to the point:
(0x75c79891ca4248d78c84bac2d4a1d787d5a53d77044b1ab46e7de24f23e860dc,0x6b4c968c2bbba0fdec5f119d577b5be812c804a6ca4ea2858335af36685a8994)
where:

G is the generator point
m is the message hash: 0xc2d48f45d7fbeff644ddb72b0f60df6c275f0943444d7df8cc851b3d55782669
Y is x*G, the public key: (0x2e930f39ba62c6534ee98ed20ca98959d34aa9e057cda01cfd422c6bab3667b7,0x6426529382c23f42b9b08d7832d4fee1d6b437a8526e59667ce9c4e9dcebcabb)
r is the r-value: 0x9908144ca6539e09512b9295c8a27050d478fbb96f8addbc3d075544dc413287
s is the s-value: 0x1aa528be2b907d316d2da068dd9eb1e23243d97e444d59290d2fddf25269ee0e
R is k*G : (0x9908144ca6539e09512b9295c8a27050d478fbb96f8addbc3d075544dc413287,0x64c226b542a56976625decfa9717d7b649c4b77fed49fe13b770442467a246fa)
x is the private key
k is the signing secret ( aka nonce )

You can play with the equations in this calculator


---

