<p>It shouldn't compromise the private key. Notice that publishing a message along with a signature is a common thing, and is necessary to verify the signature. Publishing also de Bitcoin address is similar to give the public key, since the former can be derived from the latter (actually, once you redeem your first transaction by signing it, you will provide the public key in the blockchain).</p>
<p>However, since you what to reuse the same key for signing multiple messages, there is something you should have in mind. There exist a <a href="https://en.m.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm#Security" rel="nofollow noreferrer">well-known ECDSA vulnerability</a> that affects the signing process, and by which if two different messages are signed using the same private random value <code>k</code>, anyone who knows the two original messages and the signature can derive the private key used to sign the messages. This is not likely to happen, since <code>k</code> should be chosen at random and from a good source of randomness, however some buggie implementations of the signature had lead to private key disclosure.</p>
<p>In order to ensure that this won't happen, you should use a <a href="https://www.rfc-editor.org/rfc/rfc6979" rel="nofollow noreferrer">deterministic ECDSA signature</a>, in which <code>k</code> is chosen deterministically over the message to sign. Several wallets, like the Bitcoin Core, implement such a mechanism by default.</p>

CC BY-SA 3.0
2017-09-29T15:08:57.520Z
Thanks, so if I could use a different address (public key) for every signature, this would prevent any possibility of private key disclosure, even in (known) buggy implementations?
Scalextrix
CC BY-SA 3.0
2017-09-29T15:13:45.787Z
And a follow up, is there an easy way to check if a wallet uses the deterministic ECDSA signature?
Scalextrix
CC BY-SA 3.0
2017-09-29T15:50:03.483Z
It should, at least for the issue I'm talking about. Regarding checking if a wallet is implementing a deterministic signature scheme, the easiest way I think will be signing a message twice. Given a message and a private key, if you sign the message twice and the signature is the same, then the signature scheme is deterministic.
sr_gi
CC BY-SA 3.0
2017-09-29T16:34:15.087Z
Right that makes sense!
Scalextrix
CC BY-SA 3.0
2017-09-29T14:50:45.507Z
2017-09-29T15:52:13.947Z
2021-10-07T07:34:52.683Z
sr_gi
<p>I want to use message signing in another application to prove a particular wallet owner did in fact make the transaction.  This as I understand it is what message signing/verification is for.</p>

<p>I just want to confirm that making the address, the message, and the hash fully public (open for the world to see) does not compromise the wallet security.  Also if I did this thousands of times on the same address, but each with a unique message and hash, the private keys would remain secure.</p>

<p>Thank you.</p>

<message-signing>
message signing: is it safe to publish the address, message and hash
Scalextrix
# message signing: is it safe to publish the address, message and hash

(Asked by: username_0 on 2017-09-29)

I want to use message signing in another application to prove a particular wallet owner did in fact make the transaction. This as I understand it is what message signing/verification is for.

I just want to confirm that making the address, the message, and the hash fully public (open for the world to see) does not compromise the wallet security. Also if I did this thousands of times on the same address, but each with a unique message and hash, the private keys would remain secure.

Thank you.

**Tags:** message-signing


---

## 1 answers

### Answer by username_1 on 2017-09-29. Score: 4 | Accepted answer

It shouldn't compromise the private key. Notice that publishing a message along with a signature is a common thing, and is necessary to verify the signature. Publishing also de Bitcoin address is similar to give the public key, since the former can be derived from the latter (actually, once you redeem your first transaction by signing it, you will provide the public key in the blockchain).

However, since you what to reuse the same key for signing multiple messages, there is something you should have in mind. There exist a [well-known ECDSA vulnerability](https://en.m.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm#Security) that affects the signing process, and by which if two different messages are signed using the same private random value `k`, anyone who knows the two original messages and the signature can derive the private key used to sign the messages. This is not likely to happen, since `k` should be chosen at random and from a good source of randomness, however some buggie implementations of the signature had lead to private key disclosure.

In order to ensure that this won't happen, you should use a [deterministic ECDSA signature](https://www.rfc-editor.org/rfc/rfc6979), in which `k` is chosen deterministically over the message to sign. Several wallets, like the Bitcoin Core, implement such a mechanism by default.

> **Comments:**
> **username_0**: Thanks, so if I could use a different address (public key) for every signature, this would prevent any possibility of private key disclosure, even in (known) buggy implementations?  
> **username_0**: And a follow up, is there an easy way to check if a wallet uses the deterministic ECDSA signature?  
> **username_1**: It should, at least for the issue I'm talking about. Regarding checking if a wallet is implementing a deterministic signature scheme, the easiest way I think will be signing a message twice. Given a message and a private key, if you sign the message twice and the signature is the same, then the signature scheme is deterministic.  
> **username_0**: Right that makes sense!  

---

