CashlessSociety / cashless-ui

Open source implementation of protocol described here: https://cashless.social.
Mozilla Public License 2.0
7 stars 1 forks source link

'Email only' user has ethereum wallet address generated for them #138

Open utunga opened 3 years ago

utunga commented 3 years ago

Summary

For people without a wallet aka 'email only' users we 'generate a wallet for them' but actually. What we do is derive a secp256k1 key/pair (appropriate for use as an ethereum address) from the ed25519 private key used to sign every ssb message.

If you read this message - very carefully - it appears this is possible. https://crypto.stackexchange.com/questions/68800/can-you-derive-ed25519-keys-from-secp256k1

Worst case we can generate a new message and publish and sign a message private message from the user to the user with the private key of the ethereum address. Yes it is some crazy shit to have a message that can be turned into an ethereum private key sitting in some persons freaking email account.. But the promises aren't worth anything in terms of crypto until a wallet is attached so really we're just using ethereum pub/priv keys as phone numbers till then. And at that point we switch up by signing a message saying that the wallet address has changed (or rather the 'set' of wallets for that identity has grown by one).