Skip to content

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

Closed
odaysec wants to merge 1 commit into
gchq:masterfrom
odaysec:patch-1
Closed

fix(ecdsa): feat deriveevp use of password hash with insufficient computational effort#2077
odaysec wants to merge 1 commit into
gchq:masterfrom
odaysec:patch-1

Conversation

@odaysec

@odaysec odaysec commented Jul 12, 2025

Copy link
Copy Markdown

"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

CLAassistant commented Jul 12, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@odaysec odaysec closed this by deleting the head repository Sep 17, 2025
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