Is it wrong to spend Bitcoin from someone else's wallet if my Bitcoin client generates the same address? I know this scenario is extremely unlikely but what-if by chance I get the same Bitcoin address as another user and the user has hundreds or thousands of Bitcoins in his wallet, is it morally/legally acceptable to spend the money from this wallet? Would you say it's considered stealing or do I now have equal ownership of the wallet just as the original owner?

My first impression was that it's the wrong thing to do. However, perhaps because Bitcoin inherently allows for this possibility (by design) one might argue that by using Bitcoin, one understand the risks associated with using Bitcoin and agrees to share the coins if such a thing did occur.

I'm interested in knowing the Bitcoin communities' take on this.
However, perhaps because Bitcoin inherently allows for this possibility (by design)


I would dispute that.  A fundamental tenet of cryptography is that "extremely unlikely" is effectively the same as "impossible".  Bitcoin has been carefully designed so that this should never happen by chance.  And people definitely don't use Bitcoin with the assumption that there is a meaningful chance of someone else taking their coins through this route.  There is certainly no implied consent.

In fact, I think that it's meaningless to discuss the ethics of what to do if you accidentally generate the same key as someone else.  To me, it's like asking whether it would be ethical to kill a time traveler.  Maybe the discussion helps you think about ethics, as a thought experiment, but it has no practical relevance, because it's about a situation that fundamentally can never happen.

In practice, if you ever do generate an address that already exists, what it means is that both of you are using terrible random number generators.  Maybe one or both of you is doing so on purpose, suspecting that the other has a weak RNG and trying to exploit it.  So if it's not you that's intentionally trying to crack something, then throw away the software (or hardware) you are using, because it's horribly broken.  And do the rest of the community a favor and responsibly disclose the vulnerability, so that people know not to use it, and so experts can investigate the problem.  

In this case, you could of course take advantage of the other person and steal their coins.  But you'll know that it's not just random chance - you're actively exploiting a flaw in the software.  I think that would help most people realize that it's clearly unethical to do so.  (You could also transfer the coins to another address, so that they can't be stolen by someone else, and then try to get them back to the rightful owner.)

The other possible explanation for such an occurrence is that one or both of you has found a severe weakness in the cryptographic primitives used by Bitcoin.  This is similar to the previous case: responsibly disclose and don't steal anything.