Skip to content

[RFE] Implements PASSWORD_ARGON2 from OpenSSL 3.2 #13514

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

Closed
remicollet opened this issue Feb 26, 2024 · 4 comments
Closed

[RFE] Implements PASSWORD_ARGON2 from OpenSSL 3.2 #13514

remicollet opened this issue Feb 26, 2024 · 4 comments

Comments

@remicollet
Copy link
Member

remicollet commented Feb 26, 2024

Description

OpenSSL now provides argon2 algorythms
See: https://www.openssl.org/docs/manmaster/man7/EVP_KDF-ARGON2.html

It will be nice to be able to use argon2 password hash methods from OpenSSL extension when PHP is build without libargon2 and without libsodium

Doable thanks to php_password_algo_register as already done in sodium

Open for discussion
Ping @bukka

@bukka
Copy link
Member

bukka commented Feb 26, 2024

It makes sense for sure and would remove extra dependency.

@remicollet
Copy link
Member Author

I start working on a proposal implementation

remicollet added a commit to remicollet/php-src that referenced this issue Mar 8, 2024
remicollet added a commit to remicollet/php-src that referenced this issue Mar 8, 2024
@remicollet
Copy link
Member Author

Initial proposal in PR #13635

@remicollet
Copy link
Member Author

Closing as a duplicate of #12701

remicollet added a commit to remicollet/php-src that referenced this issue Mar 26, 2024
remicollet added a commit to remicollet/php-src that referenced this issue Mar 26, 2024
remicollet added a commit to remicollet/php-src that referenced this issue Apr 2, 2024
remicollet added a commit to remicollet/php-src that referenced this issue Jul 19, 2024
remicollet added a commit to remicollet/php-src that referenced this issue Aug 19, 2024
remicollet added a commit that referenced this issue Sep 2, 2024
* Implement GH-13514 PASSWORD_ARGON2 from OpenSSL 3.2

* simplify init/shutdown

* use php_base64_encode_ex

* - rename macros - use openssl RAND_bytes - CS

* add --with-openssl-argon2 build option

* check OSSL_KDF_PARAM_ARGON2_LANES instead of OSSL_set_max_threads

* Cleanup and CS

* save/restore old threads config + CS

* remove unneeded check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants