5

Let's say Alice wants to send Bob some coins. Bob needs to tell Alice where to send them, so he sends his address to Alice. How does Bob send this address so that Alice knows that the address she is receiving is indeed Bob's address and not an Eve's (an eavesdropper) who wants to steal the coins?

1
  • 2
    What is the difference between Bob and Eve? That is, what does Alice know about Bob that makes Bob the person she wants to send to? Commented Mar 18, 2012 at 20:03

4 Answers 4

4

The problem itself is not Bitcoin-specific per se. It's a matter of being able to verify the sender of some data. Bitcoin addresses are only designed to be immune to typos (they contain a checksum), but otherwise the protocol does nothing.

One can, however, do a couple things to make sure a proper address is sent and received:

  • One can use a vanity address that is hard to generate and clearly is related to the situation. Using 1Bob... would not be the best choice, but 1BobEveryman..., or 1ThankYouAlice... can be better (examples chosen for clarity, normally you'd be using base 58 alphabet). Generally, if it takes more than a couple minutes to generate an address you know it either came from the original sender, or someone deliberately wanted to steal Bob's identity (by spending a lot of time beforehand generating the address).
  • One can try checking the history of the address in the Bitcoin Block Explorer. If the address has been used a couple times, it is less likely it will be fake. Being Eve I probably wouldn't want to use the same address for scamming people more than once, and generating a history of transactions would take some time.
  • One can ask Bob to provide his Bitcoin address wrapped in Bob's digital signature. The main problem with this is securing Bob's signature in the first place, which is basically the same problem as we are solving right now.
  • One can look for address received on the internet. A lot of people have a habit of including the Bitcoin address they use in places like forum signatures, their websites and the like.
  • If Alice knows Bob, they might decide on using some information only they would know to create an ECDSA keypair and use that for transmitting Bitcoins. Such information might be for example be the movie they saw when they first met, some information from the school they attended and so forth. Generally, something that they remember and would be hard to find out. Alice can use that as the private seed of the keypair, generate the public address to send the Bitcoins to, and make the transfer. Bob then would have to repeat the same process and withdraw Bitcoins on their end. The main problem with this approach is whether Bob an Alice know each other beforehand and trust themselves with handling private keys.
  • When all else fails, one can always meet Bob in person and get their address that way.

All in all, there are many ways to prevent a man in the middle attack in the descried scenario.

3

Bitcoin doesn't currently provide any protection against that. Alice and Bob will need to make sure that their communication channel is secure.

7
  • So does that mean Bob would need to reveal his identity to Alice?
    – Alice
    Commented Mar 18, 2012 at 18:16
  • 2
    @Alice: If Bob hasn't revealed his identity to Alice, then why would Alice care whether she sends money to Bob or Eve? What difference does it make? What's special about Bob that makes him the one she wants to send money to? Commented Mar 18, 2012 at 20:03
  • @David Schwartz: The difference between Bob and Eve is that Bob is selling Alice something, e.g. socks. Bob and Alice both want to remain anonymous, but Alice wants her socks and will only get them if Bob gets the coins. I know that there is no customer protection (i.e. there's no guarantee that if you pay the right person that you will definitely get the items), but is there a way to guarantee that you are at least paying the correct person? What I'm really asking is: what is the protocol for sending addresses when transferring a coin?
    – Alice
    Commented Mar 18, 2012 at 21:41
  • 1
    @Alice: How do you know that Bob is selling socks? By what method could you know reliably that Bob is in fact selling socks at a particular price that wouldn't also communicate Bob's address to you? Wouldn't you just know that some unspecified person (which could just as well be Eve) is selling socks? So sending to Bob would be just as good as sending to Eve because, as far as you know, either one might be selling socks? I guess I don't get the circumstances at all. How do you know there is a "correct address"? Commented Mar 18, 2012 at 21:45
  • 3
    @Alice: How does she know whose address to request? I don't understand the circumstances. How does Alice even know Bob is selling socks without knowing Bob's address? She just knows someone is selling socks but has no idea who? Then the question has nothing to do with Bitcoin but is, how can Alice find out who is selling socks? (To me, the question makes no sense.) Where you say "I am selling socks, I need X bitcoins, ..." you can put your Bitcoin address. And if you could't trust that information, you couldn't buy the socks even if you knew the address, right? Commented Mar 18, 2012 at 23:03
1

The #bitcoin-otc marketplace uses GPG authentication to protect against this very situation.

Because irc nicknames are vulnerable to manipulation, the task of first authenticating with the channel's bot helps to ensure that the communications are truly from the intended trading partner.

This is just one method to address this subject. There are many options.

1
  • So is this a similar idea to Amazon's marketplace ratings, except with anonymous users sort of centrally authenticated?
    – Alice
    Commented Mar 18, 2012 at 21:57
1

If Alice met Bob through his website, https://bobbysox.com/, then she can be pretty sure that the address Bob displays on his site is real, so long as Bob's SSL certificate is verified successfully. For Eve to play woman-in-the-middle she would have to somehow get hold of a certificate for bobbysox.com, or Alice's browser will alert her to the fact that there's a problem with the secure connection. (Whether Alice takes any notice is another matter).

That's often how Bitcoin addresses are passed from merchant to buyer, via secure socket layer web connections.

Note: interestingly, when I click on that link I just made up, I see a warning: "The site's security certificate is not trusted!"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.