<p>This is possible, but your customers will have to use a wallet that supports the functionality of signing messages using the wallet’s private keys. For example, bitcoind has the <code>signmessage</code> command. The user could input a message such as <em>”todays date is ____, and I control bitcoin address ____, which sent coins to ____ service”</em> in order to prove their identity. </p>

<p>Using any identifying info from the transaction itself will not be a good way to prove user identity, since all transaction details are a matter of public record. </p>

<p>Note: By utilizing this functionality, you will be restricting your potential user-base to only more knowledgeable users. Not all wallets have this functionality, in fact most do not. If a user happens to sends bitcoin from a wallet that cannot sign messages, they can prove their identities by importing the private key into some other software that is capable and then using it to sign a message— but again this is a more ‘advanced user’ sort of operation. </p>

<p>Another note: DO NOT build a service which requires users to communicate their private key to you. This would be an irresponsible thing to do. </p>

CC BY-SA 4.0
2018-08-20T20:41:48.280Z
Thank you very helpful.  We are a business that wants to be able to take bitcoin payments on account for future orders.  It works well with our model.  Perhaps, we need to communicate a unique customer number to them independently of their deposit?
baynard
CC BY-SA 4.0
2018-08-20T22:41:38.690Z
@baynard I think that could work, so long as the identifying number is generated, communicated, and stored securely. It does open up some additional considerations though: You wouldn’t want an employee with access to your backend able to falsely claim a large deposit, you wouldn’t want the algorithm that generates identifying numbers to be game-able, etc
chytrik
CC BY-SA 4.0
2018-08-21T00:37:36.493Z
I wanted to ask you too about a more old school variation on TEV's idea (forgive me if I'm missing something fundamental, my business is trying to accept bitcoin  but I have very limited knowledge re. bitcoin, (i) customer sends bitcoins (ii) customer texts using Signal/other encrypted messaging app a unique number THEY generate (iii) customer makes payments from their deposit using their unique number. If approach works I can build better flow and ux into our platform. Do you see any issues/security, etc with this less artful approach? Matching customer with deposit? Thxs again!
baynard
CC BY-SA 4.0
2018-08-21T00:50:25.050Z
@baynard I replied to this on JBaczuk’s answer. As another option that is more straightforward: if your customers can create any sort of account on your site, you could simply generate a unique deposit address for each account. This would remove the need to prove ownership of an address that made a deposit, users would instead simply need to maintain ownership of an account. This is a pretty standard model for a custodial service/site.
chytrik
CC BY-SA 4.0
2018-08-20T20:07:11.583Z
2018-08-20T21:14:08.663Z
2018-08-20T21:14:08.663Z
chytrik
<blockquote>
  <p>is there a way the sender can use any part of the
  blockchain/transaction as a unique identifier so they can claim a
  credit in the future</p>
</blockquote>

<p>The only secure unique identifier is a private key used to send the funds (or a digital signature proving ownership of that key). </p>

<p>If I understand you correctly, you want to give someone credit for sending bitcoin. The only way to be sure that a specific person sent you bitcoin is for them to provide proof that they own the private key that sent it. This could mean either showing you the private key (usually not preferred, because now its exposed), or digitally signing a message (that you provide) with the same key that was used to pay you. And even this doesn't prove that they sent it, it just proves they have access to the key that <strong><em>was able</em></strong> to send it.</p>

<p>The problem is the entire blockchain is public so anyone can look up the transaction and provide data about it like the <code>txid</code> or the block it was in, even an exact amount, and pretend they sent it.</p>

<p><strong>Note</strong>: By the way there is an RPC method <code>signmessage</code> in bitcoin core that could be used to do this, see <a href="https://bitcoincore.org/en/doc/0.16.2/rpc/wallet/signmessage/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.16.2/rpc/wallet/signmessage/</a></p>

<p><strong>Update</strong>: As mentioned in the comments, generating a new Bitcoin address for each customer, which you only need to share with them, would be a decent (and common) way of tracking payments. If someone else found out about the address and sent funds, only the customer you assigned that address to would get credit. This would best be implemented as a <a href="https://en.bitcoin.it/wiki/Deterministic_wallet" rel="nofollow noreferrer">Hierarchical Deterministic</a> wallet so  your keys can all be generated from a master key.</p>

CC BY-SA 4.0
2018-08-20T20:46:32.203Z
Thank you.  Your answer is a helpful elaboration.   We are a business that wants to be able to take bitcoin payments on account for future orders. It works well with our model. Perhaps we need to communicate a unique customer number to them independently of their deposit, or is their some other secure way of doing this without using the signmessage method, as per other other answer, this might limit customers?
baynard
CC BY-SA 4.0
2018-08-20T21:03:44.710Z
You could develop wallet software that will handle the signing so there is a good UX. However, as @chytrik noted, you don't want to require users to expose public keys (for ECDLP attack prevention). I guess you could warn them so that they can create a single address just for this tx.
JBaczuk
CC BY-SA 4.0
2018-08-20T23:56:58.813Z
@TEV what about a more old school variation on your theme (forgive me if I'm missing something fundamental, my business is trying to accept bitcoin as a payment method but I have very limited knowledge when it comes to bitcoin, (i) customer sends bitcoins  (ii) customer texts using Signal or other encrypted messaging app a unique number THEY generate (iii) customer makes payments from deposit using their unique number.  If the approach works we can build a better flow and ux into our platform. Do you see any issues/security, etc with this less artful approach?  Thank you again!
baynard
CC BY-SA 4.0
2018-08-21T00:45:51.197Z
@baynard anyone watching the blockchain for payments to your service could also send a message claiming they own that deposit, so this doesn’t solve the issue of proving ownership of a deposit. The method @ TEV suggested would work, but I don’t know of any wallet that will decrypt messages encrypted with a bitcoin public key. Importing a private key into some other cryptographic software to deal with the decryption creates risks for your customer, so I think using the message signing functionality is a better solution
chytrik
CC BY-SA 4.0
2018-08-21T13:28:46.777Z
@TEV thanks this is super helpful.  I want to go with bitcoin so I think assigning a different address to each customer will be the most secure and easiest ux solution
baynard
CC BY-SA 4.0
2018-08-21T15:37:17.893Z
@TEV I didn’t know electrum has that functionality! My mistake, thanks for clarifying.
chytrik
CC BY-SA 4.0
2018-08-21T18:24:31.227Z
Hit a hurdles with unique addresses for customers integrating into our app without a lot of reinvention of the wheel....what about a slight variation on above...i) customer messages id# (x = id)  ii) we message back y id# (x + y = PIN) iii) customer makes deposit and messages deposit amount and their PIN  iv) Customer can only access account if they have PIN.  Since PIN is generated before deposit anyone following block chain will only see deposit amount but not have PIN to use.  Practical issues,  logic flaws, other flaws in approach...THXS!
baynard
CC BY-SA 4.0
2018-08-20T19:10:45.380Z
2018-08-21T12:03:08.630Z
2018-08-21T12:03:08.630Z
JBaczuk
<p>Newb, apologies if this is a dumb question. If a bitcoin is sent to my wallet is there a way the sender can use any part of the blockchain/transaction as a unique identifier so they can claim a credit in the future for the amount sent, that is, without assigning them any additional identifying information to them? (e.g. You send me a bitcoin, I treat it as a credit.  You can claim the credit by using some combination of the numbers used in the transaction, so I can credit you the amount sent, without assigning any additional information to you, and no one else could be privy to that identifying information.  Thank you for the help!</p>

<deposit>
Unique Identifier/Credit
baynard
# Unique Identifier/Credit

(Asked by: username_0 on 2018-08-20)

Newb, apologies if this is a dumb question. If a bitcoin is sent to my wallet is there a way the sender can use any part of the blockchain/transaction as a unique identifier so they can claim a credit in the future for the amount sent, that is, without assigning them any additional identifying information to them? (e.g. You send me a bitcoin, I treat it as a credit. You can claim the credit by using some combination of the numbers used in the transaction, so I can credit you the amount sent, without assigning any additional information to you, and no one else could be privy to that identifying information. Thank you for the help!

**Tags:** deposit


---

## 2 answers

### Answer by username_1 on 2018-08-20. Score: 1

This is possible, but your customers will have to use a wallet that supports the functionality of signing messages using the wallet’s private keys. For example, bitcoind has the `signmessage` command. The user could input a message such as *”todays date is \_\_\_\_, and I control bitcoin address \_\_\_\_, which sent coins to \_\_\_\_ service”* in order to prove their identity.

Using any identifying info from the transaction itself will not be a good way to prove user identity, since all transaction details are a matter of public record.

Note: By utilizing this functionality, you will be restricting your potential user-base to only more knowledgeable users. Not all wallets have this functionality, in fact most do not. If a user happens to sends bitcoin from a wallet that cannot sign messages, they can prove their identities by importing the private key into some other software that is capable and then using it to sign a message— but again this is a more ‘advanced user’ sort of operation.

Another note: DO NOT build a service which requires users to communicate their private key to you. This would be an irresponsible thing to do.

> **Comments:**
> **username_0**: Thank you very helpful.  We are a business that wants to be able to take bitcoin payments on account for future orders.  It works well with our model.  Perhaps, we need to communicate a unique customer number to them independently of their deposit?  
> **username_1**: @username_0 I think that could work, so long as the identifying number is generated, communicated, and stored securely. It does open up some additional considerations though: You wouldn’t want an employee with access to your backend able to falsely claim a large deposit, you wouldn’t want the algorithm that generates identifying numbers to be game-able, etc  
> **username_0**: I wanted to ask you too about a more old school variation on TEV's idea (forgive me if I'm missing something fundamental, my business is trying to accept bitcoin  but I have very limited knowledge re. bitcoin, (i) customer sends bitcoins (ii) customer texts using Signal/other encrypted messaging app a unique number THEY generate (iii) customer makes payments from their deposit using their unique number. If approach works I can build better flow and ux into our platform. Do you see any issues/security, etc with this less artful approach? Matching customer with deposit? Thxs again!  
> **username_1**: @username_0 I replied to this on username_2’s answer. As another option that is more straightforward: if your customers can create any sort of account on your site, you could simply generate a unique deposit address for each account. This would remove the need to prove ownership of an address that made a deposit, users would instead simply need to maintain ownership of an account. This is a pretty standard model for a custodial service/site.  

---

### Answer by username_2 on 2018-08-20. Score: 0

> is there a way the sender can use any part of the
> blockchain/transaction as a unique identifier so they can claim a
> credit in the future

The only secure unique identifier is a private key used to send the funds (or a digital signature proving ownership of that key).

If I understand you correctly, you want to give someone credit for sending bitcoin. The only way to be sure that a specific person sent you bitcoin is for them to provide proof that they own the private key that sent it. This could mean either showing you the private key (usually not preferred, because now its exposed), or digitally signing a message (that you provide) with the same key that was used to pay you. And even this doesn't prove that they sent it, it just proves they have access to the key that ***was able*** to send it.

The problem is the entire blockchain is public so anyone can look up the transaction and provide data about it like the `txid` or the block it was in, even an exact amount, and pretend they sent it.

**Note**: By the way there is an RPC method `signmessage` in bitcoin core that could be used to do this, see <https://bitcoincore.org/en/doc/0.16.2/rpc/wallet/signmessage/>

**Update**: As mentioned in the comments, generating a new Bitcoin address for each customer, which you only need to share with them, would be a decent (and common) way of tracking payments. If someone else found out about the address and sent funds, only the customer you assigned that address to would get credit. This would best be implemented as a [Hierarchical Deterministic](https://en.bitcoin.it/wiki/Deterministic_wallet) wallet so your keys can all be generated from a master key.

> **Comments:**
> **username_0**: Thank you.  Your answer is a helpful elaboration.   We are a business that wants to be able to take bitcoin payments on account for future orders. It works well with our model. Perhaps we need to communicate a unique customer number to them independently of their deposit, or is their some other secure way of doing this without using the signmessage method, as per other other answer, this might limit customers?  
> **username_2**: You could develop wallet software that will handle the signing so there is a good UX. However, as @username_1 noted, you don't want to require users to expose public keys (for ECDLP attack prevention). I guess you could warn them so that they can create a single address just for this tx.  
> **username_0**: @TEV what about a more old school variation on your theme (forgive me if I'm missing something fundamental, my business is trying to accept bitcoin as a payment method but I have very limited knowledge when it comes to bitcoin, (i) customer sends bitcoins  (ii) customer texts using Signal or other encrypted messaging app a unique number THEY generate (iii) customer makes payments from deposit using their unique number.  If the approach works we can build a better flow and ux into our platform. Do you see any issues/security, etc with this less artful approach?  Thank you again!  
> **username_1**: @username_0 anyone watching the blockchain for payments to your service could also send a message claiming they own that deposit, so this doesn’t solve the issue of proving ownership of a deposit. The method @ TEV suggested would work, but I don’t know of any wallet that will decrypt messages encrypted with a bitcoin public key. Importing a private key into some other cryptographic software to deal with the decryption creates risks for your customer, so I think using the message signing functionality is a better solution  
> **username_0**: @TEV thanks this is super helpful.  I want to go with bitcoin so I think assigning a different address to each customer will be the most secure and easiest ux solution  
> **username_1**: @TEV I didn’t know electrum has that functionality! My mistake, thanks for clarifying.  
> **username_0**: Hit a hurdles with unique addresses for customers integrating into our app without a lot of reinvention of the wheel....what about a slight variation on above...i) customer messages id# (x = id)  ii) we message back y id# (x + y = PIN) iii) customer makes deposit and messages deposit amount and their PIN  iv) Customer can only access account if they have PIN.  Since PIN is generated before deposit anyone following block chain will only see deposit amount but not have PIN to use.  Practical issues,  logic flaws, other flaws in approach...THXS!  

---

