Experiments · Nobody Owns Money · Chapter 3

SHA-256 in your browser: mine a Hashcash stamp

Theme
Try itA Hashcash stamp
Adam Back’s puzzle in the browser. The browser itself computes the letter’s SHA-256. Mining runs through counters until the hash starts with enough zeros. Checking the stamp takes one hash.

Everything is computed in your browser; nothing is sent anywhere.

About this experiment

Hashcash was invented by the British cryptographer Adam Back in 1997, against spam. Before a letter went out, the sender’s computer spent a few seconds on a pointless puzzle and attached the solution. A few seconds per letter cost an ordinary person nothing; for someone sending millions of letters the work would have taken a whole farm of computers. The recipient could check the solution instantly.

Eleven years later Satoshi Nakamoto took the puzzle. In his nine pages proof of work came from Hashcash, and he cited it, only for bitcoin the puzzle is far heavier: the network as a whole finds a solution about once every ten minutes.

Here you can do it by hand. Your browser computes the SHA-256 of the letter plus a counter as you type, on your own computer, and sends the text nowhere. Mining runs through counters until the hash starts with the chosen number of zero bits. Each extra bit doubles the work, and checking stays one hash. Change one letter and the stamp stops fitting.

From the book

Nobody Owns Money · Chapter 3

The Idle God

Next to this experiment in the chapter
There was almost nothing new in the nine pages. Proof of work came from Adam Back’s Hashcash, the idea of money kept by the whole network from Wei Dai’s b-money, and Satoshi honestly cited both. Digital signatures, hash functions and peer-to-peer networks were by then studied from textbooks. What was new was the way of putting these parts together so that strangers who don’t trust one another could agree among themselves which version of the shared record was correct.

The first chapters are free →