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

Always rehashing with PHP7.2 (Argon2i vs Argon2id) #72

Closed
frederikbosch opened this issue Jan 5, 2018 · 4 comments
Closed

Always rehashing with PHP7.2 (Argon2i vs Argon2id) #72

frederikbosch opened this issue Jan 5, 2018 · 4 comments

Comments

@frederikbosch
Copy link

When moving towards PHP 7.2 and upgrading from \Sodium::CONSTANT towards SODIUM_CONSTANT, I was noticing that the password hashing mechanism was changed from Argon2i to Argon2id. At first I thought that might be just my configuration, but I also see it on 3v4l.

If this is not configuration, it means that Halite is always rehashing passwords in PHP7.2, because it counts on Argon2i. Or am I just missing something?

@paragonie-scott
Copy link
Member

Libsodium switched to Argon2id by default in 1.0.15, which is unambiguously a good move.

Halite pins its minimum to 1.0.13, which was the first version with Argon2id support. This change was one of the motivators in selecting 1.0.13 as the minimum. However, I somehow neglected to make the necessary changes to handle Argon2id in the code.

Thanks for reporting this. I'll get a fix out ASAP.

@frederikbosch
Copy link
Author

@paragonie-scott Wouldn’t this be easier if sodium had its own ‘needs rehash’ function? Or if there was some method to discover what the current hash mechanism is and what parameters it requires (based on its dependencies).

@paragonie-scott
Copy link
Member

I've tagged v4.1.0 which solves these problems by setting the minimum to 1.0.15.

I'll get a working fix for 4.0.x soon for 1.0.13+ compatibility.

@paragonie-scott
Copy link
Member

v4.0.3 was released with the fix.

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

No branches or pull requests

3 participants
@frederikbosch @paragonie-scott and others