Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Raise BCrypt default cost factor for current computing power #2360

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

games647
Copy link
Member

@games647 games647 commented Jun 19, 2021

Based on the discussion #2356, there was the suggestion to raise the default BCrypt cost factor. This is necessary to accommodate todays increased computing power with the goal to slow down brute force attempts against leaked databases.

Notes:

  • BCrypt is insecure against massively parallel GPU hashing, ASICS and FPGA (low memory requirements)
  • Cost factor is a user configurable setting
  • BCrypt is not our default algorithm
  • Default in other software:
    • PHP: 10
    • Some Rust crates: 12
    • Ruby: 12
    • Golang: 10

Benchmark (JMH) from our BCrypt library with i7700k:
https://github.com/patrickfav/bcrypt#performance

cost 6 cost 8 cost 10 cost 12 cost 14
jBcrypt 3.43 ms 13.75 ms 54.76 ms 218.62 ms 883.55 ms
  • Sources imply that the common recommendation is to target 250ms

Advantages:

  • Better protection against brute force attacks so it slows down the attacker

Disadvantages:

  • Lower performance with weaker hardware low budget systems
  • Impact for DOS impacts
  • Maybe not so important for Minecraft, I guess?

Opinion:
I think we can implement the changes. DOS attacks should be implemented with other means.

@sgdc3 sgdc3 requested a review from ljacqu June 21, 2021 14:24
@sgdc3 sgdc3 merged commit e7338f7 into master Jun 24, 2021
@sgdc3 sgdc3 deleted the 2356-bcrypt-raise-default branch June 24, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants