Satoshi MailBeta Open in Satoshi Mail

A few thoughts...

Private email with Dustin Trammell · 4 messages · from 15 January 2009 · with Dustin D. Trammell, Satoshi Nakamoto

Read in Satoshi Mail Archive source

Dustin D. Trammell to satoshi@vistomail.com · · original
I'm glad to see you considered the possibility of a BitCoin client making a payment to itself and have an appropriate description in the transaction log (: I did this primarily so that I could get a packet capture of the network traffic during a transaction to analyze. Without knowing your packet structure, I only see a bit of cleartext information in the packets, mostly just what is shown in the transaction detail such as name and comments. There are a couple of other strings that show upon the wire such as 'version' and 'reply', but the rest is pretty cryptic. While pondering transactions, I realized that there is no identifiable information involved other than an IP address or a BitCoin address. In the case of the IP transaction, the BitCoin client seems to trust that the IP that it has connected to really is the intended recipient of the transaction. It is fairly trivial to launch a man-in-the-middle attack and steal incoming transactions. Consider the scenario where a co-worker and myself have our workstations on the same LAN. Being nefarious, I could be ARP poisoning the local broadcast domain and routing all traffic destined for his workstation through my workstation as an intermediary. Both of us, not being good employees, play the MMORPG-du-jour and like to buy and sell game items using BitCoins. I could easily watch for incoming connections on TCP port 8333 and terminate them at my workstation rather than passing those particular connections on to his workstation. A bit convoluted, yes, but it illustrates the point. This type of attack could be performed at any hop along the route between the two transacting parties. If I were an evil admin at Big ISP USA, well, you get the idea. I would recommend not allowing the use of network addresses as the address of an intended recipient. I would think it would be a bit more secure to always require a BitCoin address and do transactions that way. If I understand how that is done correctly, you just compute the transaction into the block chain and let the intended recipient 'discover' it, correct? An alternative could be to allow the network nodes to provide a resolution service, where they ask around for the network address of a BitCoin address, and if that node is online, once a consensus is agreed upon by the network for that address the sending BitCoin application connects directly there. Because the BitCoin addresses are tied to the keys of the node, I would think that some method could be devised to prove ownership of that BitCoin address by the sending node and not to proceed with the transaction if so. At the very least I would recommend, if you intend to retain the recipient addressing by IP method is to allow for matching a hash of a shared secret between the parties or something that an intermediary would not know, but since you have the crypto in place, keys generated, etc. anyhow, using that would be a much stronger solution. Or am I over-thinking this and the network connection is just to send immediate notification of the transaction and context information such as the comment? The BitCoin application mentioned getting the recipient's public key and a few other things, and there seems to be a lot more going on in the network traffic than what would be required for a simple notification. Talk to you soon, -- Dustin D. Trammell dtrammell@dustintrammell.com http://www.dustintrammell.com
Satoshi Nakamoto to dtrammell@dustintrammell.com · · original
I group attacks into two classes: 1) Attacks that can only be done by someone actually in the chain of communication 2) Attacks that can be done by anyone on the Internet from anywhere Type 1 exposes you to people in your house or company on your local LAN, admins at ISPs in between, and the LAN on the recipient's side. Type 2 exposes you to a billion people who can self-select to be attackers and get economy of scale when they develop one technique to attack multiple victims. Sending by IP requests a new public key, so yes, it's vulnerable to type 1 man-in-the-middle. If that's a concern, sending to a Bitcoin address doesn't have that vulnerability, although there's a small privacy tradeoff. I have a feeling most of the time people will get Bitcoin addresses off of non-SSL websites and unsigned cleartext e-mail, which is already vulnerable to type 1 and type 2 through DNS poisoning. One solution would be to use both the IP and Bitcoin addresses when sending (maybe 1.2.3.4-1Kn8iojk...), where the recipient uses the public key of the Bitcoin address to sign the new public key to prove that you're sending to who you think you are. If the system starts to be used for real business purposes, I will certainly implement that. Another solution is to use SSL. For now, it's pretty obvious that if you send to an IP, you didn't give any other identifying information about the recipient, so you're blindly sending to whoever answers that IP. Another feature for later is an option to encrypt your wallet.
If I understand how that is done correctly, you just compute the transaction into the block chain and let the intended recipient 'discover' it, correct?
That's correct.
An alternative could be to allow the network nodes to provide a resolution service, where they ask around for the network address of a BitCoin address, and if that node is online, once a consensus is agreed upon by the network for that address the sending BitCoin application connects directly there.
It would be nice to only need the Bitcoin address and have the IP worked out behind the scenes. Might have privacy or denial of service issues. Certainly before another sending method is implemented, there's plenty of time now to fully think through the design and make sure it's the best way. Satoshi
Dustin D. Trammell to satoshi@vistomail.com · · original
On Fri, 2009-01-16 at 03:42 +0800, Satoshi Nakamoto wrote:
Sending by IP requests a new public key, so yes, it's vulnerable to type 1 man-in-the-middle. If that's a concern, sending to a Bitcoin address doesn't have that vulnerability, although there's a small privacy tradeoff. I have a feeling most of the time people will get Bitcoin addresses off of non-SSL websites and unsigned cleartext e-mail, which is already vulnerable to type 1 and type 2 through DNS poisoning.
True, but the upside to using the BitCoin address is that two people can communicate via a number of different channels to verify the address. If my friend gets my address off my website, and thinks something fishy is going on, he can call me, or IM me, or email me, etc. to verify the address. An attacker would then have to basically be replacing my address with the malicious one in every possible communications channel, including voice, which is a difficult feat. MITMing the direct communication via network addresses doesn't have that benefit because the attacker is spoofing the address or intercepting. My friend can verify what my address is with me in the same ways, however verifying the address doesn't actually improve the situation.
One solution would be to use both the IP and Bitcoin addresses when sending (maybe 1.2.3.4-1Kn8iojk...), where the recipient uses the public key of the Bitcoin address to sign the new public key to prove that you're sending to who you think you are. If the system starts to be used for real business purposes, I will certainly implement that. Another solution is to use SSL.
That is a good solution. If you transact regularly you probably already have the other person's BitCoin address in your address book.
Another feature for later is an option to encrypt your wallet.
One thing that came to mind on this topic is the potential for BitCoin loss if you have a system failure. The application doesn't seem to store any data in the directory that it runs in, so I assume it's stored in the registry and other places (haven't cracked out ProcessExplorer yet to check myself), so it may be a good idea to have the application be able to export everything that it needs for recovery to a file that could be backed up off of the system.
It would be nice to only need the Bitcoin address and have the IP worked out behind the scenes. Might have privacy or denial of service issues. Certainly before another sending method is implemented, there's plenty of time now to fully think through the design and make sure it's the best way.
You could always make that optional, such as a toggle that says 'Advertise my BitCoin address to the network' that the user could turn on or off. If you're not found on the network when searched for by BitCoin address, the transaction is inserted into the block-chain as normal. If you are, the transaction meta-data could be communicated to the network address. One other thing I noticed today is that if you close the application it doesn't appear to cleanly close it's network sockets (TCP RST's start flying). Probably an item for the low-priority todo list (: Talk to you later, -- Dustin D. Trammell dtrammell@dustintrammell.com http://www.dustintrammell.com
Satoshi Nakamoto to dtrammell@dustintrammell.com · · original
One thing that came to mind on this topic is the potential for BitCoin loss if you have a system failure. The application doesn't seem to store any data in the directory that it runs in, so I assume it's stored in the registry and other places (haven't cracked out ProcessExplorer yet to check myself), so it may be a good idea to have the application be able to export everything that it needs for recovery to a file that could be backed up off of the system.
The files are in "%appdata%\Bitcoin", that's the directory to backup. The data is stored in a transactional database DBM, so it should be safe from loss if there's a crash or power failure. %appdata% is per-user access privilege. Most new programs like Firefox store their settings files there, despite the headwind of Microsoft changing the directory name with every Windows release and being full of spaces and so long it runs off the screen.
One other thing I noticed today is that if you close the application it doesn't appear to cleanly close it's network sockets (TCP RST's start flying). Probably an item for the low-priority todo list (:
Just now added code to the next release for that. Satoshi