Improve password hashing algorithm being used #302

Closed
opened 2022-12-25 20:28:51 +00:00 by norm · 2 comments
Owner

Currently FoundKey uses bcrypt with the input cost set to 8 (as seen here).

Bcrypt is however not designed to be resistant to GPU and ASIC password crackers. Moreover, it also has limitations like truncating the input to 72 bytes.

We could possibly move to something more modern like Argon2i or Argon2id, though we do have to make sure existing bcrypt password hashes can still work at least for now.

Currently FoundKey uses bcrypt with the input cost set to 8 (as seen [here](https://akkoma.dev/FoundKeyGang/FoundKey/src/commit/114d416de0b5b5f3635503a44ed9e4454102b7f7/packages/backend/src/misc/password.ts)). Bcrypt is however not designed to be resistant to GPU and ASIC password crackers. Moreover, it also has limitations like truncating the input to 72 bytes. We could possibly move to something more modern like Argon2i or Argon2id, though we do have to make sure existing bcrypt password hashes can still work at least for now.
norm added the
feature
label 2022-12-26 15:58:04 +00:00
Owner

Implemented in #308 - which implements Argon2id, still allows logins with bcrypt passwords, and automatically rehashes on sign-in (though not other password-verification cases).

Implemented in #308 - which implements Argon2id, still allows logins with bcrypt passwords, and automatically rehashes on sign-in (though not other password-verification cases).
Johann150 added a new dependency 2022-12-28 20:41:38 +00:00
Author
Owner

Implemented in ed9d4023d4, thanks @toast!

Implemented in ed9d4023d41bba7c4ac53a1a3422246feed37de2, thanks @toast!
norm closed this issue 2022-12-29 20:57:35 +00:00
Sign in to join this conversation.
No labels
feature
fix
upkeep
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Depends on
#308 argon2 support
FoundKeyGang/FoundKey
Reference: FoundKeyGang/FoundKey#302
No description provided.