simonepri / phc-pbkdf2

🔒 Node.JS PBKDF2 password hashing algorithm following the PHC string format.
MIT License
12 stars 1 forks source link

Secure default configurations #5

Open simonepri opened 6 years ago

simonepri commented 6 years ago

This issue will be updated with the current defaults used by this package while hashing your passwords.

Please comment on this issue to get them updated.

Defaults

/**
 * Default configurations used to generate a new hash.
 * @private
 * @type {Object}
 */
const defaultConfigs = {
  // Minimum number of rounds recommended to ensure data safety,
  // this value changes every year as technology improves.
  iterations: 25000,

  // The minimum recommended size for the salt is 128 bits.
  saltSize: 16, // bytes

  // SHA-1 is sufficient, using SHA-256 or SHA-512 has the benefit of
  // significantly increasing the memory requirements, which increases the cost
  // for an attacker wishing to attack use hardware-based password crackers
  // based on GPUs or ASICs.
  digest: 'sha512',
};

Last Update: 01/04/2018 (dd/mm/yyyy)

e6c31d commented 1 year ago

According to OWASP, the recommended iterations for PBKDF2-HMAC-SHA512 is 210,000.