Skip to content

Conversation

royjacobson
Copy link
Contributor

The hash function was trimming the hash state to 32 bits, so it could be trivially brute forced after 4 billion attempts. XXH3 is also not a cryptographic hash which means it's generally not safe to use in this context.

SHA256 is safe and is also what Redis are using, it looks as if they're also allowing to set the password hash directly. So let's use this instead.

Copy link
Contributor

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, didn't think about it at all

@royjacobson royjacobson merged commit 773cee1 into main Aug 15, 2023
@royjacobson royjacobson deleted the user_registry_use_sha256 branch August 15, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants