[PHP] Missing functions in latest build

I am writing to report a potential issue with the Aegis functions in
PHP.

I am currently running the latest PHP version (8.4.11) on a Debian
system, but I have noticed that the following functions are unavailable:

- sodium_crypto_aead_aegis128l_encrypt
- sodium_crypto_aead_aegis128l_decrypt

Conversely, these functions are working as expected in the Windows build
of PHP.

System Information:
ii php-cli 2:8.4+96
                            all command-line interpreter for
the PHP scripting language (default)
ii php-common 2:96
                            all Common files for PHP packages
ii php-curl 2:8.4+96
                            all CURL module for PHP [default]
ii php-mbstring 2:8.4+96
                            all MBSTRING module for PHP
[default]
ii php-xml 2:8.4+96
                            all DOM, SimpleXML, WDDX, XML, and
XSL module for PHP [default]
ii php8.4-cli 8.4.11-1
                            amd64 command-line interpreter for
the PHP scripting language
ii php8.4-common 8.4.11-1
                            amd64 documentation, examples and
common module for PHP
ii php8.4-curl 8.4.11-1
                            amd64 CURL module for PHP
ii php8.4-mbstring 8.4.11-1
                            amd64 MBSTRING module for PHP
ii php8.4-opcache 8.4.11-1
                            amd64 Zend OpCache module for PHP
ii php8.4-readline 8.4.11-1
                            amd64 readline module for PHP
ii php8.4-xml 8.4.11-1
                            amd64 DOM, SimpleXML, XML, and XSL
module for PHP

Steps to Reproduce:
Execute the following commands:
   php -r
'var_dump(function_exists("sodium_crypto_aead_aegis128l_encrypt"));'
   php -r
'var_dump(function_exists("sodium_crypto_aead_aegis128l_decrypt"));'

Expected Behavior:
I expected both functions to return true, indicating their availability.

Actual Behavior:
Both commands return false.
I have ensured that the sodium extension is enabled, and I am using
libsodium version 1.0.18, which is required to support these functions.

Also,
php -r 'print_r(get_extension_funcs("sodium"));'
Array
(
    [0] => sodium_crypto_aead_aes256gcm_is_available
    [1] => sodium_crypto_aead_aes256gcm_decrypt
    [2] => sodium_crypto_aead_aes256gcm_encrypt
    [3] => sodium_crypto_aead_aes256gcm_keygen
    [4] => sodium_crypto_aead_chacha20poly1305_decrypt
    [5] => sodium_crypto_aead_chacha20poly1305_encrypt
    [6] => sodium_crypto_aead_chacha20poly1305_keygen
    [7] => sodium_crypto_aead_chacha20poly1305_ietf_decrypt
    [8] => sodium_crypto_aead_chacha20poly1305_ietf_encrypt
    [9] => sodium_crypto_aead_chacha20poly1305_ietf_keygen
    [10] => sodium_crypto_aead_xchacha20poly1305_ietf_decrypt
    [11] => sodium_crypto_aead_xchacha20poly1305_ietf_keygen
    [12] => sodium_crypto_aead_xchacha20poly1305_ietf_encrypt
    [13] => sodium_crypto_auth
    [14] => sodium_crypto_auth_keygen
...

On 18/11/2025 00:24, L wrote:

I am writing to report a potential issue with the Aegis functions in
PHP.

I am currently running the latest PHP version (8.4.11) on a Debian
system, but I have noticed that the following functions are unavailable:

- sodium_crypto_aead_aegis128l_encrypt
- sodium_crypto_aead_aegis128l_decrypt

Hi,

The availability of these functions depends on the version of libsodium PHP is built against.

This functionality was added in libsodium 1.0.19 [0]

The output of phpinfo() will tell you what version of libsodium PHP is using. Look for the "libsodium library version" entry in the "sodium" extension section (a heading with a table below).

This information is also available via the SODIUM_LIBRARY_VERSION constant [1]

[0] libsodium/ChangeLog at 7f7873c21b5819f45927ecd344ac047ffb8b1a00 · jedisct1/libsodium · GitHub
[1] PHP: Predefined Constants - Manual

In future I would suggest picking one place to ask about an issue first, then only copying in other people and lists if you either don't get an answer or get an answer that indicates they need to do something. This avoids people (often volunteers) duplicating work to investigate and respond to the same issue.