Search code examples
securityhashbcryptsalt-cryptographycrypt

Do bcrypt minor version generates (2b vs 2a) generate different salt?


So depending on the minor version of the bcrypt it will execute different hash computations as described in https://en.wikipedia.org/wiki/Bcrypt

However, do salt gen has any differences between the versions apart from setting the minor and major? Is it just pure random string based on the specific length?


Solution

  • The Salt is just a random string, it should vary every time you generate a password hash regardless of the 2a/2b scheme. Salts should prevent people from build dictionaries of common plaintext and hash combinations.