Score:3

Using Argon2, can I improve the salt join the password Argon(password,password+salt)?

bh flag

I'm creating an application where I'm going to use Argon2, I'm going to have a password, and I'm going to use as salt: email+name+date of birth, you must think that my salt is silly because name and date of birth can change, which would change the result, well this is not the case with my application, I should and will use these 3 pieces of information for the salt anyway, but what do you think is safer? Argon2(password, email+name+birth date) or Argon2(password, email+name+birth date+password), another thing, what format should I pass the salt? Hexadecimal?

samuel-lucas6 avatar
bs flag
I'd say the only time you'd have a salt like that is if you're making a deterministic password manager. Otherwise, random is the way to go, as suggested. I agree there's no value in using the password for both inputs; if you want something secret, a random salt should be kept secret.
Score:2
ng flag

Argon2(password, email+name+birth date) or Argon2(password, email+name+birth date+password) ?

There is no notable difference in security, thus keep it simple. What matters most to security are (somewhat in decreasing order)

  • The integrity of the execution environment (if the inputs including password can be monitored, forget about security)
  • The quality of the password (123456 can't be made safe). Calling it a passphrase in user interactions (as in PGP) is cheap, and I believe helps more often than not.
  • parameters for the workfactor (if in doubt, for password use, see recommendations)
    • $t$ (controlling number of passes)
    • $m$ (controlling memory size)
    • $p$ (controlling degree of parallelism)
  • the uniqueness (and to some degree unpredictability) of the salt
  • the secrecy of $K$ (secret value aka pepper) if used
  • the Argon2 variant if side channels are an issue (Argon2id should be fine in practice).

I'm going to use as salt: email+name+date of birth

Beware that name and date of birth are often considered confidential (as well as email sometime), and unless they are supplied at each use they will need to be stored. The standard thing is a random salt, and some libraries packaging Argon2 for generation and verification of password tokens won't allow another option.

What format should I pass the salt? Hexadecimal?

Salt/nonce $S$ is defined as a bytestring in Argon2, thus I see no point in doubling the size by going hex unless the library used to access Argon2 has some limitation. Again, some libraries handle the salt, and store it into the password token (typically with some text encoding).

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.