flask-security
flask-security copied to clipboard
Improve bcrypt to match OWASP
passlib has a work factor of 12 by default. OWAPS wants at least 13. We should set that as default config for SECURITY_PASSWORD_HASH_OPTIONS and add to documentation what that config variable looks like.
@jwag956 is this still a need? I'm happy to put up a PR for this.
I believe so - note also that in the meantime - PASSWORD_HASH_OPTIONS has been deprecated and now should be PASSWORD_HASH_PASSLIB_OPTIONS.
It would be great if you wanted to issue a PR - please verify on OWASP that that is still the recommended value.
please verify on OWASP that that is still the recommended value.
The current state is:
OWASP v4.0 Verify that if bcrypt is used, the work factor SHOULD be as large as verification server performance will allow, with a minimum of 10.
OWASP v5.0 Verify that if bcrypt is used, the work factor is a minimum of 10 and password size is limited to 72-bytes due to bcrypt's input limit.
At this point - I think #944 is a better option than fiddling with bcrypt.