-
Notifications
You must be signed in to change notification settings - Fork 8
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
Identity - Using passphrase to generate temporary Key pairs. #10
Comments
Copy pasting to be easier to discuss:
Regarding using a passphrase to generate the TmpKey: The issue with a passphrase is that a malicious node may try to guess the password of a entry in the guest-list via a brute-force attack. The attacker has access to the guestlist because it's public. A successful guess would give access to the document keys, exposing the document contents. I propose a different approach: To request access, Alice would send her If Alice tries to access the document in a device known to Bob, the access would be transparently given. But for a device unknown to Bob, Alice would not be able to retrieve the document keys because there's no entry for that device in the guest-list. Still, Alice could use one of her other previously authorized devices to authorize herself. This could be done in a nice UI/UX where we make it clear to Alice that her device hasn't yet been authorized but she can do so. This solution does not have the downside of using passwords. In the best case scenario, Bob generated an entry for all of Alice devices and she is able to access the document in all of them. In the worse case scenario, Alice must "self authorize" all of her other devices with the one authorized by Bob. To further improve on this, Alice could have a list of devices associated with her |
I agree that a passphrase would be the weakest point in this design, and the easier to attack. However, I see two main issues with using the device's key pair to transmit the document's keys: 1. Key exposureHowever, using a device's private key pair (eg smart-phone key pair, or laptop key pair) to transmit document keys could result in the private key being overly exposed. Let's assume that n is the set of documents Alice has access to, and that m is the set of documents an attacker has access to, m is contained inside n. For each document in m the attacker will have access to the documents' keys encrypted with Alice's public keys. The attacker also has access to the documents' Write keys. This means he would have access to the encrypted text (which would be in the document's authorization list) and to the decrypted text. I need to do some further research, but I believe this would increase the vulnerability to a cryptoanalysis attack. 2. Consequences of key compromiseIf Alice's device key was compromised, an attacker would have access to all the documents Alice has access to. An alternativeBased on @satazor 's idea, I believe we could merge the passphrase concept with using the device keys:
This way, even if an attacker discovers the temp keys' passphrase, he would still need to have control of Alice's-Device-Pub. This also solves another problem of the device's key being compromised. Since the TempPubKeyPair is not derived from the Alice-Device-KeyPair, the disclosure of Alice-Device-Private key would not reveal the write keys of all of Alice's documents. This would effectively be two-factor authentication. Something you know, the passphrase, something you have, the device with the DeviceKeyPair. Extra tought: |
Like @diasdavid said, we may change a few knobs to increase security while decreasing usability and the other way around. Having a password combined with Alice's keys will increase security but will require her to remember the password for each document. She might end up using the same password in every document so that she doesn't have to remember different passwords. This will make the additional security weaker. What I'm saying is that the additional passphrase might make sense for some apps, or even in a subset of features of an app. I don't know if that's the case for peerpad documents in general. Perhaps, that could be a opt-in definition of the document itself? |
Regarding compromised keys:
By doing this, Alice could not only have a list of devices associated with her DID but also flag the ones that were compromised. This way, if Bob interacts with one of Alice's compromised devices, he could be warned and take action, like showing a big warning 🔥in the UI/UX as well as to remove the compromised device from its addressbook. After reading a bit of TUF (The Update Framework), they have a similar strategy to deal with compromised devices. |
So, in this scenario, everytime two entities interact which each other they would have to reauthenticate themselves? Alice sends me a message, I once again verify her DID-Document to make sure she hasn't flagged new devices as compromised? In this case the address book would only need to contain DIDs with verified identities (the manual process through which a user verifies another user's proofs of personhood) and not need to contain the device keys associates with each DID, right? Because everytime a new interaction occurred you would get the device keys from the DID-Document to make sure that you're not receiving flagged keys. Or would this process be something like sending an email to your contact list saying "hey, people, this key has been compromised, so please update your address book" |
Essentially, yes. I would say that "reauthenticate" is not a good name to describe what I wrote above. Essentially, it's a check that can be made on an previously known device to see if it was flagged as compromised since the last check. The when and/or frequency at which this check is made should perhaps be discussed further. In the case of TUF, the check is made during an update process. |
If we indeed have a way to associate devices to a DID, perhaps we won't need the addressbook. Still it's a good piece to have for offline usage.
I think that a manual process should be the worst case scenario. Ideally, Alice would flag the device as being compromised and everyone interacting with this compromised device could verify if it's compromised or not. |
I see a very good a productive discussion here. In order to avoid reinventing the wheel or missing some perfectly shiny wheel all together, I recommend doing a research on what other Apps are doing for Identity in the browser first. Understand how the following apps work:
Namely on things like:
|
Thanks, @diasdavid . I'd also like to add DID-Auth to the list. They explore how different DID methods can be used for authentication, there is a particularly good explanation of uPort. |
This issue tracks the passphrase usage discussion related to #9 .
The text was updated successfully, but these errors were encountered: