hivewallet / discussions

Discussions and issues related to Hive
https://github.com/hivewallet/discussions/issues
3 stars 2 forks source link

Identity and payment #10

Open javgh opened 10 years ago

javgh commented 10 years ago

I wanted to summarize some ideas we discussed earlier regarding identity and add my thoughts regarding the different options.

Obviously the question of identity comes up quickly when one tries to implement payments between "people", because the question is, how are these people identified and - more importantly - how do they find each other.

Identity systems that are already in wide-spread use are more helpful in this latter respect, as people already know their friends' identities on those systems. Examples for wide-spread identity systems would be:

Facebook and Google allow to leverage their identity systems with "Sign up with Facebook"-type mechanisms. In a discussion with Mike Hearn over in issue https://github.com/hivewallet/discussions/issues/5 I already listed some reasons why I am not in favor of social network integration. Specifically:

Personally, I don't like to link a bunch of stuff with my Facebook account, because then it becomes a single point of failure/attack for these things. [...] privacy concerns play into it as well for many people. So one might worry, for example, about Facebook knowing from whom I request money. Whether or not that would be the case in practice is irrelevant I think, because the decision will just be made on a vague feeling of "Facebook invades my privacy" and "I like to keep my finances private". That's just my guess though, we probably cannot really settle this for sure.

But I'm not against opening that discussion again.

Email addresses and phone numbers are kind-of "overloaded" identities. They have a core functionality (e.g. receiving email), but are then often used as identities within other systems. So for example Coinbase uses their users' email addresses as login names, so you can send bitcoins to "an email address", provided that person uses Coinbase and you do the transaction through Coinbase. But of course that's really "some.user@gmail.com @ coinbase.com" which would not necessarily be compatible with another Bitcoin wallet service that also provides an "send to email address" feature.

If one wanted to make "pay to email address" work in general, one would need to upstream that lookup to the actual domain. So that would require some kind of DNS extension, where you can ask the DNS server at gmail.com for a Bitcoin address for some.user@gmail.com . I think there have been many discussion about this on the Bitcoin mailing list, but they often ran into problems with DNS not being secure enough for that, even with DNSSEC, although I might be misremembering that. Regardless, it's probably a very long-term solution, which seems unlikely to happen anytime soon.

KNCWallet ( http://kncwallet.com/ ) is an example for an overloaded phone number, as they essentially use your phone number as an identifier in their system, which means you can find all your friends easily, at least if they use KNCWallet as well (the "Whatsapp approach", see also issue https://github.com/hivewallet/discussions/issues/1 ).

Leveraging email addresses or phone numbers however requires to verify those first (with a "follow this link" email or a code via SMS), to prevent someone who isn't the owner from claiming the address (e.g. signing up as gavinandresen@gmail.com at Coinbase and then asking for donations to that address).

Note, that the payment protocol does not provide a solution for "pay to email address" - even if Wendell likes to claim that from time to time. ;-P The payment protocol only offers an (optional) mechanism to verify, that a payment request, that you already have, was signed by the owner of a specific email address (if that person has gotten a certificate for their email address, which you need to get from someone like StartCom). That still leaves you with the problem of getting the payment request in the first place.

Then there are identity systems which are not used much or not at all so far, like:

PGP keys can also have email addresses attached, but those are not verified. So someone can just upload a key with the email address gavinandresen@gmail.com attached and in fact someone did. So PGP keys are really a separate identity. The nice thing about them is, that there is already some infrastructure, like key servers, that can be used. The downside is, that pretty much nobody has a PGP key, so conversely they also don't know any PGP keys of their friends.

OneName is an interesting project, in that it provides a namespace managed by a blockchain (in this case Namecoin). However, again, no one has OneName accounts, so it's not really helpful in finding your friends. Email addresses can be attached, but so far they are also not verified, if I remember correctly. Another point to keep in mind regarding OneName is, that it costs Namecoins to register the underlying account. This is currently paid for by OneName, but will probably not stay like this forever.

I don't know much about Keyhotee, as I found it difficult to figure out how the systems works exactly from the existing documentation. I think it's sort of Namecoin plus some additional features.

As a kind of combination of the above things there is Keybase ( https://keybase.io/ ). It's an interesting project, which creates a new identity (a Keybase username) with an associated PGP key, but then allows you to publish identity proofs on other services, to enrich that identity. So for example for a keybase user "maria" (the example on their site), you could independently verify, that it belongs to someone who controls maria_h20 on Twitter and the web domain mariah20.com. If you know, for example, that the Twitter handle is legit, then you have also verified the Keybase login. It's in limited beta at the moment. I believe that OneName is also moving into a similar direction, which would be a good step, I think.

One can of course also start one's own identity systems, which many sites do (or do in addition to social network sign-in). So in the case of Hive, that could be a username (or also an email address, but then with a verification step).

Finally, as a subcategory of the above, there can be "no identity" or rather no visible identity. In this case the Hive username still exists, but is just a randomly generated token that is only used internally and never shown to a user (like hiveuser_fjek39wirubxjaksdjghwedfgawqer).

For Hive Android, I am currently planning on going with that last option. The big advantage is, that it requires no sign-up step, as picking a random username can just happen automatically in the background. The disadvantage is, that there is nothing to give to other users. Instead, one can only send "invitiation links", which are a mechanism to hide the ugly random username and communicate it behind the scenes. A wallet, which understands the invitation link, can then receive the actual username and get in touch with the other wallet, to perform payments etc. (see https://github.com/hivewallet/discussions/issues/5 again).

For me the runner-up alternative would probably be Hive usernames, that the user is picking when signing up. This requires no verification step, just a check that the username is not taken yet. Those usernames can then also be given to other users or used in the form of a public page, as proposed with the "Pollen" idea by David & co. The password for that login would be the passphrase.

Those two approaches could also be combined, in that the user might start out with a randomly generated username and then later just upgrades to a hand-picked username/alias.

mackuba commented 10 years ago

Heh, I was going to post my own "wall of text" issue today... so I'll just post it here as a comment instead. [TLDR WARNING]

I feel like all those extensions to the protocol we've been talking about recently somehow fit together into a bigger picture, but it's hard to see that picture if we're only talking about them one at a time. So I wanted to have one place that describes this all together, looks like you had the same idea.

Also, I wanted to say that we should be careful not to rush any solutions without taking the necessary time to think this through. This is all bleeding edge stuff, things that mostly haven't been done in any wallet yet, so we're starting to explore the unknown here. It's even quite possible that we'll choose something, implement it and then later realize it's not going to work and rebuild it again.


There are two major parts I can see here, that roughly map to the "identity" and "payment" parts in the issue title:

  1. How do we help two people make a permanent connection between their wallets that helps them make transactions between each other (i.e. how do we get them on each other's contact lists)?
  2. How does this connection actually work, i.e. how do we let them send and receive money from each other once they're connected?

We also need to take into account that:

So, for 1), we have such ideas:

Right now I think a combination of #1 + #5 + #9 would make the most sense; I'm not very enthusiastic about the idea of public profile pages and putting data and addresses on them for everyone to see. Though that could work too, but I think the master public key would have to be kept safe server-side, so that everyone can't see all the addresses that were generated there.

Once we have a connection, we want to send and request/receive money (2). This poses the following problems:

So that's how I see it. I don't have many answers, mostly more questions, but I guess at least it's good to see them all in one place...

tgerring commented 10 years ago

If one wanted to make "pay to email address" work in general, one would need to upstream that lookup to the actual domain. So that would require some kind of DNS extension, where you can ask the DNS server at gmail.com for a Bitcoin address for some.user@gmail.com.

There's actually a standard for PGP in DNS. Considering our profile screen, really there's no reason that our identity data couldn't be based on a PGP key. The management of such keys is already handled by the keyservers and related software/libraries, and it would give us an easy bridge into encrypted messaging.

The only difficult part of leveraging something like that would be needing to read/write a custom subattribute, since "photo" is the only official object type. We did this [prototype work in JavaScript via a fork of OpenPGP.js--making's the hive-js implementation very easy--but ports of functionality would need to be added to other platforms.

Although we have only a single address implemented in our demo, there's nothing preventing a BIP32-style or stealth-address from being embedded. I'm think Peter would be interested in seeing such an implementation.