<p>Based on the links in <a href="https://bitcoin.stackexchange.com/a/11852/1137">spuder's rather brief answer</a> and also taking care of a rare restriction:</p>

<p>As <a href="https://en.bitcoin.it/wiki/Private_key" rel="nofollow noreferrer">the Private key bitcoin wiki entry</a> states,</p>

<blockquote>
  <p>any 256-bit number between 0x1 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4141 is a valid private key</p>
</blockquote>

<p>Therefore, in order to have the bitcoin network timestamp a message, one can proceed like this:</p>

<ol>
<li><p>Use a 256 bit hash, usually SHA-256, as a private key⁺ that one imports into one's bitcoin wallet</p></li>
<li><p>Transfers a small amount of bitcoins to the corresponding address and swiftly afterwards back to your own account. Since this is a fresh bitcoin address, you might have to pay a fee for this transfer unless you can afford to wait for some time</p></li>
<li><p>Once the transaction back to your own account has been confirmed, publish your message and one of the two transaction ids. Everyone can now easily verify that your message's hash yields a bitcoin address that was used at the time you claim to have published your message. Be aware that since anyone with access to your message can therefore simply reconstruct also the <em>private</em> key, so be sure to have no funds left there!</p></li>
</ol>

<hr>

<p>In fact, that caveat of having to wait until you transferred the funds back to an account the private key of which is secret can be easily circumvented: Instead of a simple transaction, transfer funds to a <a href="https://en.bitcoin.it/wiki/Raw_Transactions#Multisignature_transactions" rel="nofollow noreferrer">2-of-2 multisignature transaction</a> that needs to be signed both by the hash "private" key and one of your truly secret private keys. Now you can leave the funds on that transaction until you want to spend the bitcoins for another purpose without having to fear someone else can spend it. However, keep in mind that currently no client seems to have any intuitive way of creating or spending multisignature transactions!</p>

<hr>

<p>⁺ In the <em>very rare</em> case that hash is outside the permitted range (less than 2¹²⁸ of the 2²⁵⁶ possible values), one additionally has to do something, e.g. wrapping into the valid range via</p>

<pre><code>min_val = 1
max_val = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
priv_key = ((sha256(message) - min_val) % (max_val - min_val)) + min_val
</code></pre>

CC BY-SA 3.0
2014-01-28T12:10:55.240Z
2014-01-28T12:10:55.240Z
2017-04-13T12:47:33.283Z
Tobias Kienzler
<p>Yes, the bitcoin network can be used as a timestamping service</p>

<p>Here is an article about it
<a href="https://www.strongcoin.com/en/blog/using_the_blockchain_as_a_trusted_timestamping_service" rel="nofollow">https://www.strongcoin.com/en/blog/using_the_blockchain_as_a_trusted_timestamping_service</a></p>

<p>Here are additional instructions:<br>
<a href="https://bitcointalk.org/index.php?topic=52715.0" rel="nofollow">https://bitcointalk.org/index.php?topic=52715.0</a></p>

CC BY-SA 3.0
2014-02-04T18:43:26.167Z
Based on these links I [provided a more elaborated answer](http://bitcoin.stackexchange.com/a/21269/1137)
Tobias Kienzler
CC BY-SA 3.0
2013-06-26T23:58:19.960Z
2013-06-26T23:58:19.960Z
spuder
<p>Yes, but you only get a few bytes(not sure exactly how much, i think around 30, not even near a kilobyte for sure) per transaction, so the best way to go about it would be to hash your data first and then use that instead.</p>

CC BY-SA 3.0
2013-06-26T16:26:18.237Z
2013-06-26T16:26:18.237Z
7anner
<p>Does the Bitcoin protocol provide means to add some freely definable data to transactions such that a small transaction could actually be used to timestamp arbitrary data?</p>

<network><timestamp>
Can the Bitcoin network be used as a timestamping service?
Tobias Kienzler
# Can the Bitcoin network be used as a timestamping service?

(Asked by: username_0 on 2013-06-26)

Does the Bitcoin protocol provide means to add some freely definable data to transactions such that a small transaction could actually be used to timestamp arbitrary data?

**Tags:** network, timestamp


---

## 3 answers

### Answer by username_0 on 2014-01-28. Score: 0 | Accepted answer

Based on the links in [username_1's rather brief answer](https://bitcoin.stackexchange.com/a/11852/1137) and also taking care of a rare restriction:

As [the Private key bitcoin wiki entry](https://en.bitcoin.it/wiki/Private_key) states,

> any 256-bit number between 0x1 and 0xFFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4141 is a valid private key

Therefore, in order to have the bitcoin network timestamp a message, one can proceed like this:

1. Use a 256 bit hash, usually SHA-256, as a private key⁺ that one imports into one's bitcoin wallet
2. Transfers a small amount of bitcoins to the corresponding address and swiftly afterwards back to your own account. Since this is a fresh bitcoin address, you might have to pay a fee for this transfer unless you can afford to wait for some time
3. Once the transaction back to your own account has been confirmed, publish your message and one of the two transaction ids. Everyone can now easily verify that your message's hash yields a bitcoin address that was used at the time you claim to have published your message. Be aware that since anyone with access to your message can therefore simply reconstruct also the *private* key, so be sure to have no funds left there!

---

In fact, that caveat of having to wait until you transferred the funds back to an account the private key of which is secret can be easily circumvented: Instead of a simple transaction, transfer funds to a [2-of-2 multisignature transaction](https://en.bitcoin.it/wiki/Raw_Transactions#Multisignature_transactions) that needs to be signed both by the hash "private" key and one of your truly secret private keys. Now you can leave the funds on that transaction until you want to spend the bitcoins for another purpose without having to fear someone else can spend it. However, keep in mind that currently no client seems to have any intuitive way of creating or spending multisignature transactions!

---

⁺ In the *very rare* case that hash is outside the permitted range (less than 2¹²⁸ of the 2²⁵⁶ possible values), one additionally has to do something, e.g. wrapping into the valid range via

```
min_val = 1
max_val = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
priv_key = ((sha256(message) - min_val) % (max_val - min_val)) + min_val

```


---

### Answer by username_1 on 2013-06-26. Score: 2

Yes, the bitcoin network can be used as a timestamping service

Here is an article about it
<https://www.strongcoin.com/en/blog/using_the_blockchain_as_a_trusted_timestamping_service>

Here are additional instructions:  
<https://bitcointalk.org/index.php?topic=52715.0>

> **Comments:**
> **username_0**: Based on these links I [provided a more elaborated answer](http://bitcoin.stackexchange.com/a/21269/1137)  

---

### Answer by username_2 on 2013-06-26. Score: 1

Yes, but you only get a few bytes(not sure exactly how much, i think around 30, not even near a kilobyte for sure) per transaction, so the best way to go about it would be to hash your data first and then use that instead.


---

