Skip to content

fix(ecdsa): feat deriveevp use of password hash with insufficient computational effort #2077

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

odaysec
Copy link

@odaysec odaysec commented Jul 12, 2025

"value": ["SHA1", "SHA256", "SHA384", "SHA512", "MD5"]

key = CryptoJS.EvpKDF(passphrase, salt, { // lgtm [js/insufficient-password-hash]
keySize: keySize,
hasher: CryptoJS.algo[hasher],
iterations: iterations,

fix address the DeriveEVP, the CryptoJS.EvpKDF function should be replaced with a modern and secure key derivation scheme like PBKDF2. The PBKDF2 algorithm is widely recommended and supported by libraries such as crypto or crypto-js. Specifically:

  1. Replace the CryptoJS.EvpKDF function with CryptoJS.PBKDF2.
  2. Ensure the iteration count is set to a secure value (e.g., 10,000 iterations by default, or a user-specified value if it is sufficiently high).
  3. Remove weak hash functions like MD5 from the list of options and default to a strong hash function such as SHA256.

Changes will be made to the run method, and the hashing function options in the constructor will be updated to only include secure options.

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2025

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

2 participants