Grateful Grateful - 1 month ago 7
Node.js Question

BCrypt: What do we mean by 'the number of rounds to process data'?

I have recently been looking into BCrypt, but don't seem to quite understand what we mean by

rounds
in the following.

genSalt(rounds, callback)


The documentation states that it is the number of rounds taken to process the data... but what does that mean? Is it the number of times the data is being hashed continuously? If so, what algorithm is being used?

[ ref: https://www.npmjs.com/package/bcrypt-nodejs ]

Answer

round in genSalt and genSaltSync only affects the work factor in its output. It means when hashing, the input will be hashed 2rounds times. See https://en.wikipedia.org/wiki/Crypt_(C)#Blowfish-based_scheme.

Comments