Skip to content
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

Saving encrypted passcode locally? #170

Open
nkongsuwan opened this issue Apr 29, 2024 · 3 comments
Open

Saving encrypted passcode locally? #170

nkongsuwan opened this issue Apr 29, 2024 · 3 comments

Comments

@nkongsuwan
Copy link
Collaborator

nkongsuwan commented Apr 29, 2024

If I understand correctly, the signify browser extension does not store Signify passcodes and requires the users to reenter their passcodes every time they opens new browser instances. My impression is that it is going to provide a bad user experience. Could the extension perhaps encrypt the passcode using a human-memorable password and store it locally in a similar manner to, e.g., Metamask?

This seems to be a security-convenience tradeoff. I am interested in learning how to significantly improve UX with minimal sacrifice to security.

@rodolfomiranda
Copy link
Collaborator

The passcode needs to be reenter not only in new browser extension but also after a timeout period of inactivity.

A different approach to avoid the "responsibility" of storing passwords is to use password managers

@nkongsuwan
Copy link
Collaborator Author

nkongsuwan commented May 1, 2024

I think most people do not have password managers. I imagine that if the browser extension gets substantial adoption, most users will store their Signify passcodes on their note-taking applications such as Notes on iOS which is synched with iCloud. These note-taking applications may be protected by weak passwords and potentially introduce an attack surface.

Could it be that shifting the responsibility to the users may cause the ecosystem to be less secure? I am interested in hearing your thoughts on this.

@edeykholt
Copy link
Contributor

I was talking with Daniel Lenksjö today about this same issue.

Here’s a design I’ve thought about off and on for a year now since learning about how Webauthn works at IIW. The idea is to use Webauthn with either a platform or roaming authenticator (e.g. a FIDO2 Hardware Key) and its pseudo random function capability.

See the picture below.
Password and 2FA in browser extension (1)

  1. The browser extension creates a WebAuthn credential and register it on authenticator.
  2. The user creates their random password. The extension uses a hash of this password and the Credential to request the authenticator to generate a pseudo-random result.
    2.1 That result would be truncated to 21 characters and uses as the cleartext passcode.
    2.1.1 The passcode would be hashed and stored (or could be stored encrypted with a hash of the password).

Later, when a new unlock session is initiated, the user might be again prompted for their password, and would regardless be asked to re-authenticate with their authenticator. The generated passcode is compared with what is stored. If it matches, then the local authentication was successful, and a signifyClient can be instantiated and interact with KERIA.

There are still some UX and design issues to be made. One decision to be made is whether the user should ever be able to see the actual cleartext passcode. That’s usually important to get backed up if they ever lose their authenticator (hardware key) or browser storage. Using browser synchronized storage is an interesting optional feature, which would allow the user to use their roaming hardware authenticator on multiple devices without re-registering it (assuming the authenticator credential data could be the same, based on what is in sync’ed storage).

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants