Let's say I have a simple "vault" application where users can enter data and a passphrase, and it will be encrypted, requiring them to re-enter the passphrase to decrypt it.
This would be implemented as follows:
- generate salt for key generation
- generate key from (salt, passphrase) with argon2, scrypt, or whatever else libsodium is using
- generate nonce or iv
- encrypt and sign (plaintext, key, nonce or iv) with chacha / aes-gcm / whatever else libsodium is using
- store (ciphertext with signature, salt, iv or nonce) as I need all 3 to decrypt from the passphrase
My question: is there an advantage or disadvantage to re-using the salt everytime for the same user? Most crypto examples re-use keys, which is fine as long as the IV or nonce is different. However if I generate and store the salt everytime I'm effectively using a different key everytime. Is this good / bad / unimportant?