Bitcoin over Tor isn't a good idea
arxiv.org
arxiv.org
What worries me most about Tor is that people do not realize how trivially an exit relay can MITM your traffic. The value proposition of Tor is NOT keeping all your traffic safe. It's anonymizing your traffic from end to end, so that nobody who sees your data knows both where it came from and where it's going. They can still see the data itself.
For all intents and purposes, traffic from Exit -> Internet is plaintext. The relay operator can MITM it. Tor is only safer than a VPN or proxy because the exit relay does not know your identity. It can still access the data you transfer through it. [4]
Anyone can start a Tor exit relay, and setting up a MITM proxy on it is trivial. Siphoning bitcoin transactions is equally trivial. Just listen for the proper traffic patterns.
You should not be transferring any business-critical data over Tor. It's a great tool for protecting your identity, but not your data.
With HTTPS, you're relatively safer, since you'll get an alert if a relay is MITM'ing you and modifying the certificate. But with plain HTTP, you won't even know when you're getting MITM'd.
More Resources:
[1] http://security.stackexchange.com/questions/34804/how-safe-i...
[2] https://blog.torproject.org/category/tags/mitm (includes links to research papers)
[3] https://www.petsymposium.org/2014/papers/Winter.pdf
[4] Emphasis on "for all intents and purposes." Not a true statement universally.
Transactions need to be signed by the holder of the private key to the inputs. A MITM attacker still does not have access to any keys.
If it was that easy, bitcoin would be worthless.
I'm not worried about the transactions themselves, as they appear on the blockchain. What worries me is the "meta transactions", if you will. The Bitcoin ecosystem is full of off-blockchain transactions. For example, mining pools use their own communication mechanisms, which the BGP attack this summer exploited. Also, dozens of exchanges, marketplaces, and services rely on HTTP API's for transacting. Even if the blockchain is not vulnerable, the external transactions that reference it certainly could be.
Imagine how many "send X bitcoin from wallet Y to wallet Z" requests route over HTTP. Quite a few.
So yeah, not "trivial" as I said. But certainly not impossible.
(Welcome to HN! I'm glad my mistake brought you out of the woodwork.)
And to further your point, it appears this guy (https://www.reddit.com/r/Bitcoin/comments/2k38ta/my_wallet_w...) just got his coins stolen by using blockchain.info over TOR.
However, I still believe nothing is fundamentally broken. Any important protocol should be using SSL - especially when operating over TOR. Lapses like this are still simply user error.
Tor project has a project that sends out probes to identify rouge nodes, so the trivial and obvious form of MITM that changes data en-route are equally trivial caught and blacklisted. People should still be aware that sending secret data in plaintext on any network is a bad idea tm, but any security analyst need to incorporate the whole picture.
Would using a VPN together with Tor be able to provide 'the best of both worlds', so to speak? Would you be able to encrypt your data via a VPN node and use Tor through that encrypted connection?
I assume this would solve the matter of your traffic being visible to whoever is running the Tor relay, but it be possible for the VPN operator to (potentially and hopefully hypothetically) still perform an MITM attack on your traffic?
And lastly, is there a truly practical way to be not only anonymous but also secure (i.e. encryption)?
I hope that made sense.
Well that seems a bit odd.
Although I understand it to an extent. The core of software wouldn't be the core if it wasn't always used.
Unfortunately bc.i's implementation/instance is not immune to bugs, forking, lying or collusion. I don't know why you would expect it to be.
Say you were writing a client in a different language or for another platform.
https://en.bitcoin.it/wiki/CVE-2010-5139
Another interesting case is when bitcoind 0.8 changed the underlying database from BerkeleyDB to LevelDB. Due to different database lock limits, bitcoind 0.7 couldn't process a block that bitcoind 0.8 could. For 6 hours, there was a fork where old clients were using a totally different blockchain than new clients, because of this single block they couldn't handle. This is what patio11 means, that you have to be bug-for-bug compatible with the reference implementation.
http://bitcoinmagazine.com/3668/bitcoin-network-shaken-by-bl...
That was in 2010. Most of the users take certain level of risk, also different kinds of people have different risk appetite. If you really think this is still a relevant risk, then probably you shouldn't use cryptocurrencies at all. Stay with the safe and proven almighty dollar.
For this kind of problem, the easiest solution (when possible) is to extract the "rules engine" component of the reference implementation into a library, and then have every other client just use it (and maybe contribute to its development) instead of trying to write something bug-for-bug compatible with it.
When you think about it, web browser rendering has much the same implementation-consensus problems as Bitcoin. And what do we see there? Everyone sort of converging toward just using the "rules engine" known as WebKit.
Everything known about Bitcoin comes from people directly reading the source code. That's all that was originally released next to the paper. Everything since then has been based on careful review of the source code and writing additional documentation from that understanding.
Edit: the documentation (that your reply is referring to) exists now because people spent the time reading the source code. This documentation didn't exist originally.
If there had been a formal specification, I imagine they would have both analyzed the specification for vulnerabilities, and checked the code for correct implementation.
Also, the Bitcoin Wiki itself is a fairly comprehensive source of documentation (and covers most of the information in the "official" documentation). It even includes an informal protocol specification[1]. It's been around for a very long time.
That said, the information they're referring to is Bitcoin's Tor support (like recognizing OnionCat addresses). I don't think there is much documentation on this specific topic. However, Bitcoin is an open source project and I'm sure any related documentation contributions would be welcome.
I should add I learned that the hard way trying to integrate Tor with OpenBazaar.
What might be fun is stenography over the Tor protocol. Anybody interested?
[0] https://github.com/TheTorProject/stegotorus [1] https://github.com/SRI-CSL/stegotorus
> It turns out that by exploiting a Bitcoin built-in reputation based DoS protection an attacker is able to force specific Bitcoin peers to ban Tor Exit nodes of her choice.
Section VII lists some countermeasures.
Very happy to see academics having an increasing interest in this area.
I also wasn't aware that Tor hidden services can be "blackholed" so easily (it sounds like this is probably well known to regular Tor users, though).
Wonder if that has anything to do with this research, or if someone else has independently arrived at the same result?
[0] http://www.reddit.com/r/Bitcoin/comments/2bwds2/what_does_th...
Bear in mind that we can detect when a node does this, by monitoring it, and measuring whether blocks or transactions are withheld, kind of like in this paper: http://www.cs.kau.se/philwint/spoiled_onions/techreport.pdf