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
...