<p>You are correct about the first part.</p>

<p>Unfortunately, it's not quite possible to recover <em>the</em> public key from the signature. You can recover a public key that works for ECDSA purposes, but that doesn't guarantee it is byte-for-byte identical to the intended public key. That means it may not hash to the right address, which could cause the check whether the right public key was used to fail.</p>

CC BY-SA 3.0
2015-11-19T00:39:16.593Z
2015-11-19T00:39:16.593Z
David Schwartz
<p>As I understand, the client send the following information to server
 1.the hash of the message,
 2. public key 
 3. signature made by private key</p>

<p>And the server verified the signature with the public key and hash, to check if it belong to the certain private key, server also need to check if the public key correspond to the ripple address.</p>

<p>Am I right?</p>

<p>And I have seen that there is a public key recovery method for ECDSA signature.<a href="https://crypto.stackexchange.com/questions/18105/how-does-recovering-the-public-key-from-an-ecdsa-signature-work">https://crypto.stackexchange.com/questions/18105/how-does-recovering-the-public-key-from-an-ecdsa-signature-work</a></p>

<p>If my previous judgement is right, then is it possible for client only send the signature and the hash to the server? I guess there is a problem because we can't derive the curve from both the signature and the hash.</p>

<ripple><public-key><signature><ecdsa>
How does ripple verify the signature?
Haven
# How does ripple verify the signature?

(Asked by: username_0 on 2015-11-17)

As I understand, the client send the following information to server
1.the hash of the message,
2. public key
3. signature made by private key

And the server verified the signature with the public key and hash, to check if it belong to the certain private key, server also need to check if the public key correspond to the ripple address.

Am I right?

And I have seen that there is a public key recovery method for ECDSA signature.<https://crypto.stackexchange.com/questions/18105/how-does-recovering-the-public-key-from-an-ecdsa-signature-work>

If my previous judgement is right, then is it possible for client only send the signature and the hash to the server? I guess there is a problem because we can't derive the curve from both the signature and the hash.

**Tags:** ripple, public-key, signature, ecdsa


---

## 1 answers

### Answer by username_1 on 2015-11-19. Score: 1 | Accepted answer

You are correct about the first part.

Unfortunately, it's not quite possible to recover *the* public key from the signature. You can recover a public key that works for ECDSA purposes, but that doesn't guarantee it is byte-for-byte identical to the intended public key. That means it may not hash to the right address, which could cause the check whether the right public key was used to fail.


---

