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

client-side encrypted server side storage for private key #48

Open
brenzi opened this issue Jul 2, 2024 · 0 comments
Open

client-side encrypted server side storage for private key #48

brenzi opened this issue Jul 2, 2024 · 0 comments

Comments

@brenzi
Copy link
Contributor

brenzi commented Jul 2, 2024

similar to protonmail PGP key storage, we could sign TOPs with a client-side in-memory private key without the UX worries of key custody.

onboarding:

  1. user picks a username and a strong passphrase
  2. enclave ensures the username doesn't exist yet in the db
  3. client generates a private key and caches it for the session (localstorage)
  4. client encrypts private key with passphrase
  5. client sends encrypted blob to enclave together with username
  6. enclave encrypts both username and encrypted key again and stores them in a db (external to enclave)

later revisit (i.e.from different device):

  1. user enters username
  2. enclave looks up the encrypted username in db and returns encrypted private key
  3. user enters passphrase
  4. client decrypts private key and caches it in localstorage

notes:

  • enclave/server never sees the passphrase
  • enclave/server never sees the private key and could never sign messages

caveats:

  • an attacker can guess usernames, retrieve the encrypted private key and brute-force passphrases
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

1 participant