-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research: Multiple keys/addresses maps to one 3box #251
Comments
First suggestion of a way to solve this: Using multiple ETH addresses with one 3boxUser has an ETH address A with corresponding private key a. The private key is used to generate a signature from which we derive a mnemonic seed m and from this seed we derive a symmetric encryption key s. Suppose we know have a second device on which we generate another key pair (a', A'). We want to allow the user to access their 3box using this key pair. Technical solutionLog into 3box in the normal way with A' by signing a message, deriving a mnemonic m' and a symmetric key s'. Move the mnemonic m' over to the device containing the ETH address A. Using the symmetric key s' (derived from m') the user encrypts the original mnemonic m and posts the encrypted value E(s', m) in the Public Profile of A under the key "deviceKey_<A'>" (could be privacy issues in revealing A'?). The user then instructs the Address Server to map the address A' to the same orbitDB instance as A, using a signed message from A and A'. Next time the user logs in using A', the Address Server will retrieve the OrbitDB instance. The user checks that the key "deviceKey_<A'>" exists as a key in the Public Profile & retrieves the corresponding encrypted value E(s', m). The user then decrypts E(s', m) using the key s' to get the mnemonic m and they can at that point read and write to the OrbitDB instance at will. Description of Possible UXWhen logging into 3box.io with the new device, click something like "I want to add new device/account/ethereum address to existing 3box". This will display m' or s' as a QR code. There could also be a selection "Cannot scan?" which would display m' as 12 words. On the device with Ethereum address A the user would log into 3box.io, click something like "Add new device to this 3box". This would hook into the camera and allow you to scan the code on the other device. Here there could also be a selection "Cannot scan?" which would allow you to manually enter the 12 word seed. After scanning the code (or typing the words) we would show something like "New device <A'> added". |
@oed @zachferland @c-castillo Any comments/suggestions? |
Sorry @christianlundkvist my comment was accidentally deleted, but we caught up today on standup! just making sure it doesn't look empty on the story :) My feedback is mainly around onboarding UX. I think we should try to design a system that optimizes for onboarding new users seamlessly, and then letting them pair their new 3Box with the original 3Box. |
@christianlundkvist I like the usage of QR codes to pair new devices. I think a little more detail on how the adding a new device will work from the user standpoint. |
Hey @christianlundkvist bumping this story 👍 Where are we on this? It would be nice to post a bounty for this as soon as we have a solid opinion on implementation. Have you drafted up the scenarios yet? TY! |
Approach using asymmetric encryptionThis approach relies on each 3box profile having a public encryption key in the public profile. The private decryption key would be derived from the users seed. Given that an address Technical descriptionNow, given an address We would do this by adding the following data to
This is similar to the approach taken above. At this point, The next time After
After this, when Suppose we now want to merge in another address,
This now allows Possible user experienceWhen logging in to 3box.io (or perhaps another dapp) using address The user then either scans a QR of the address Once the address has been scanned or entered in the user sees a message like "Login with /new device to 3box.io to finish adding this device/account/address".The next time the user logs in to 3Box.io with address From now on, when the user logs in to a dapp with address Potential issues
|
Thanks @christianlundkvist. What’s your take on using asymmetric encryption for this, what are the risks here? |
That seems like a nice and pragmatic solution! I would change "useOther3Box" to be set in the root store of B. That way B would only need to open one orbitdb instance. |
If there is a key conflict, we can use the timestamp to decide which entry to use. |
@michaelsena Main risk is that if you have sensitive data in your private store someone can save all your encrypted data, then 15 or 20 years later when/if quantum computers are a thing they can decrypt all data and see your sensitive stuff. So it depends on the type of data you are storing wether or not this is an issue.
@oed Sounds good to me!
Good idea! |
@oed and @christianlundkvist where are we on this story coming out of the retreat? Has it fallen in prio? Or how should we proceed here? |
@michaelsena it seems like we got most of the research figured out already. As for an implementation I don't see an immediate need yet. |
Closing this as it's well defined and on the roadmap for implementation soon :) |
When using multiple devices with different keys per device it is desirable to map all those keys to one 3box.
The text was updated successfully, but these errors were encountered: