Author Topic: PHP-FPM sodium module should have argon2 support.  (Read 5364 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
PHP-FPM sodium module should have argon2 support.
« on: December 18, 2021, 06:43:06 PM »
The sodium module in PHP-FPM 8.0 (well likely all of them) is not being compiled with argon2 support. We need something like:

./configure --with-password-argon2

Added to the compiler for PHP-FPM. Can anyone comment on this? It is throwing an error for me in Nextcloud due to it.

Offline
*

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #2 on: December 18, 2021, 10:26:50 PM »
php -r 'print_r(get_defined_constants());' | grep -i argon

should output something like:

Code: [Select]
# php -r 'print_r(get_defined_constants());' | grep -i argon
    [PASSWORD_ARGON2I] => argon2i
    [PASSWORD_ARGON2ID] => argon2id
    [PASSWORD_ARGON2_DEFAULT_MEMORY_COST] => 65536
    [PASSWORD_ARGON2_DEFAULT_TIME_COST] => 4
    [PASSWORD_ARGON2_DEFAULT_THREADS] => 1
    [PASSWORD_ARGON2_PROVIDER] => standard
    [SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13] => 1
    [SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13] => 2
    [SODIUM_CRYPTO_PWHASH_STRPREFIX] => $argon2id$

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #3 on: December 18, 2021, 10:33:39 PM »
Looks like this could just be a PHP configuration requirement and Nextcloud is errantly throwing the sodium module not present error because of it. I am not sure it is sodium-related. Looks like from my post(s) above it is just something that needs to be added to the PHP build.

Offline
***
Re: PHP-FPM sodium module should have argon2 support.
« Reply #4 on: December 19, 2021, 01:32:58 AM »
I had a sodium error last week.  I think it appeared when I was trying to switch to php 7.4.24 from 5.6
Listen to everything Pixelpadre says.

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #5 on: December 19, 2021, 01:29:29 PM »
I had a sodium error last week.  I think it appeared when I was trying to switch to php 7.4.24 from 5.6

It could be because sodium is not supporting PHP RFC: Argon2 Password Hash - aka argon2I for password hashing.

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #6 on: December 19, 2021, 05:49:47 PM »
Oh, duh I see, the PHP-FPM selector doesn't even have argon2 support built into it like the regular PHP does. Could the dev's add support for this in PHP-FPM 8.0?

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #7 on: December 27, 2021, 09:00:40 AM »
Argon2 support is missing in PHP-FPM 7.4 and 8.0 - 7.3 and 8.1 have it. Could we get this added to 7.4 or more particularly PHP-FPM 8.0?

Offline
*****
Re: PHP-FPM sodium module should have argon2 support.
« Reply #8 on: December 27, 2021, 11:47:02 AM »
Hi reset the php option to get all options updated probably you didn't see because of old options are selected.

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #9 on: December 31, 2021, 06:09:00 PM »
I'm not sure what you are telling me to do.

Offline
*
Re: PHP-FPM sodium module should have argon2 support.
« Reply #10 on: December 31, 2021, 06:10:21 PM »
Okay, never mind - that worked. Thanks for the guidance.