Friday, March 14, 2014

Interesting addresses on the blockchain

The technical bit

A quick recap:
  • Your bitcoin wallet consists of pairs of private/public keys.
  • Each private key is a 256 bit number between 1 and about (1.15 times 10 to the power of 77). Note that this is slightly lower than 2 to the power of 256.
  • The public key is generated from the private key using the "Eliptic Curve Digital Signature Algorithm", or ECDSA.
  • The Bitcoin address is generated by a series of hashes (called SHA256 and RIPEMD-160), a checksum and finally encoding into Base58.
  • The private key is used to sign any transaction transferring bitcoins from the bitcoin address associated with it to any other valid bitcoin address.
  • The public key can be used to check that the private key signature of the transfer is valid; this is done by the bitcoin miners before adding the transaction to the blockchain.
  • Once a transaction is added to a block in the blockchain it's finalized and can be spent (okay, in practice you need a few more blocks to add on afterwards to really finalize it - the block could be invalidated shortly afterwards. 6 further blocks is considered rock-solid confirmation).
So here is where the fun begins - lets take a test engineer approach to analyzing it.


What happens if you send bitcoins to a random address

If you simply invent a bitcoin address, like 1NyUkGNxZ1RoKmRUPYJBgouS1nJneDX6, the checksum shows that it's invalid, so the coins won't be sent.

If you accidentally pick a valid address, the coins are gone - no one will ever be able to spend them. The odds of someone having the private key to a random valid public bitcoin address are lower than you finding a specific grain of sand that was briefly stuck to your foot on the first day of your first beach holiday abroad.


The bitcoin address associated with a private key of 0

If you pick 0 as your private key (e.g. through programmer error) then the ECDSA algorithm returns a public key of 0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. The bitcoin address generating algorithm, when applied to this public key returns an address of 16QaFeudRUt8NYy2yzjm3BMvG4xBbAsBFM which at the time of writing this post has a balance of 0.01 bitcoins.

This sum can never be redeemed, as 0 isn't a valid private key and can't be used to sign the transfer transaction.

The blank bitcoin address

If you apply the bitcoin address generating algorithm to a public key that is null (i.e. the empty string), it returns a valid address. This could happen if there's an error in your software that doesn't pass the correct public key on to the bitcoin address generating algorithm in your code. The valid address returned is 1HT7xU2Ngenf7D4yocz2SAcnNLW7rK8d4E. This currently has nineteen transactions paid into it to a sum of almost 70 bitcoins - worth nearly 45,000 USD at the moment.

Unfortunately these coins can never be redeemed - there is no private key that returns a blank public key.

Obvious private keys

Here are some private keys with addresses that had a balance at some point, that I found.
Key 1, address 1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm has had about 4.2 bitcoins over the years. There are several people monitoring it and transferring any balance within seconds if any is paid in.
Key 126, address 163bgHt747rfMKf7tM6XEoCzhKbvrYgZ6N had a small fraction of bitcoin paid into it once.
Key 2²⁵⁶-1, address 12M4QznuNZH2BRVbLK8SKvNqGTPJpCpST7 has had about 0.005 bitcoin. Technically speaking the key is invalid - it's too big, but in practice all code performs a modulo operation on it to reduce it's size.
Key (biggest valid ECDSA key), address 1JPbzbsAx1HyaDQoLMapWGoqf9pD5uha5m has also been used a few times.

Brain wallets

Some bright spark noticed that if you take a SHA256 hash of some text you get a 256 bit number, which can be used as a private key. So people started using phrases as passwords to "carry" their bitcoins around in their head. Unfortunately brute-forcing these kinds of passphrases is far too easy, so I wouldn't recommend it. Here are some passphrases that have addresses which had balances at some point:

Key SHA256("password")
Key SHA256 ("password1")
Key SHA256("correct horse battery staple")
Key SHA256("you don't win friends with salad!")
Key SHA256("bitcoin is awesome") - 500 bitcoins taken from this one, that's a third of a million dollars today
Key SHA256("satoshi nakamoto")

And that's it for today.

Saturday, March 8, 2014

Satoshi has been uncovered ... again.

Once again there's an article proclaiming that the mysterious founder of Bitcoin has been discovered. Amusingly, this candidate actually has the given name Satoshi Nakamoto, but now calls himself Dorian Nakamoto. However, the evidence is all circumstantial - the 64 year old man living in Temple City, California, could technically be the Bitcoin inventor; by all accounts he has the aptitude and the attitude, he was unemployed for five or so years leading up to the publishing of the original Bitcoin paper, and fell ill at about the time that Satoshi Nakamoto bowed out from developing the Bitcoin client further.

However, he denies that he is the founder, lives a relatively humble life, could do with the money that the million or so Bitcoins the real founder has presumably got access to, and his command of the English language appears to be much weaker than that of the writer of the original paper and bulletin board posts. Also, there's plenty of evidence that the real Bitcoin founder was paranoid about protecting his identity, so he's very unlikely to have used his own name in his dealings with the world.

My gut feeling is that he isn't the founder, although that may be wishful thinking on my part. But the coincidences add up to a fairly compelling story. I'd like to think that the real Bitcoin founder has thrown another red herring in our direction, and I'd be looking for a former associate of Dorian Nakamoto, who used the identity of his colleague as another layer of misdirection.

What do you think?

Update: even his own son describes Dorian S. Nakamoto as a bit of an "asshole". Perhaps the Bitcoin founder is indeed a previous co-worker who thought it would be an amusing to get a despised colleague to face a barrage of journalists.

Thursday, May 23, 2013

Getting paid in bitcoin

Here in Finland the tax authority (called Vero) keeps very close tabs on everyone's income. Banks report loan amounts and interest on savings directly to Vero. And Americans are usually shocked to find that everyone's earnings are publically available - that's right: provided you speak Finnish you can look up how much your neighbour claimed to Vero that they earned, and how much tax they paid (and subsequently you can shop them in to the authorities if they bought sports cars and foreign holidays whilst declaring a low income).

Let's forget about clandestine payments for a moment (in any case they are trickier than the media seems to think, and company accounts are in any case transparent up here).

So, if people start getting paid in bitcoins, what are the Finnish tax authorities going to do? Presumably they're going to demand that

  • Bitcoin amounts earned are declared along with the euro to bitcoin rate on the date of payment
  • Income taxes are paid on that amount
  • When bitcoins are converted to euros, any profits are taxed at capital gains rates
  • And alternately, any losses can be offset against other tax payments
But what happens if the bitcoins are never converted to euros, and are used to purchase goods instead? Someone might be paid 100 BTC today, at 100 EUR/BTC, and use them in 5 years time to buy a high performance sports car if the new rate is 10,000 EUR/BTC at that point. And Vero are going to want their share of the profits...

The only feasible solution I can see is for governments to move away from income tax and capital gains taxes, to a purely "value added tax" or "sales tax" approach, with different rates for essential goods such as staple foods (sales tax free?) and 50 foot yachts (50% 90%).

Tuesday, May 14, 2013

The perception of money

Back before I started looking in to Bitcoin, I'd watch television shows where gangsters or spies would be carrying around a suitcase filled with blocks of cash, and I'd think, "Wow, what a lot of money. That could get you a large house, or a sports car, or perhaps a small island off the coast of Greece."

Now when I see the same suitcase I can't help thinking, "Wow, a bunch of paper, printed by a government, valuable because people think it's valuable. And not as valuable now as it was when the program was being filmed."

Bitcoin has really damaged my suspension of disbelief. It's funny to think that for four decades I never really though about what cash actually was. Like most people, I just used it to buy groceries, and implicitly assumed it would be as valuable tomorrow as it was today.

That's why I think Bitcoin is going to be a game-changer: just like the internet, just like affordable cars, and just like the electric lightbulb. But with Bitcoin the real impact is yet to be seen.

Monday, May 13, 2013

"Pegging" Bitcoin to another measure of value

As the problem of Bitcoin's fluctuation in value over time continues to vex proponents of the cryptocurrency, I've seen several suggestions that Bitcoin should be "pegged to the dollar" or "pegged to gold".

What does it mean for a currency to be "pegged to gold"? It means that the government that backs the currency commits to exchange units of the currency for a fixed quantity of gold. This has a number of problems associated with it - the quantity of gold is relatively fixed (just like Bitcoins), but the government can always print more money. In practice the pegged currency has to be rather stable in the first place for the pegging to be successful, and the value has to be controlled carefully through printing more or buying it back with bonds.

And there we can immediately see the three problems in the "pegging" solution proposed for Bitcoin - a) you can only peg a non-volatile currency, b) you need to be able to control the production of the currency to affect its value and c) you need a backer who guarantees to exchange the currency for the item it's pegged to, and holds significant quantities of the item in store.

Bitcoin satisfies none of these.

Friday, May 3, 2013

What Bitcoin really needs to take off ...

Mt Gox gets slapped with a law suit by Coinbase, and the value of Bitcoins drops by 50%. The fact that Bitcoin's price (not value, note) is so dependent on one exchange is becoming a real problem, although there are probably some people making a fortune of the vast fluctuations. However, they're gamblers or insider traders. For the rest of us it's a dark art, and it's disturbing.

As I see it, there are two things that need to happen in the near future.

1. An established share trader like etrade.com needs to start offering a Bitcoin exchange. It should be trivial for them to set something like that - Bitcoin is still small potatoes compared to the trade volumes they handle, and their existing software and servers should be easy to convert to offering a Bitcoin exchange service.

2. A large generalised online retailer needs to start accepting them. If PayPal (and hence eBay) really takes them onboard, as was recently reported, or Amazon, or a far eastern retailer like Alibaba, then people can actually start buying stuff with them

At that point I would expect the value of one Bitcoin to steadily rise and rise and rise.

(I sold my Bitcoins at $138 a while back, watched the price rise, panicked and then bought them all back at $132. If only I'd waited one day more, I'd have 50% more. Oh well.)

Friday, April 26, 2013

Bitcoin in the eyes of the establishment...

From http://www.ft.com/intl/cms/s/0/55733b80-addf-11e2-a2c7-00144feabdc0.html

... at the New York branch of the Federal Reserve, which held a gathering this week for some of the grandees of financial regulation. When one person asked if Bitcoin could become a viable unit of international exchange, participants burst out laughing.

I actually find this rather encouraging for Bitcoin. Record executives had the same opinion about mp3s, back in the early days. Similarly, the world wide web was considered a "flash in the pan" by those who should have known better.