-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Security issue regarding derived key: Ref: Issue #6 & #13 #15
Comments
Not seeing any traction here. Using a static initial key as the source of future keying material combined with a non-random salt weakens the resulting cipher text used to store sensitive data in the browser. The salt being generated should be replaced with the While the usability decision to hard code a passphrase for the initial keying material is common, if you are truly trying to protect data in the browser prompting the user for a passphrase or even using a combination of the browsers fingerprint with a user supplied passphrase will ensure any browser plugin and/or XSS style attack retrieving the stored data would be hard pressed to convert it back to plain text. |
Hey @jas- , could you help in resolving the issue? A pull-request might help here. |
Yes, but why a static key? |
@jas- when I started #23 I thought the meta data is encrypted with the password and method passed into the constructor. But this is not the case. I know why @softvar did it like this. He wanted to make it possible to use different algorithms and passwords for parallel instances. I wanted that too, but thought that would be impossible if the meta data is encoded with the first given password and encryption method. By splitting it up into namespaces, the meta data may be encrypted with the passed password and encryption method. This way it would be possible to fix #22 and this issue. |
@konsultaner Implementing a key-ring inside of the existing DOM to allow for encrypted objects with different keys doesn't alleviate the original issue. References: Classification of cryptographic keys, RFC 4107 - Guidelines for cryptographic key management, NIST SP 800-57 - Recommendations for key management. Unless the user of this package is educated about the key derivation limitation when using the default static value and why they should a) use their own or b) prompt the user, then this package leaves the end user susceptible to simple decryption with little effort. Not really sure why you mentioned this issue with your patch. |
…or encryptionNamespace
Originally posted by @jas- in #13 (comment)
The text was updated successfully, but these errors were encountered: