Password salting
Password salting gives each new password hash its own random additional value. The salt is stored alongside it and does not need to be secret.
Use a separate salt for each password hash
Password salting gives every newly created password hash a separate, securely generated random additional value. The salt is an input to the password hash function. It does not need to be secret and is stored with the verification value. A correctly used password hashing library can handle generation and management.
In a fictional application, account-A and account-B choose the same password. The library generates independent random salts for them. The labels salt-A and salt-B stand only for those values here; they are not usable salt settings. Different salts prevent an attacker from simply reusing a precomputed hash across all accounts.
Use the stored value when verifying
At a later sign-in, the library uses the stored salt and parameters to check the entered password. It does not generate a new salt every time it verifies an existing password hash. Creating a new password hash, however, uses a fresh salt.
A salt is not a pepper: a pepper is an additional secret that can protect multiple password records and is kept separately from the password database. A salt also does not replace a sufficiently costly password hash function. Someone holding a database copy can still try candidate passwords with the respective salt; weak passwords therefore remain at risk.
Sources
Related terms
- Argon2Argon2 is a family of memory-intensive password hash functions. The variant, memory use and runtime must suit security and operational requirements.
- PasskeyA passkey enables sign-in with a service-bound key pair. Device changes, account recovery and account permissions remain separate responsibilities.
- HttpOnly cookieHttpOnly prevents direct cookie access by page scripts. Matching requests can still carry the cookie; session and permission checks remain necessary.
- Data minimisationData minimisation limits personal data to what is adequate, relevant and necessary for a defined purpose.
- Data retention policyA data retention policy defines the purpose, start, duration and end of storage. Deletion jobs and copies must be addressed in the implementation.
- Envelope encryptionEnvelope encryption separates the data key from the key protecting it. The encrypted file and wrapped data key need to be managed together.
Your project with ASES
Describe your project to us. We will get back to you with an initial assessment.