Score:0

Use peppers with Bcrypt (HMAC + Bcrypt)

in flag

Is it useful to combine HMAC with Bcrypt ?
If it so, should I do the HMAC on the password before "Bcrypt"ing it ? or should I do the HMAC on the Bcrypt output ?

zw flag
Rather than do this yourself, just use argon2 which has an explicit parameter for this.
Score:1
si flag

The goal of a pepper is to protect passwords in the event that a database of password hashes is compromised but other parts of the authentication system are not compromised.

Password hashing functions' output contains their input parameters, salt, and the digest, so obscuring it irretrievably via HMAC would make it impossible to verify a user's password. Storing the plaintext password hash output next to the "peppered" HMACed output would leak the "unpeppered" value. Therefore, you apply the pepper on the input.

Nothing about this differs from hash to hash, it's the same for bcrypt as it is for PBKDF2 or Argon2 or Pufferfish2 or any other Password Hashing Function...

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.