Commit 7186a868 authored by Daniel Kraft's avatar Daniel Kraft

Add README file.

parent 54ded978
NameStamp -- Proving Namecoin Time-Stamps
Namecoin [1] is a general-purpose, decentralised name/value database. This
has a lot of useful applications, like .bit domains [2] or online
identities [3]. In order to make this work, Namecoin uses the same
"blockchain" concept that powers Bitcoin. See, for instance, the original
Bitcoin whitepaper [4]. The fundamental achievement of the blockchain
is that it implements a decentralised and secure "time-stamping service".
NameStamp is a way to leverage Bitcoin's time-stamping ability.
What is time stamping and why is it useful?
"Time stamping" is the process of creating a proof that something (in
particular, a digital file) existed at some point in time. This can be very
useful in a lot of situations. For instance, to prove authorship of some
manuscript, song or other digital work: If you create a time stamp before
you publish the work and then someone tries to "steal" it, you can use the
time stamp to prove that you had the piece before everyone else. Or, if you
rent a flat (could also be a car or something else, it does not really matter),
you can take pictures of any damage present and time-stamp it. This allows
you to prove later on that you were not the originator of the damage, since
it was already present on the date when you moved in.
How is this related to Bitcoin?
Bitcoin creates digital money. Ownership of a particular balance is proved
using asymmetric cryptography. In other words, if you own some bitcoins
and want to send them to Alice, you write a message saying
I want to transfer X bitcoins out of my balance Y to Alice.
and sign it with your private key. Then you broadcast the message to the
Bitcoin network, and every participating node can process the transfer if
your signature matches the owner of "balance Y". However, a major difficulty
in systems like this is double-spending: In addition to your message above,
you could also create a message that spends the very same balance to Bob
(or even back to yourself!). In this situation, the network needs a way to
determine which of the two transactions is the "correct" one. A simple
rule to determine this is to "use the earlier transaction". However, for this
to work, one needs a way to determine an absolute order of events on which
the network agrees upon.
This is the point where Bitcoin's time-stamping scheme comes in: Roughly
speaking, all transactions are grouped into "blocks". The blocks themselves
form a "hash chain", which implies that earlier blocks can not be manipulated
without invalidating the whole chain. A particular process, called "mining",
is then employed to reach consensus about the correct chain. This leads
to an absolute order of blocks, which is almost impossible to change
afterwards. Since each block contains a real-world time, these blocks can
also be interpreted as time stamps of the data contained in them (as well as
all previous blocks of the chain).
Namecoin time stamps
While Bitcoin is, of course, designed to be money, the system can be "hacked"
to include time stamps of actual data. One service that allows this is
"Proof of Existence" [5]. Namecoin, on the other hand, is specifically
designed to store arbitrary "data". Thus, it is particularly well-suited
also to store time stamps. Instead of crafting particular transactions that
look like sending money but instead contain data, you can just include your
data per design into a name's value! Since Namecoin has a blockchain
similar to Bitcoin's, the same time-stamp process secures the data afterwards.
However, one can still argue that Bitcoin is the most secure blockchain
in existence, and that Bitcoin has a better chance of surviving throughout
the coming years than Namecoin has. (While I believe that both systems
will survive and be of great use, I also think that this argument is justified.)
Fortunately, Namecoin is merge-mined with the Bitcoin blockchain: This means
that Bitcoin miners can also mine Namecoin, without any additional cost.
Currently about half of all Bitcoin miners makes use of this possibility.
The way in which merge-mining works ensures that Namecoin blocks are, in some
sense, regularly included into the Bitcoin blockchain. In other words,
even if you use Namecoin to time-stamp your data, a hash chain will eventually
exist that links your data back to Bitcoin itself!
So what, finally, is NameStamp?
This is the point where NameStamp finally comes in: It is a simple utility
that allows you to extract the particular details of this link. In other words,
if you have data time-stamped into the Namecoin blockchain, you can use
NameStamp to explicitly find and "construct" a proof that links this data
to a Bitcoin block hash. This block hash, in turn, has a very securely
defined time stamp in the Bitcoin system, which is independent of Namecoin.
To do just that, you have to have a Namecoin transaction that sets some name
to your desired data. If TXID is the transaction id, you then simply call:
$ TXID >
If everything goes well, this writes the "proof" to the given output file
( in the example). The proof is just a simple Python script that takes
your input data and hashes it together with constants in a particular way
until it arrives at a Bitcoin block hash. This script is relatively easy
to review, so that one can, indeed, check that the Bitcoin block hash produced
"contains" information about your data. This, in turn, shows that your data
must have existed before the particular Bitcoin block!
Notes about using NameStamp
In order to use NameStamp, you need to have both a Namecoin and Bitcoin client
installed and with their REST API enabled. This means that you need at least
Bitcoin version 0.10 as well as Namecoin Core. Set "rest=1" in the config
files of both clients, or run them with the "-rest" flag. Namecoin (but not
Bitcoin) also needs "txindex=1".
The ports at which NameStamp tries to access the APIs are hardcoded in the
script. This should be fine as long as you do not use non-standard
"rpcport"s. If you do, just edit accordingly and set your
value at the top.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment