Skip to content

Update encryption format for stored account credentials #3612

Description

@im-adithya

Description

encryptData in src/common/lib/crypto.ts wraps connector configs (macaroons, NWC URIs), the mnemonic, and the Nostr key with crypto-js OpenSSL AES: key+IV from EVP_BytesToKey (MD5, 1 iteration), AES-256-CBC, no authentication. Those blobs live in browser.storage.sync

Reading the ciphertext already requires access to the extension profile on-device. Hence it is not that big of an issue to tackle immediately.

Possible Fix

• Versioned AEAD (AES-GCM via WebCrypto or @noble/ciphers)
• Strong KDF (PBKDF2-SHA256 ≥ 600k iterations, or argon2)
• Re-encrypt existing blobs on next unlock
• Password strength checks (PasswordForm currently accepts numeric-only)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions